generated-configure.sh revision 493:e3182741ade2
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 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.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_OUTPUT
734OVERRIDE_SRC_ROOT
735ADD_SRC_ROOT
736JDK_TOPDIR
737HOTSPOT_TOPDIR
738JAXWS_TOPDIR
739JAXP_TOPDIR
740CORBA_TOPDIR
741LANGTOOLS_TOPDIR
742BOOT_JDK_JVMARGS
743JAVAC_FLAGS
744BOOT_JDK_SOURCETARGET
745BOOT_JDK
746BOOT_TOOLSJAR
747BOOT_RTJAR
748JAVA_CHECK
749JAVAC_CHECK
750COOKED_BUILD_NUMBER
751FULL_VERSION
752RELEASE
753JDK_VERSION
754RUNTIME_NAME
755COPYRIGHT_YEAR
756MACOSX_BUNDLE_ID_BASE
757MACOSX_BUNDLE_NAME_BASE
758COMPANY_NAME
759JDK_RC_PLATFORM_NAME
760PRODUCT_SUFFIX
761PRODUCT_NAME
762LAUNCHER_NAME
763MILESTONE
764JDK_BUILD_NUMBER
765JDK_UPDATE_VERSION
766JDK_MICRO_VERSION
767JDK_MINOR_VERSION
768JDK_MAJOR_VERSION
769COMPRESS_JARS
770UNLIMITED_CRYPTO
771CACERTS_FILE
772TEST_IN_BUILD
773BUILD_HEADLESS
774SUPPORT_HEADFUL
775SUPPORT_HEADLESS
776SET_OPENJDK
777BDEPS_FTP
778BDEPS_UNZIP
779OS_VERSION_MICRO
780OS_VERSION_MINOR
781OS_VERSION_MAJOR
782PKG_CONFIG
783COMM
784TIME
785STAT
786HG
787READELF
788OTOOL
789LDD
790ZIP
791UNZIP
792FIND_DELETE
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798PKGHANDLER
799OUTPUT_ROOT
800CONF_NAME
801SPEC
802BUILD_VARIANT_RELEASE
803DEBUG_CLASSFILES
804FASTDEBUG
805VARIANT
806DEBUG_LEVEL
807MACOSX_UNIVERSAL
808JVM_VARIANT_ZEROSHARK
809JVM_VARIANT_ZERO
810JVM_VARIANT_KERNEL
811JVM_VARIANT_CLIENT
812JVM_VARIANT_SERVER
813JVM_VARIANTS
814JDK_VARIANT
815BUILD_LOG_WRAPPER
816BUILD_LOG_PREVIOUS
817BUILD_LOG
818SYS_ROOT
819PATH_SEP
820SRC_ROOT
821DEFINE_CROSS_COMPILE_ARCH
822LP64
823OPENJDK_TARGET_OS_API_DIR
824OPENJDK_TARGET_CPU_JLI_CFLAGS
825OPENJDK_TARGET_CPU_OSARCH
826OPENJDK_TARGET_CPU_ISADIR
827OPENJDK_TARGET_CPU_LIBDIR
828OPENJDK_TARGET_CPU_LEGACY_LIB
829OPENJDK_TARGET_CPU_LEGACY
830REQUIRED_OS_VERSION
831REQUIRED_OS_NAME
832COMPILE_TYPE
833OPENJDK_TARGET_CPU_ENDIAN
834OPENJDK_TARGET_CPU_BITS
835OPENJDK_TARGET_CPU_ARCH
836OPENJDK_TARGET_CPU
837OPENJDK_TARGET_OS_API
838OPENJDK_TARGET_OS
839OPENJDK_BUILD_CPU_ENDIAN
840OPENJDK_BUILD_CPU_BITS
841OPENJDK_BUILD_CPU_ARCH
842OPENJDK_BUILD_CPU
843OPENJDK_BUILD_OS_API
844OPENJDK_BUILD_OS
845OPENJDK_BUILD_AUTOCONF_NAME
846OPENJDK_TARGET_AUTOCONF_NAME
847target_os
848target_vendor
849target_cpu
850target
851host_os
852host_vendor
853host_cpu
854host
855build_os
856build_vendor
857build_cpu
858build
859SETFILE
860DF
861READLINK
862CYGPATH
863NAWK
864SED
865FGREP
866EGREP
867GREP
868AWK
869XARGS
870WHICH
871WC
872UNIQ
873UNAME
874TR
875TOUCH
876TEE
877TAR
878TAIL
879SORT
880SH
881RM
882THEPWDCMD
883PRINTF
884MV
885MKTEMP
886MKDIR
887LS
888LN
889HEAD
890FIND
891FILE
892EXPR
893ECHO
894DIRNAME
895DIFF
896DATE
897CUT
898CP
899CMP
900CHMOD
901CAT
902BASH
903BASENAME
904DATE_WHEN_CONFIGURED
905CONFIGURE_COMMAND_LINE
906CUSTOM_MAKE_DIR
907target_alias
908host_alias
909build_alias
910LIBS
911ECHO_T
912ECHO_N
913ECHO_C
914DEFS
915mandir
916localedir
917libdir
918psdir
919pdfdir
920dvidir
921htmldir
922infodir
923docdir
924oldincludedir
925includedir
926localstatedir
927sharedstatedir
928sysconfdir
929datadir
930datarootdir
931libexecdir
932sbindir
933bindir
934program_transform_name
935prefix
936exec_prefix
937PACKAGE_URL
938PACKAGE_BUGREPORT
939PACKAGE_STRING
940PACKAGE_VERSION
941PACKAGE_TARNAME
942PACKAGE_NAME
943PATH_SEPARATOR
944SHELL'
945ac_subst_files=''
946ac_user_opts='
947enable_option_checking
948with_custom_make_dir
949with_target_bits
950with_sys_root
951with_tools_dir
952with_devkit
953with_jdk_variant
954with_jvm_variants
955enable_debug
956with_debug_level
957with_conf_name
958with_builddeps_conf
959with_builddeps_server
960with_builddeps_dir
961with_builddeps_group
962enable_openjdk_only
963enable_headful
964enable_hotspot_test_in_build
965with_cacerts_file
966enable_unlimited_crypto
967with_boot_jdk
968with_boot_jdk_jvmargs
969with_add_source_root
970with_override_source_root
971with_adds_and_overrides
972with_override_langtools
973with_override_corba
974with_override_jaxp
975with_override_jaxws
976with_override_hotspot
977with_override_jdk
978with_msvcr_dll
979with_extra_cflags
980with_extra_cxxflags
981with_extra_ldflags
982enable_debug_symbols
983enable_zip_debug_info
984enable_macosx_runtime_support
985with_x
986with_cups
987with_cups_include
988with_freetype
989with_alsa
990with_alsa_include
991with_alsa_lib
992with_zlib
993enable_static_link_stdc__
994with_num_cores
995with_memory_size
996with_sjavac_server_java
997with_sjavac_server_cores
998enable_sjavac
999enable_precompiled_headers
1000enable_ccache
1001with_ccache_dir
1002'
1003      ac_precious_vars='build_alias
1004host_alias
1005target_alias
1006PKG_CONFIG
1007CC
1008CFLAGS
1009LDFLAGS
1010LIBS
1011CPPFLAGS
1012CXX
1013CXXFLAGS
1014CCC
1015OBJC
1016OBJCFLAGS
1017CPP
1018CXXCPP
1019XMKMF
1020FREETYPE2_CFLAGS
1021FREETYPE2_LIBS
1022ALSA_CFLAGS
1023ALSA_LIBS'
1024
1025
1026# Initialize some variables set by options.
1027ac_init_help=
1028ac_init_version=false
1029ac_unrecognized_opts=
1030ac_unrecognized_sep=
1031# The variables have the same names as the options, with
1032# dashes changed to underlines.
1033cache_file=/dev/null
1034exec_prefix=NONE
1035no_create=
1036no_recursion=
1037prefix=NONE
1038program_prefix=NONE
1039program_suffix=NONE
1040program_transform_name=s,x,x,
1041silent=
1042site=
1043srcdir=
1044verbose=
1045x_includes=NONE
1046x_libraries=NONE
1047
1048# Installation directory options.
1049# These are left unexpanded so users can "make install exec_prefix=/foo"
1050# and all the variables that are supposed to be based on exec_prefix
1051# by default will actually change.
1052# Use braces instead of parens because sh, perl, etc. also accept them.
1053# (The list follows the same order as the GNU Coding Standards.)
1054bindir='${exec_prefix}/bin'
1055sbindir='${exec_prefix}/sbin'
1056libexecdir='${exec_prefix}/libexec'
1057datarootdir='${prefix}/share'
1058datadir='${datarootdir}'
1059sysconfdir='${prefix}/etc'
1060sharedstatedir='${prefix}/com'
1061localstatedir='${prefix}/var'
1062includedir='${prefix}/include'
1063oldincludedir='/usr/include'
1064docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1065infodir='${datarootdir}/info'
1066htmldir='${docdir}'
1067dvidir='${docdir}'
1068pdfdir='${docdir}'
1069psdir='${docdir}'
1070libdir='${exec_prefix}/lib'
1071localedir='${datarootdir}/locale'
1072mandir='${datarootdir}/man'
1073
1074ac_prev=
1075ac_dashdash=
1076for ac_option
1077do
1078  # If the previous option needs an argument, assign it.
1079  if test -n "$ac_prev"; then
1080    eval $ac_prev=\$ac_option
1081    ac_prev=
1082    continue
1083  fi
1084
1085  case $ac_option in
1086  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1087  *=)   ac_optarg= ;;
1088  *)    ac_optarg=yes ;;
1089  esac
1090
1091  # Accept the important Cygnus configure options, so we can diagnose typos.
1092
1093  case $ac_dashdash$ac_option in
1094  --)
1095    ac_dashdash=yes ;;
1096
1097  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1098    ac_prev=bindir ;;
1099  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1100    bindir=$ac_optarg ;;
1101
1102  -build | --build | --buil | --bui | --bu)
1103    ac_prev=build_alias ;;
1104  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1105    build_alias=$ac_optarg ;;
1106
1107  -cache-file | --cache-file | --cache-fil | --cache-fi \
1108  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1109    ac_prev=cache_file ;;
1110  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1111  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1112    cache_file=$ac_optarg ;;
1113
1114  --config-cache | -C)
1115    cache_file=config.cache ;;
1116
1117  -datadir | --datadir | --datadi | --datad)
1118    ac_prev=datadir ;;
1119  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1120    datadir=$ac_optarg ;;
1121
1122  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1123  | --dataroo | --dataro | --datar)
1124    ac_prev=datarootdir ;;
1125  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1126  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1127    datarootdir=$ac_optarg ;;
1128
1129  -disable-* | --disable-*)
1130    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1131    # Reject names that are not valid shell variable names.
1132    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1133      as_fn_error $? "invalid feature name: $ac_useropt"
1134    ac_useropt_orig=$ac_useropt
1135    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136    case $ac_user_opts in
1137      *"
1138"enable_$ac_useropt"
1139"*) ;;
1140      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1141	 ac_unrecognized_sep=', ';;
1142    esac
1143    eval enable_$ac_useropt=no ;;
1144
1145  -docdir | --docdir | --docdi | --doc | --do)
1146    ac_prev=docdir ;;
1147  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1148    docdir=$ac_optarg ;;
1149
1150  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1151    ac_prev=dvidir ;;
1152  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1153    dvidir=$ac_optarg ;;
1154
1155  -enable-* | --enable-*)
1156    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1157    # Reject names that are not valid shell variable names.
1158    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159      as_fn_error $? "invalid feature name: $ac_useropt"
1160    ac_useropt_orig=$ac_useropt
1161    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162    case $ac_user_opts in
1163      *"
1164"enable_$ac_useropt"
1165"*) ;;
1166      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1167	 ac_unrecognized_sep=', ';;
1168    esac
1169    eval enable_$ac_useropt=\$ac_optarg ;;
1170
1171  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1172  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1173  | --exec | --exe | --ex)
1174    ac_prev=exec_prefix ;;
1175  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1176  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1177  | --exec=* | --exe=* | --ex=*)
1178    exec_prefix=$ac_optarg ;;
1179
1180  -gas | --gas | --ga | --g)
1181    # Obsolete; use --with-gas.
1182    with_gas=yes ;;
1183
1184  -help | --help | --hel | --he | -h)
1185    ac_init_help=long ;;
1186  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1187    ac_init_help=recursive ;;
1188  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1189    ac_init_help=short ;;
1190
1191  -host | --host | --hos | --ho)
1192    ac_prev=host_alias ;;
1193  -host=* | --host=* | --hos=* | --ho=*)
1194    host_alias=$ac_optarg ;;
1195
1196  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1197    ac_prev=htmldir ;;
1198  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1199  | --ht=*)
1200    htmldir=$ac_optarg ;;
1201
1202  -includedir | --includedir | --includedi | --included | --include \
1203  | --includ | --inclu | --incl | --inc)
1204    ac_prev=includedir ;;
1205  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1206  | --includ=* | --inclu=* | --incl=* | --inc=*)
1207    includedir=$ac_optarg ;;
1208
1209  -infodir | --infodir | --infodi | --infod | --info | --inf)
1210    ac_prev=infodir ;;
1211  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1212    infodir=$ac_optarg ;;
1213
1214  -libdir | --libdir | --libdi | --libd)
1215    ac_prev=libdir ;;
1216  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1217    libdir=$ac_optarg ;;
1218
1219  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1220  | --libexe | --libex | --libe)
1221    ac_prev=libexecdir ;;
1222  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1223  | --libexe=* | --libex=* | --libe=*)
1224    libexecdir=$ac_optarg ;;
1225
1226  -localedir | --localedir | --localedi | --localed | --locale)
1227    ac_prev=localedir ;;
1228  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1229    localedir=$ac_optarg ;;
1230
1231  -localstatedir | --localstatedir | --localstatedi | --localstated \
1232  | --localstate | --localstat | --localsta | --localst | --locals)
1233    ac_prev=localstatedir ;;
1234  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1235  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1236    localstatedir=$ac_optarg ;;
1237
1238  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1239    ac_prev=mandir ;;
1240  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1241    mandir=$ac_optarg ;;
1242
1243  -nfp | --nfp | --nf)
1244    # Obsolete; use --without-fp.
1245    with_fp=no ;;
1246
1247  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1248  | --no-cr | --no-c | -n)
1249    no_create=yes ;;
1250
1251  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1252  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1253    no_recursion=yes ;;
1254
1255  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1256  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1257  | --oldin | --oldi | --old | --ol | --o)
1258    ac_prev=oldincludedir ;;
1259  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1260  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1261  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1262    oldincludedir=$ac_optarg ;;
1263
1264  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1265    ac_prev=prefix ;;
1266  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1267    prefix=$ac_optarg ;;
1268
1269  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1270  | --program-pre | --program-pr | --program-p)
1271    ac_prev=program_prefix ;;
1272  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1273  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1274    program_prefix=$ac_optarg ;;
1275
1276  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1277  | --program-suf | --program-su | --program-s)
1278    ac_prev=program_suffix ;;
1279  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1280  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1281    program_suffix=$ac_optarg ;;
1282
1283  -program-transform-name | --program-transform-name \
1284  | --program-transform-nam | --program-transform-na \
1285  | --program-transform-n | --program-transform- \
1286  | --program-transform | --program-transfor \
1287  | --program-transfo | --program-transf \
1288  | --program-trans | --program-tran \
1289  | --progr-tra | --program-tr | --program-t)
1290    ac_prev=program_transform_name ;;
1291  -program-transform-name=* | --program-transform-name=* \
1292  | --program-transform-nam=* | --program-transform-na=* \
1293  | --program-transform-n=* | --program-transform-=* \
1294  | --program-transform=* | --program-transfor=* \
1295  | --program-transfo=* | --program-transf=* \
1296  | --program-trans=* | --program-tran=* \
1297  | --progr-tra=* | --program-tr=* | --program-t=*)
1298    program_transform_name=$ac_optarg ;;
1299
1300  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1301    ac_prev=pdfdir ;;
1302  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1303    pdfdir=$ac_optarg ;;
1304
1305  -psdir | --psdir | --psdi | --psd | --ps)
1306    ac_prev=psdir ;;
1307  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1308    psdir=$ac_optarg ;;
1309
1310  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1311  | -silent | --silent | --silen | --sile | --sil)
1312    silent=yes ;;
1313
1314  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1315    ac_prev=sbindir ;;
1316  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1317  | --sbi=* | --sb=*)
1318    sbindir=$ac_optarg ;;
1319
1320  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1321  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1322  | --sharedst | --shareds | --shared | --share | --shar \
1323  | --sha | --sh)
1324    ac_prev=sharedstatedir ;;
1325  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1326  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1327  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1328  | --sha=* | --sh=*)
1329    sharedstatedir=$ac_optarg ;;
1330
1331  -site | --site | --sit)
1332    ac_prev=site ;;
1333  -site=* | --site=* | --sit=*)
1334    site=$ac_optarg ;;
1335
1336  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1337    ac_prev=srcdir ;;
1338  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1339    srcdir=$ac_optarg ;;
1340
1341  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1342  | --syscon | --sysco | --sysc | --sys | --sy)
1343    ac_prev=sysconfdir ;;
1344  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1345  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1346    sysconfdir=$ac_optarg ;;
1347
1348  -target | --target | --targe | --targ | --tar | --ta | --t)
1349    ac_prev=target_alias ;;
1350  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1351    target_alias=$ac_optarg ;;
1352
1353  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1354    verbose=yes ;;
1355
1356  -version | --version | --versio | --versi | --vers | -V)
1357    ac_init_version=: ;;
1358
1359  -with-* | --with-*)
1360    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1361    # Reject names that are not valid shell variable names.
1362    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1363      as_fn_error $? "invalid package name: $ac_useropt"
1364    ac_useropt_orig=$ac_useropt
1365    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1366    case $ac_user_opts in
1367      *"
1368"with_$ac_useropt"
1369"*) ;;
1370      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1371	 ac_unrecognized_sep=', ';;
1372    esac
1373    eval with_$ac_useropt=\$ac_optarg ;;
1374
1375  -without-* | --without-*)
1376    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1377    # Reject names that are not valid shell variable names.
1378    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1379      as_fn_error $? "invalid package name: $ac_useropt"
1380    ac_useropt_orig=$ac_useropt
1381    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1382    case $ac_user_opts in
1383      *"
1384"with_$ac_useropt"
1385"*) ;;
1386      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1387	 ac_unrecognized_sep=', ';;
1388    esac
1389    eval with_$ac_useropt=no ;;
1390
1391  --x)
1392    # Obsolete; use --with-x.
1393    with_x=yes ;;
1394
1395  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1396  | --x-incl | --x-inc | --x-in | --x-i)
1397    ac_prev=x_includes ;;
1398  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1399  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1400    x_includes=$ac_optarg ;;
1401
1402  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1403  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1404    ac_prev=x_libraries ;;
1405  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1406  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1407    x_libraries=$ac_optarg ;;
1408
1409  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1410Try \`$0 --help' for more information"
1411    ;;
1412
1413  *=*)
1414    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1415    # Reject names that are not valid shell variable names.
1416    case $ac_envvar in #(
1417      '' | [0-9]* | *[!_$as_cr_alnum]* )
1418      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1419    esac
1420    eval $ac_envvar=\$ac_optarg
1421    export $ac_envvar ;;
1422
1423  *)
1424    # FIXME: should be removed in autoconf 3.0.
1425    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1426    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1427      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1428    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1429    ;;
1430
1431  esac
1432done
1433
1434if test -n "$ac_prev"; then
1435  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1436  as_fn_error $? "missing argument to $ac_option"
1437fi
1438
1439if test -n "$ac_unrecognized_opts"; then
1440  case $enable_option_checking in
1441    no) ;;
1442    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1443    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1444  esac
1445fi
1446
1447# Check all directory arguments for consistency.
1448for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1449		datadir sysconfdir sharedstatedir localstatedir includedir \
1450		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1451		libdir localedir mandir
1452do
1453  eval ac_val=\$$ac_var
1454  # Remove trailing slashes.
1455  case $ac_val in
1456    */ )
1457      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1458      eval $ac_var=\$ac_val;;
1459  esac
1460  # Be sure to have absolute directory names.
1461  case $ac_val in
1462    [\\/$]* | ?:[\\/]* )  continue;;
1463    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1464  esac
1465  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1466done
1467
1468# There might be people who depend on the old broken behavior: `$host'
1469# used to hold the argument of --host etc.
1470# FIXME: To remove some day.
1471build=$build_alias
1472host=$host_alias
1473target=$target_alias
1474
1475# FIXME: To remove some day.
1476if test "x$host_alias" != x; then
1477  if test "x$build_alias" = x; then
1478    cross_compiling=maybe
1479    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1480    If a cross compiler is detected then cross compile mode will be used" >&2
1481  elif test "x$build_alias" != "x$host_alias"; then
1482    cross_compiling=yes
1483  fi
1484fi
1485
1486ac_tool_prefix=
1487test -n "$host_alias" && ac_tool_prefix=$host_alias-
1488
1489test "$silent" = yes && exec 6>/dev/null
1490
1491
1492ac_pwd=`pwd` && test -n "$ac_pwd" &&
1493ac_ls_di=`ls -di .` &&
1494ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1495  as_fn_error $? "working directory cannot be determined"
1496test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1497  as_fn_error $? "pwd does not report name of working directory"
1498
1499
1500# Find the source files, if location was not specified.
1501if test -z "$srcdir"; then
1502  ac_srcdir_defaulted=yes
1503  # Try the directory containing this script, then the parent directory.
1504  ac_confdir=`$as_dirname -- "$as_myself" ||
1505$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1506	 X"$as_myself" : 'X\(//\)[^/]' \| \
1507	 X"$as_myself" : 'X\(//\)$' \| \
1508	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1509$as_echo X"$as_myself" |
1510    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1511	    s//\1/
1512	    q
1513	  }
1514	  /^X\(\/\/\)[^/].*/{
1515	    s//\1/
1516	    q
1517	  }
1518	  /^X\(\/\/\)$/{
1519	    s//\1/
1520	    q
1521	  }
1522	  /^X\(\/\).*/{
1523	    s//\1/
1524	    q
1525	  }
1526	  s/.*/./; q'`
1527  srcdir=$ac_confdir
1528  if test ! -r "$srcdir/$ac_unique_file"; then
1529    srcdir=..
1530  fi
1531else
1532  ac_srcdir_defaulted=no
1533fi
1534if test ! -r "$srcdir/$ac_unique_file"; then
1535  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1536  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1537fi
1538ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1539ac_abs_confdir=`(
1540	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1541	pwd)`
1542# When building in place, set srcdir=.
1543if test "$ac_abs_confdir" = "$ac_pwd"; then
1544  srcdir=.
1545fi
1546# Remove unnecessary trailing slashes from srcdir.
1547# Double slashes in file names in object file debugging info
1548# mess up M-x gdb in Emacs.
1549case $srcdir in
1550*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1551esac
1552for ac_var in $ac_precious_vars; do
1553  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1554  eval ac_env_${ac_var}_value=\$${ac_var}
1555  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1556  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1557done
1558
1559#
1560# Report the --help message.
1561#
1562if test "$ac_init_help" = "long"; then
1563  # Omit some internal or obsolete options to make the list less imposing.
1564  # This message is too long to be a string in the A/UX 3.1 sh.
1565  cat <<_ACEOF
1566\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1567
1568Usage: $0 [OPTION]... [VAR=VALUE]...
1569
1570To assign environment variables (e.g., CC, CFLAGS...), specify them as
1571VAR=VALUE.  See below for descriptions of some of the useful variables.
1572
1573Defaults for the options are specified in brackets.
1574
1575Configuration:
1576  -h, --help              display this help and exit
1577      --help=short        display options specific to this package
1578      --help=recursive    display the short help of all the included packages
1579  -V, --version           display version information and exit
1580  -q, --quiet, --silent   do not print \`checking ...' messages
1581      --cache-file=FILE   cache test results in FILE [disabled]
1582  -C, --config-cache      alias for \`--cache-file=config.cache'
1583  -n, --no-create         do not create output files
1584      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1585
1586Installation directories:
1587  --prefix=PREFIX         install architecture-independent files in PREFIX
1588                          [$ac_default_prefix]
1589  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1590                          [PREFIX]
1591
1592By default, \`make install' will install all the files in
1593\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1594an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1595for instance \`--prefix=\$HOME'.
1596
1597For better control, use the options below.
1598
1599Fine tuning of the installation directories:
1600  --bindir=DIR            user executables [EPREFIX/bin]
1601  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1602  --libexecdir=DIR        program executables [EPREFIX/libexec]
1603  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1604  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1605  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1606  --libdir=DIR            object code libraries [EPREFIX/lib]
1607  --includedir=DIR        C header files [PREFIX/include]
1608  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1609  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1610  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1611  --infodir=DIR           info documentation [DATAROOTDIR/info]
1612  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1613  --mandir=DIR            man documentation [DATAROOTDIR/man]
1614  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1615  --htmldir=DIR           html documentation [DOCDIR]
1616  --dvidir=DIR            dvi documentation [DOCDIR]
1617  --pdfdir=DIR            pdf documentation [DOCDIR]
1618  --psdir=DIR             ps documentation [DOCDIR]
1619_ACEOF
1620
1621  cat <<\_ACEOF
1622
1623X features:
1624  --x-includes=DIR    X include files are in DIR
1625  --x-libraries=DIR   X library files are in DIR
1626
1627System types:
1628  --build=BUILD     configure for building on BUILD [guessed]
1629  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1630  --target=TARGET   configure for building compilers for TARGET [HOST]
1631_ACEOF
1632fi
1633
1634if test -n "$ac_init_help"; then
1635  case $ac_init_help in
1636     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1637   esac
1638  cat <<\_ACEOF
1639
1640Optional Features:
1641  --disable-option-checking  ignore unrecognized --enable/--with options
1642  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1643  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1644  --enable-debug          set the debug level to fastdebug (shorthand for
1645                          --with-debug-level=fastdebug) [disabled]
1646  --enable-openjdk-only   supress building closed source even if present
1647                          [disabled]
1648  --disable-headful       disable building headful support (graphical UI
1649                          support) [enabled]
1650  --enable-hotspot-test-in-build
1651                          run the Queens test after Hotspot build [disabled]
1652  --enable-unlimited-crypto
1653                          Enable unlimited crypto policy [disabled]
1654  --disable-debug-symbols disable generation of debug symbols [enabled]
1655  --disable-zip-debug-info
1656                          disable zipping of debug-info files [enabled]
1657  --disable-macosx-runtime-support
1658                          disable the use of MacOSX Java runtime support
1659                          framework [enabled]
1660  --disable-static-link-stdc++
1661                          disable static linking of the C++ runtime on Linux
1662                          [enabled]
1663  --enable-sjavac         use sjavac to do fast incremental compiles
1664                          [disabled]
1665  --disable-precompiled-headers
1666                          disable using precompiled headers when compiling C++
1667                          [enabled]
1668  --disable-ccache        disable using ccache to speed up recompilations
1669                          [enabled]
1670
1671Optional Packages:
1672  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1673  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1674  --with-custom-make-dir  use this directory for custom build/make files
1675  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1676                          support it), e.g. --with-target-bits=32 [guessed]
1677  --with-sys-root         pass this sys-root to the compilers and tools (for
1678                          cross-compiling)
1679  --with-tools-dir        search this directory for compilers and tools (for
1680                          cross-compiling)
1681  --with-devkit           use this directory as base for tools-dir and
1682                          sys-root (for cross-compiling)
1683  --with-jdk-variant      JDK variant to build (normal) [normal]
1684  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1685                          client, kernel, zero, zeroshark) [server]
1686  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1687                          [release]
1688  --with-conf-name        use this as the name of the configuration [generated
1689                          from important configuration options]
1690  --with-builddeps-conf   use this configuration file for the builddeps
1691  --with-builddeps-server download and use build dependencies from this server
1692                          url
1693  --with-builddeps-dir    store downloaded build dependencies here
1694                          [/localhome/builddeps]
1695  --with-builddeps-group  chgrp the downloaded build dependencies to this
1696                          group
1697  --with-cacerts-file     specify alternative cacerts file
1698  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1699  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1700                          invocations of the Boot JDK, overriding the default
1701                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1702                          -enableassertions"
1703  --with-add-source-root  for each and every source directory, look in this
1704                          additional source root for the same directory; if it
1705                          exists and have files in it, include it in the build
1706  --with-override-source-root
1707                          for each and every source directory, look in this
1708                          override source root for the same directory; if it
1709                          exists, use that directory instead and ignore the
1710                          directory in the original source root
1711  --with-adds-and-overrides
1712                          use the subdirs 'adds' and 'overrides' in the
1713                          specified directory as add-source-root and
1714                          override-source-root
1715  --with-override-langtools
1716                          use this langtools dir for the build
1717  --with-override-corba   use this corba dir for the build
1718  --with-override-jaxp    use this jaxp dir for the build
1719  --with-override-jaxws   use this jaxws dir for the build
1720  --with-override-hotspot use this hotspot dir for the build
1721  --with-override-jdk     use this jdk dir for the build
1722  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1723                          only) [probed]
1724  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1725  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1726  --with-extra-ldflags    extra flags to be used when linking jdk
1727  --with-x                use the X Window System
1728  --with-cups             specify prefix directory for the cups package
1729                          (expecting the headers under PATH/include)
1730  --with-cups-include     specify directory for the cups include files
1731  --with-freetype         specify prefix directory for the freetype2 package
1732                          (expecting the libraries under PATH/lib and the
1733                          headers under PATH/include)
1734  --with-alsa             specify prefix directory for the alsa package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa-include     specify directory for the alsa include files
1738  --with-alsa-lib         specify directory for the alsa library
1739  --with-zlib             use zlib from build system or OpenJDK source
1740                          (system, bundled) [bundled]
1741  --with-num-cores        number of cores in the build system, e.g.
1742                          --with-num-cores=8 [probed]
1743  --with-memory-size      memory (in MB) available in the build system, e.g.
1744                          --with-memory-size=1024 [probed]
1745  --with-sjavac-server-java
1746                          use this java binary for running the sjavac
1747                          background server [Boot JDK java]
1748  --with-sjavac-server-cores
1749                          use at most this number of concurrent threads on the
1750                          sjavac server [probed]
1751  --with-ccache-dir       where to store ccache files [~/.ccache]
1752
1753Some influential environment variables:
1754  PKG_CONFIG  path to pkg-config utility
1755  CC          C compiler command
1756  CFLAGS      C compiler flags
1757  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1758              nonstandard directory <lib dir>
1759  LIBS        libraries to pass to the linker, e.g. -l<library>
1760  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1761              you have headers in a nonstandard directory <include dir>
1762  CXX         C++ compiler command
1763  CXXFLAGS    C++ compiler flags
1764  OBJC        Objective C compiler command
1765  OBJCFLAGS   Objective C compiler flags
1766  CPP         C preprocessor
1767  CXXCPP      C++ preprocessor
1768  XMKMF       Path to xmkmf, Makefile generator for X Window System
1769  FREETYPE2_CFLAGS
1770              C compiler flags for FREETYPE2, overriding pkg-config
1771  FREETYPE2_LIBS
1772              linker flags for FREETYPE2, overriding pkg-config
1773  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1774  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1775
1776Use these variables to override the choices made by `configure' or to help
1777it to find libraries and programs with nonstandard names/locations.
1778
1779Report bugs to <build-dev@openjdk.java.net>.
1780OpenJDK home page: <http://openjdk.java.net>.
1781_ACEOF
1782ac_status=$?
1783fi
1784
1785if test "$ac_init_help" = "recursive"; then
1786  # If there are subdirs, report their specific --help.
1787  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1788    test -d "$ac_dir" ||
1789      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1790      continue
1791    ac_builddir=.
1792
1793case "$ac_dir" in
1794.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1795*)
1796  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1797  # A ".." for each directory in $ac_dir_suffix.
1798  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1799  case $ac_top_builddir_sub in
1800  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1801  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1802  esac ;;
1803esac
1804ac_abs_top_builddir=$ac_pwd
1805ac_abs_builddir=$ac_pwd$ac_dir_suffix
1806# for backward compatibility:
1807ac_top_builddir=$ac_top_build_prefix
1808
1809case $srcdir in
1810  .)  # We are building in place.
1811    ac_srcdir=.
1812    ac_top_srcdir=$ac_top_builddir_sub
1813    ac_abs_top_srcdir=$ac_pwd ;;
1814  [\\/]* | ?:[\\/]* )  # Absolute name.
1815    ac_srcdir=$srcdir$ac_dir_suffix;
1816    ac_top_srcdir=$srcdir
1817    ac_abs_top_srcdir=$srcdir ;;
1818  *) # Relative name.
1819    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1820    ac_top_srcdir=$ac_top_build_prefix$srcdir
1821    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1822esac
1823ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1824
1825    cd "$ac_dir" || { ac_status=$?; continue; }
1826    # Check for guested configure.
1827    if test -f "$ac_srcdir/configure.gnu"; then
1828      echo &&
1829      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1830    elif test -f "$ac_srcdir/configure"; then
1831      echo &&
1832      $SHELL "$ac_srcdir/configure" --help=recursive
1833    else
1834      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1835    fi || ac_status=$?
1836    cd "$ac_pwd" || { ac_status=$?; break; }
1837  done
1838fi
1839
1840test -n "$ac_init_help" && exit $ac_status
1841if $ac_init_version; then
1842  cat <<\_ACEOF
1843OpenJDK configure jdk8
1844generated by GNU Autoconf 2.67
1845
1846Copyright (C) 2010 Free Software Foundation, Inc.
1847This configure script is free software; the Free Software Foundation
1848gives unlimited permission to copy, distribute and modify it.
1849_ACEOF
1850  exit
1851fi
1852
1853## ------------------------ ##
1854## Autoconf initialization. ##
1855## ------------------------ ##
1856
1857# ac_fn_c_try_compile LINENO
1858# --------------------------
1859# Try to compile conftest.$ac_ext, and return whether this succeeded.
1860ac_fn_c_try_compile ()
1861{
1862  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863  rm -f conftest.$ac_objext
1864  if { { ac_try="$ac_compile"
1865case "(($ac_try" in
1866  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867  *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871  (eval "$ac_compile") 2>conftest.err
1872  ac_status=$?
1873  if test -s conftest.err; then
1874    grep -v '^ *+' conftest.err >conftest.er1
1875    cat conftest.er1 >&5
1876    mv -f conftest.er1 conftest.err
1877  fi
1878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879  test $ac_status = 0; } && {
1880	 test -z "$ac_c_werror_flag" ||
1881	 test ! -s conftest.err
1882       } && test -s conftest.$ac_objext; then :
1883  ac_retval=0
1884else
1885  $as_echo "$as_me: failed program was:" >&5
1886sed 's/^/| /' conftest.$ac_ext >&5
1887
1888	ac_retval=1
1889fi
1890  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1891  as_fn_set_status $ac_retval
1892
1893} # ac_fn_c_try_compile
1894
1895# ac_fn_cxx_try_compile LINENO
1896# ----------------------------
1897# Try to compile conftest.$ac_ext, and return whether this succeeded.
1898ac_fn_cxx_try_compile ()
1899{
1900  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901  rm -f conftest.$ac_objext
1902  if { { ac_try="$ac_compile"
1903case "(($ac_try" in
1904  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905  *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909  (eval "$ac_compile") 2>conftest.err
1910  ac_status=$?
1911  if test -s conftest.err; then
1912    grep -v '^ *+' conftest.err >conftest.er1
1913    cat conftest.er1 >&5
1914    mv -f conftest.er1 conftest.err
1915  fi
1916  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917  test $ac_status = 0; } && {
1918	 test -z "$ac_cxx_werror_flag" ||
1919	 test ! -s conftest.err
1920       } && test -s conftest.$ac_objext; then :
1921  ac_retval=0
1922else
1923  $as_echo "$as_me: failed program was:" >&5
1924sed 's/^/| /' conftest.$ac_ext >&5
1925
1926	ac_retval=1
1927fi
1928  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1929  as_fn_set_status $ac_retval
1930
1931} # ac_fn_cxx_try_compile
1932
1933# ac_fn_objc_try_compile LINENO
1934# -----------------------------
1935# Try to compile conftest.$ac_ext, and return whether this succeeded.
1936ac_fn_objc_try_compile ()
1937{
1938  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939  rm -f conftest.$ac_objext
1940  if { { ac_try="$ac_compile"
1941case "(($ac_try" in
1942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943  *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947  (eval "$ac_compile") 2>conftest.err
1948  ac_status=$?
1949  if test -s conftest.err; then
1950    grep -v '^ *+' conftest.err >conftest.er1
1951    cat conftest.er1 >&5
1952    mv -f conftest.er1 conftest.err
1953  fi
1954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1955  test $ac_status = 0; } && {
1956	 test -z "$ac_objc_werror_flag" ||
1957	 test ! -s conftest.err
1958       } && test -s conftest.$ac_objext; then :
1959  ac_retval=0
1960else
1961  $as_echo "$as_me: failed program was:" >&5
1962sed 's/^/| /' conftest.$ac_ext >&5
1963
1964	ac_retval=1
1965fi
1966  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1967  as_fn_set_status $ac_retval
1968
1969} # ac_fn_objc_try_compile
1970
1971# ac_fn_c_try_cpp LINENO
1972# ----------------------
1973# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1974ac_fn_c_try_cpp ()
1975{
1976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977  if { { ac_try="$ac_cpp conftest.$ac_ext"
1978case "(($ac_try" in
1979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980  *) ac_try_echo=$ac_try;;
1981esac
1982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983$as_echo "$ac_try_echo"; } >&5
1984  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1985  ac_status=$?
1986  if test -s conftest.err; then
1987    grep -v '^ *+' conftest.err >conftest.er1
1988    cat conftest.er1 >&5
1989    mv -f conftest.er1 conftest.err
1990  fi
1991  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992  test $ac_status = 0; } > conftest.i && {
1993	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1994	 test ! -s conftest.err
1995       }; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: failed program was:" >&5
1999sed 's/^/| /' conftest.$ac_ext >&5
2000
2001    ac_retval=1
2002fi
2003  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2004  as_fn_set_status $ac_retval
2005
2006} # ac_fn_c_try_cpp
2007
2008# ac_fn_cxx_try_cpp LINENO
2009# ------------------------
2010# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_cxx_try_cpp ()
2012{
2013  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014  if { { ac_try="$ac_cpp conftest.$ac_ext"
2015case "(($ac_try" in
2016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017  *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2022  ac_status=$?
2023  if test -s conftest.err; then
2024    grep -v '^ *+' conftest.err >conftest.er1
2025    cat conftest.er1 >&5
2026    mv -f conftest.er1 conftest.err
2027  fi
2028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029  test $ac_status = 0; } > conftest.i && {
2030	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2031	 test ! -s conftest.err
2032       }; then :
2033  ac_retval=0
2034else
2035  $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038    ac_retval=1
2039fi
2040  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2041  as_fn_set_status $ac_retval
2042
2043} # ac_fn_cxx_try_cpp
2044
2045# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2046# ---------------------------------------------------------
2047# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2048# the include files in INCLUDES and setting the cache variable VAR
2049# accordingly.
2050ac_fn_cxx_check_header_mongrel ()
2051{
2052  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053  if eval "test \"\${$3+set}\"" = set; then :
2054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2055$as_echo_n "checking for $2... " >&6; }
2056if eval "test \"\${$3+set}\"" = set; then :
2057  $as_echo_n "(cached) " >&6
2058fi
2059eval ac_res=\$$3
2060	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
2062else
2063  # Is the header compilable?
2064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2065$as_echo_n "checking $2 usability... " >&6; }
2066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h.  */
2068$4
2069#include <$2>
2070_ACEOF
2071if ac_fn_cxx_try_compile "$LINENO"; then :
2072  ac_header_compiler=yes
2073else
2074  ac_header_compiler=no
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2078$as_echo "$ac_header_compiler" >&6; }
2079
2080# Is the header present?
2081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2082$as_echo_n "checking $2 presence... " >&6; }
2083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085#include <$2>
2086_ACEOF
2087if ac_fn_cxx_try_cpp "$LINENO"; then :
2088  ac_header_preproc=yes
2089else
2090  ac_header_preproc=no
2091fi
2092rm -f conftest.err conftest.i conftest.$ac_ext
2093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2094$as_echo "$ac_header_preproc" >&6; }
2095
2096# So?  What about this header?
2097case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2098  yes:no: )
2099    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2100$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2101    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2102$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2103    ;;
2104  no:yes:* )
2105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2106$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2107    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2108$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2110$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2111    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2112$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2113    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2114$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2115( $as_echo "## ----------------------------------------- ##
2116## Report this to build-dev@openjdk.java.net ##
2117## ----------------------------------------- ##"
2118     ) | sed "s/^/$as_me: WARNING:     /" >&2
2119    ;;
2120esac
2121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2122$as_echo_n "checking for $2... " >&6; }
2123if eval "test \"\${$3+set}\"" = set; then :
2124  $as_echo_n "(cached) " >&6
2125else
2126  eval "$3=\$ac_header_compiler"
2127fi
2128eval ac_res=\$$3
2129	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2130$as_echo "$ac_res" >&6; }
2131fi
2132  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2133
2134} # ac_fn_cxx_check_header_mongrel
2135
2136# ac_fn_cxx_try_run LINENO
2137# ------------------------
2138# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2139# that executables *can* be run.
2140ac_fn_cxx_try_run ()
2141{
2142  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2143  if { { ac_try="$ac_link"
2144case "(($ac_try" in
2145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2146  *) ac_try_echo=$ac_try;;
2147esac
2148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2149$as_echo "$ac_try_echo"; } >&5
2150  (eval "$ac_link") 2>&5
2151  ac_status=$?
2152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2153  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2154  { { case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159$as_echo "$ac_try_echo"; } >&5
2160  (eval "$ac_try") 2>&5
2161  ac_status=$?
2162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2163  test $ac_status = 0; }; }; then :
2164  ac_retval=0
2165else
2166  $as_echo "$as_me: program exited with status $ac_status" >&5
2167       $as_echo "$as_me: failed program was:" >&5
2168sed 's/^/| /' conftest.$ac_ext >&5
2169
2170       ac_retval=$ac_status
2171fi
2172  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2173  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2174  as_fn_set_status $ac_retval
2175
2176} # ac_fn_cxx_try_run
2177
2178# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2179# ---------------------------------------------------------
2180# Tests whether HEADER exists and can be compiled using the include files in
2181# INCLUDES, setting the cache variable VAR accordingly.
2182ac_fn_cxx_check_header_compile ()
2183{
2184  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
2187if eval "test \"\${$3+set}\"" = set; then :
2188  $as_echo_n "(cached) " >&6
2189else
2190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h.  */
2192$4
2193#include <$2>
2194_ACEOF
2195if ac_fn_cxx_try_compile "$LINENO"; then :
2196  eval "$3=yes"
2197else
2198  eval "$3=no"
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201fi
2202eval ac_res=\$$3
2203	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204$as_echo "$ac_res" >&6; }
2205  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2206
2207} # ac_fn_cxx_check_header_compile
2208
2209# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2210# ----------------------------------------------
2211# Tries to find the compile-time value of EXPR in a program that includes
2212# INCLUDES, setting VAR accordingly. Returns whether the value could be
2213# computed
2214ac_fn_cxx_compute_int ()
2215{
2216  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217  if test "$cross_compiling" = yes; then
2218    # Depending upon the size, compute the lo and hi bounds.
2219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h.  */
2221$4
2222int
2223main ()
2224{
2225static int test_array [1 - 2 * !(($2) >= 0)];
2226test_array [0] = 0
2227
2228  ;
2229  return 0;
2230}
2231_ACEOF
2232if ac_fn_cxx_try_compile "$LINENO"; then :
2233  ac_lo=0 ac_mid=0
2234  while :; do
2235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h.  */
2237$4
2238int
2239main ()
2240{
2241static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242test_array [0] = 0
2243
2244  ;
2245  return 0;
2246}
2247_ACEOF
2248if ac_fn_cxx_try_compile "$LINENO"; then :
2249  ac_hi=$ac_mid; break
2250else
2251  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2252			if test $ac_lo -le $ac_mid; then
2253			  ac_lo= ac_hi=
2254			  break
2255			fi
2256			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259  done
2260else
2261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h.  */
2263$4
2264int
2265main ()
2266{
2267static int test_array [1 - 2 * !(($2) < 0)];
2268test_array [0] = 0
2269
2270  ;
2271  return 0;
2272}
2273_ACEOF
2274if ac_fn_cxx_try_compile "$LINENO"; then :
2275  ac_hi=-1 ac_mid=-1
2276  while :; do
2277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h.  */
2279$4
2280int
2281main ()
2282{
2283static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2284test_array [0] = 0
2285
2286  ;
2287  return 0;
2288}
2289_ACEOF
2290if ac_fn_cxx_try_compile "$LINENO"; then :
2291  ac_lo=$ac_mid; break
2292else
2293  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2294			if test $ac_mid -le $ac_hi; then
2295			  ac_lo= ac_hi=
2296			  break
2297			fi
2298			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301  done
2302else
2303  ac_lo= ac_hi=
2304fi
2305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308# Binary search between lo and hi bounds.
2309while test "x$ac_lo" != "x$ac_hi"; do
2310  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h.  */
2313$4
2314int
2315main ()
2316{
2317static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2318test_array [0] = 0
2319
2320  ;
2321  return 0;
2322}
2323_ACEOF
2324if ac_fn_cxx_try_compile "$LINENO"; then :
2325  ac_hi=$ac_mid
2326else
2327  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330done
2331case $ac_lo in #((
2332?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2333'') ac_retval=1 ;;
2334esac
2335  else
2336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339static long int longval () { return $2; }
2340static unsigned long int ulongval () { return $2; }
2341#include <stdio.h>
2342#include <stdlib.h>
2343int
2344main ()
2345{
2346
2347  FILE *f = fopen ("conftest.val", "w");
2348  if (! f)
2349    return 1;
2350  if (($2) < 0)
2351    {
2352      long int i = longval ();
2353      if (i != ($2))
2354	return 1;
2355      fprintf (f, "%ld", i);
2356    }
2357  else
2358    {
2359      unsigned long int i = ulongval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%lu", i);
2363    }
2364  /* Do not output a trailing newline, as this causes \r\n confusion
2365     on some platforms.  */
2366  return ferror (f) || fclose (f) != 0;
2367
2368  ;
2369  return 0;
2370}
2371_ACEOF
2372if ac_fn_cxx_try_run "$LINENO"; then :
2373  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2374else
2375  ac_retval=1
2376fi
2377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2378  conftest.$ac_objext conftest.beam conftest.$ac_ext
2379rm -f conftest.val
2380
2381  fi
2382  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_cxx_compute_int
2386
2387# ac_fn_cxx_try_link LINENO
2388# -------------------------
2389# Try to link conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_cxx_try_link ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext conftest$ac_exeext
2394  if { { ac_try="$ac_link"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_link") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_cxx_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest$ac_exeext && {
2413	 test "$cross_compiling" = yes ||
2414	 $as_test_x conftest$ac_exeext
2415       }; then :
2416  ac_retval=0
2417else
2418  $as_echo "$as_me: failed program was:" >&5
2419sed 's/^/| /' conftest.$ac_ext >&5
2420
2421	ac_retval=1
2422fi
2423  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2424  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2425  # interfere with the next link command; also delete a directory that is
2426  # left behind by Apple's compiler.  We do this before executing the actions.
2427  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2428  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2429  as_fn_set_status $ac_retval
2430
2431} # ac_fn_cxx_try_link
2432
2433# ac_fn_cxx_check_func LINENO FUNC VAR
2434# ------------------------------------
2435# Tests whether FUNC exists, setting the cache variable VAR accordingly
2436ac_fn_cxx_check_func ()
2437{
2438  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2440$as_echo_n "checking for $2... " >&6; }
2441if eval "test \"\${$3+set}\"" = set; then :
2442  $as_echo_n "(cached) " >&6
2443else
2444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h.  */
2446/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2447   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2448#define $2 innocuous_$2
2449
2450/* System header to define __stub macros and hopefully few prototypes,
2451    which can conflict with char $2 (); below.
2452    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2453    <limits.h> exists even on freestanding compilers.  */
2454
2455#ifdef __STDC__
2456# include <limits.h>
2457#else
2458# include <assert.h>
2459#endif
2460
2461#undef $2
2462
2463/* Override any GCC internal prototype to avoid an error.
2464   Use char because int might match the return type of a GCC
2465   builtin and then its argument prototype would still apply.  */
2466#ifdef __cplusplus
2467extern "C"
2468#endif
2469char $2 ();
2470/* The GNU C library defines this for functions which it implements
2471    to always fail with ENOSYS.  Some functions are actually named
2472    something starting with __ and the normal name is an alias.  */
2473#if defined __stub_$2 || defined __stub___$2
2474choke me
2475#endif
2476
2477int
2478main ()
2479{
2480return $2 ();
2481  ;
2482  return 0;
2483}
2484_ACEOF
2485if ac_fn_cxx_try_link "$LINENO"; then :
2486  eval "$3=yes"
2487else
2488  eval "$3=no"
2489fi
2490rm -f core conftest.err conftest.$ac_objext \
2491    conftest$ac_exeext conftest.$ac_ext
2492fi
2493eval ac_res=\$$3
2494	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2497
2498} # ac_fn_cxx_check_func
2499
2500# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2501# -------------------------------------------------------
2502# Tests whether HEADER exists and can be compiled using the include files in
2503# INCLUDES, setting the cache variable VAR accordingly.
2504ac_fn_c_check_header_compile ()
2505{
2506  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2508$as_echo_n "checking for $2... " >&6; }
2509if eval "test \"\${$3+set}\"" = set; then :
2510  $as_echo_n "(cached) " >&6
2511else
2512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2513/* end confdefs.h.  */
2514$4
2515#include <$2>
2516_ACEOF
2517if ac_fn_c_try_compile "$LINENO"; then :
2518  eval "$3=yes"
2519else
2520  eval "$3=no"
2521fi
2522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2523fi
2524eval ac_res=\$$3
2525	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2526$as_echo "$ac_res" >&6; }
2527  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2528
2529} # ac_fn_c_check_header_compile
2530cat >config.log <<_ACEOF
2531This file contains any messages produced by compilers while
2532running configure, to aid debugging if configure makes a mistake.
2533
2534It was created by OpenJDK $as_me jdk8, which was
2535generated by GNU Autoconf 2.67.  Invocation command line was
2536
2537  $ $0 $@
2538
2539_ACEOF
2540exec 5>>config.log
2541{
2542cat <<_ASUNAME
2543## --------- ##
2544## Platform. ##
2545## --------- ##
2546
2547hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2548uname -m = `(uname -m) 2>/dev/null || echo unknown`
2549uname -r = `(uname -r) 2>/dev/null || echo unknown`
2550uname -s = `(uname -s) 2>/dev/null || echo unknown`
2551uname -v = `(uname -v) 2>/dev/null || echo unknown`
2552
2553/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2554/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2555
2556/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2557/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2558/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2559/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2560/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2561/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2562/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2563
2564_ASUNAME
2565
2566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2567for as_dir in $PATH
2568do
2569  IFS=$as_save_IFS
2570  test -z "$as_dir" && as_dir=.
2571    $as_echo "PATH: $as_dir"
2572  done
2573IFS=$as_save_IFS
2574
2575} >&5
2576
2577cat >&5 <<_ACEOF
2578
2579
2580## ----------- ##
2581## Core tests. ##
2582## ----------- ##
2583
2584_ACEOF
2585
2586
2587# Keep a trace of the command line.
2588# Strip out --no-create and --no-recursion so they do not pile up.
2589# Strip out --silent because we don't want to record it for future runs.
2590# Also quote any args containing shell meta-characters.
2591# Make two passes to allow for proper duplicate-argument suppression.
2592ac_configure_args=
2593ac_configure_args0=
2594ac_configure_args1=
2595ac_must_keep_next=false
2596for ac_pass in 1 2
2597do
2598  for ac_arg
2599  do
2600    case $ac_arg in
2601    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2602    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2603    | -silent | --silent | --silen | --sile | --sil)
2604      continue ;;
2605    *\'*)
2606      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2607    esac
2608    case $ac_pass in
2609    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2610    2)
2611      as_fn_append ac_configure_args1 " '$ac_arg'"
2612      if test $ac_must_keep_next = true; then
2613	ac_must_keep_next=false # Got value, back to normal.
2614      else
2615	case $ac_arg in
2616	  *=* | --config-cache | -C | -disable-* | --disable-* \
2617	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2618	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2619	  | -with-* | --with-* | -without-* | --without-* | --x)
2620	    case "$ac_configure_args0 " in
2621	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2622	    esac
2623	    ;;
2624	  -* ) ac_must_keep_next=true ;;
2625	esac
2626      fi
2627      as_fn_append ac_configure_args " '$ac_arg'"
2628      ;;
2629    esac
2630  done
2631done
2632{ ac_configure_args0=; unset ac_configure_args0;}
2633{ ac_configure_args1=; unset ac_configure_args1;}
2634
2635# When interrupted or exit'd, cleanup temporary files, and complete
2636# config.log.  We remove comments because anyway the quotes in there
2637# would cause problems or look ugly.
2638# WARNING: Use '\'' to represent an apostrophe within the trap.
2639# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2640trap 'exit_status=$?
2641  # Save into config.log some information that might help in debugging.
2642  {
2643    echo
2644
2645    $as_echo "## ---------------- ##
2646## Cache variables. ##
2647## ---------------- ##"
2648    echo
2649    # The following way of writing the cache mishandles newlines in values,
2650(
2651  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2652    eval ac_val=\$$ac_var
2653    case $ac_val in #(
2654    *${as_nl}*)
2655      case $ac_var in #(
2656      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2657$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2658      esac
2659      case $ac_var in #(
2660      _ | IFS | as_nl) ;; #(
2661      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2662      *) { eval $ac_var=; unset $ac_var;} ;;
2663      esac ;;
2664    esac
2665  done
2666  (set) 2>&1 |
2667    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2668    *${as_nl}ac_space=\ *)
2669      sed -n \
2670	"s/'\''/'\''\\\\'\'''\''/g;
2671	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2672      ;; #(
2673    *)
2674      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2675      ;;
2676    esac |
2677    sort
2678)
2679    echo
2680
2681    $as_echo "## ----------------- ##
2682## Output variables. ##
2683## ----------------- ##"
2684    echo
2685    for ac_var in $ac_subst_vars
2686    do
2687      eval ac_val=\$$ac_var
2688      case $ac_val in
2689      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2690      esac
2691      $as_echo "$ac_var='\''$ac_val'\''"
2692    done | sort
2693    echo
2694
2695    if test -n "$ac_subst_files"; then
2696      $as_echo "## ------------------- ##
2697## File substitutions. ##
2698## ------------------- ##"
2699      echo
2700      for ac_var in $ac_subst_files
2701      do
2702	eval ac_val=\$$ac_var
2703	case $ac_val in
2704	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2705	esac
2706	$as_echo "$ac_var='\''$ac_val'\''"
2707      done | sort
2708      echo
2709    fi
2710
2711    if test -s confdefs.h; then
2712      $as_echo "## ----------- ##
2713## confdefs.h. ##
2714## ----------- ##"
2715      echo
2716      cat confdefs.h
2717      echo
2718    fi
2719    test "$ac_signal" != 0 &&
2720      $as_echo "$as_me: caught signal $ac_signal"
2721    $as_echo "$as_me: exit $exit_status"
2722  } >&5
2723  rm -f core *.core core.conftest.* &&
2724    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2725    exit $exit_status
2726' 0
2727for ac_signal in 1 2 13 15; do
2728  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2729done
2730ac_signal=0
2731
2732# confdefs.h avoids OS command line length limits that DEFS can exceed.
2733rm -f -r conftest* confdefs.h
2734
2735$as_echo "/* confdefs.h */" > confdefs.h
2736
2737# Predefined preprocessor variables.
2738
2739cat >>confdefs.h <<_ACEOF
2740#define PACKAGE_NAME "$PACKAGE_NAME"
2741_ACEOF
2742
2743cat >>confdefs.h <<_ACEOF
2744#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2745_ACEOF
2746
2747cat >>confdefs.h <<_ACEOF
2748#define PACKAGE_VERSION "$PACKAGE_VERSION"
2749_ACEOF
2750
2751cat >>confdefs.h <<_ACEOF
2752#define PACKAGE_STRING "$PACKAGE_STRING"
2753_ACEOF
2754
2755cat >>confdefs.h <<_ACEOF
2756#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2757_ACEOF
2758
2759cat >>confdefs.h <<_ACEOF
2760#define PACKAGE_URL "$PACKAGE_URL"
2761_ACEOF
2762
2763
2764# Let the site file select an alternate cache file if it wants to.
2765# Prefer an explicitly selected file to automatically selected ones.
2766ac_site_file1=NONE
2767ac_site_file2=NONE
2768if test -n "$CONFIG_SITE"; then
2769  # We do not want a PATH search for config.site.
2770  case $CONFIG_SITE in #((
2771    -*)  ac_site_file1=./$CONFIG_SITE;;
2772    */*) ac_site_file1=$CONFIG_SITE;;
2773    *)   ac_site_file1=./$CONFIG_SITE;;
2774  esac
2775elif test "x$prefix" != xNONE; then
2776  ac_site_file1=$prefix/share/config.site
2777  ac_site_file2=$prefix/etc/config.site
2778else
2779  ac_site_file1=$ac_default_prefix/share/config.site
2780  ac_site_file2=$ac_default_prefix/etc/config.site
2781fi
2782for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2783do
2784  test "x$ac_site_file" = xNONE && continue
2785  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2786    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2787$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2788    sed 's/^/| /' "$ac_site_file" >&5
2789    . "$ac_site_file" \
2790      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2792as_fn_error $? "failed to load site script $ac_site_file
2793See \`config.log' for more details" "$LINENO" 5 ; }
2794  fi
2795done
2796
2797if test -r "$cache_file"; then
2798  # Some versions of bash will fail to source /dev/null (special files
2799  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2800  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2801    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2802$as_echo "$as_me: loading cache $cache_file" >&6;}
2803    case $cache_file in
2804      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2805      *)                      . "./$cache_file";;
2806    esac
2807  fi
2808else
2809  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2810$as_echo "$as_me: creating cache $cache_file" >&6;}
2811  >$cache_file
2812fi
2813
2814# Check that the precious variables saved in the cache have kept the same
2815# value.
2816ac_cache_corrupted=false
2817for ac_var in $ac_precious_vars; do
2818  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2819  eval ac_new_set=\$ac_env_${ac_var}_set
2820  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2821  eval ac_new_val=\$ac_env_${ac_var}_value
2822  case $ac_old_set,$ac_new_set in
2823    set,)
2824      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2825$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2826      ac_cache_corrupted=: ;;
2827    ,set)
2828      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2829$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2830      ac_cache_corrupted=: ;;
2831    ,);;
2832    *)
2833      if test "x$ac_old_val" != "x$ac_new_val"; then
2834	# differences in whitespace do not lead to failure.
2835	ac_old_val_w=`echo x $ac_old_val`
2836	ac_new_val_w=`echo x $ac_new_val`
2837	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2838	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2839$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2840	  ac_cache_corrupted=:
2841	else
2842	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2843$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2844	  eval $ac_var=\$ac_old_val
2845	fi
2846	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2847$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2848	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2849$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2850      fi;;
2851  esac
2852  # Pass precious variables to config.status.
2853  if test "$ac_new_set" = set; then
2854    case $ac_new_val in
2855    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2856    *) ac_arg=$ac_var=$ac_new_val ;;
2857    esac
2858    case " $ac_configure_args " in
2859      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2860      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2861    esac
2862  fi
2863done
2864if $ac_cache_corrupted; then
2865  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2868$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2869  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2870fi
2871## -------------------- ##
2872## Main body of script. ##
2873## -------------------- ##
2874
2875ac_ext=c
2876ac_cpp='$CPP $CPPFLAGS'
2877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2879ac_compiler_gnu=$ac_cv_c_compiler_gnu
2880
2881
2882
2883ac_aux_dir=
2884for ac_dir in build-aux "$srcdir"/build-aux; do
2885  if test -f "$ac_dir/install-sh"; then
2886    ac_aux_dir=$ac_dir
2887    ac_install_sh="$ac_aux_dir/install-sh -c"
2888    break
2889  elif test -f "$ac_dir/install.sh"; then
2890    ac_aux_dir=$ac_dir
2891    ac_install_sh="$ac_aux_dir/install.sh -c"
2892    break
2893  elif test -f "$ac_dir/shtool"; then
2894    ac_aux_dir=$ac_dir
2895    ac_install_sh="$ac_aux_dir/shtool install -c"
2896    break
2897  fi
2898done
2899if test -z "$ac_aux_dir"; then
2900  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2901fi
2902
2903# These three variables are undocumented and unsupported,
2904# and are intended to be withdrawn in a future Autoconf release.
2905# They can cause serious problems if a builder's source tree is in a directory
2906# whose full name contains unusual characters.
2907ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2908ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2909ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2910
2911
2912# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2913#
2914# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2915#
2916# This program is free software; you can redistribute it and/or modify
2917# it under the terms of the GNU General Public License as published by
2918# the Free Software Foundation; either version 2 of the License, or
2919# (at your option) any later version.
2920#
2921# This program is distributed in the hope that it will be useful, but
2922# WITHOUT ANY WARRANTY; without even the implied warranty of
2923# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2924# General Public License for more details.
2925#
2926# You should have received a copy of the GNU General Public License
2927# along with this program; if not, write to the Free Software
2928# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2929#
2930# As a special exception to the GNU General Public License, if you
2931# distribute this file as part of a program that contains a
2932# configuration script generated by Autoconf, you may include it under
2933# the same distribution terms that you use for the rest of that program.
2934
2935# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2936# ----------------------------------
2937# PKG_PROG_PKG_CONFIG
2938
2939# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2940#
2941# Check to see whether a particular set of modules exists.  Similar
2942# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2943#
2944#
2945# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2946# this or PKG_CHECK_MODULES is called, or make sure to call
2947# PKG_CHECK_EXISTS manually
2948# --------------------------------------------------------------
2949
2950
2951
2952# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2953# ---------------------------------------------
2954# _PKG_CONFIG
2955
2956# _PKG_SHORT_ERRORS_SUPPORTED
2957# -----------------------------
2958# _PKG_SHORT_ERRORS_SUPPORTED
2959
2960
2961# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2962# [ACTION-IF-NOT-FOUND])
2963#
2964#
2965# Note that if there is a possibility the first call to
2966# PKG_CHECK_MODULES might not happen, you should be sure to include an
2967# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2968#
2969#
2970# --------------------------------------------------------------
2971# PKG_CHECK_MODULES
2972
2973
2974# Include these first...
2975#
2976# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2978#
2979# This code is free software; you can redistribute it and/or modify it
2980# under the terms of the GNU General Public License version 2 only, as
2981# published by the Free Software Foundation.  Oracle designates this
2982# particular file as subject to the "Classpath" exception as provided
2983# by Oracle in the LICENSE file that accompanied this code.
2984#
2985# This code is distributed in the hope that it will be useful, but WITHOUT
2986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2988# version 2 for more details (a copy is included in the LICENSE file that
2989# accompanied this code).
2990#
2991# You should have received a copy of the GNU General Public License version
2992# 2 along with this work; if not, write to the Free Software Foundation,
2993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2994#
2995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2996# or visit www.oracle.com if you need additional information or have any
2997# questions.
2998#
2999
3000
3001
3002# This will make sure the given variable points to a full and proper
3003# path. This means:
3004# 1) There will be no spaces in the path. On posix platforms,
3005#    spaces in the path will result in an error. On Windows,
3006#    the path will be rewritten using short-style to be space-free.
3007# 2) The path will be absolute, and it will be in unix-style (on
3008#     cygwin).
3009# $1: The name of the variable to fix
3010
3011
3012# This will make sure the given variable points to a executable
3013# with a full and proper path. This means:
3014# 1) There will be no spaces in the path. On posix platforms,
3015#    spaces in the path will result in an error. On Windows,
3016#    the path will be rewritten using short-style to be space-free.
3017# 2) The path will be absolute, and it will be in unix-style (on
3018#     cygwin).
3019# Any arguments given to the executable is preserved.
3020# If the input variable does not have a directory specification, then
3021# it need to be in the PATH.
3022# $1: The name of the variable to fix
3023
3024
3025
3026
3027
3028
3029# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3030# $1: variable to check
3031# $2: executable name to print in warning (optional)
3032
3033
3034# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3035# Arguments as AC_PATH_PROG:
3036# $1: variable to set
3037# $2: executable name to look for
3038
3039
3040# Setup the most fundamental tools that relies on not much else to set up,
3041# but is used by much of the early bootstrap code.
3042
3043
3044# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3045
3046
3047
3048
3049
3050
3051
3052#%%% Simple tools %%%
3053
3054# Check if we have found a usable version of make
3055# $1: the path to a potential make binary (or empty)
3056# $2: the description on how we found this
3057
3058
3059# Goes looking for a usable version of GNU make.
3060
3061
3062
3063
3064
3065
3066# Check if build directory is on local disk. If not possible to determine,
3067# we prefer to claim it's local.
3068# Argument 1: directory to test
3069# Argument 2: what to do if it is on local disk
3070# Argument 3: what to do otherwise (remote disk or failure)
3071
3072
3073
3074
3075#
3076# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3077# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3078#
3079# This code is free software; you can redistribute it and/or modify it
3080# under the terms of the GNU General Public License version 2 only, as
3081# published by the Free Software Foundation.  Oracle designates this
3082# particular file as subject to the "Classpath" exception as provided
3083# by Oracle in the LICENSE file that accompanied this code.
3084#
3085# This code is distributed in the hope that it will be useful, but WITHOUT
3086# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3087# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3088# version 2 for more details (a copy is included in the LICENSE file that
3089# accompanied this code).
3090#
3091# You should have received a copy of the GNU General Public License version
3092# 2 along with this work; if not, write to the Free Software Foundation,
3093# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3094#
3095# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3096# or visit www.oracle.com if you need additional information or have any
3097# questions.
3098#
3099
3100
3101
3102
3103
3104# Helper function which possibly converts a path using DOS-style short mode.
3105# If so, the updated path is stored in $new_path.
3106# $1: The path to check
3107
3108
3109# Helper function which possibly converts a path using DOS-style short mode.
3110# If so, the updated path is stored in $new_path.
3111# $1: The path to check
3112
3113
3114# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3115# and could probably be heavily simplified. However, all changes in this
3116# area tend to need lot of testing in different scenarios, and in lack of
3117# proper unit testing, cleaning this up has not been deemed worth the effort
3118# at the moment.
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129
3130
3131
3132
3133#
3134# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3135# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3136#
3137# This code is free software; you can redistribute it and/or modify it
3138# under the terms of the GNU General Public License version 2 only, as
3139# published by the Free Software Foundation.  Oracle designates this
3140# particular file as subject to the "Classpath" exception as provided
3141# by Oracle in the LICENSE file that accompanied this code.
3142#
3143# This code is distributed in the hope that it will be useful, but WITHOUT
3144# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3145# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3146# version 2 for more details (a copy is included in the LICENSE file that
3147# accompanied this code).
3148#
3149# You should have received a copy of the GNU General Public License version
3150# 2 along with this work; if not, write to the Free Software Foundation,
3151# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3152#
3153# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3154# or visit www.oracle.com if you need additional information or have any
3155# questions.
3156#
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168# ... then the rest
3169#
3170# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3171# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3172#
3173# This code is free software; you can redistribute it and/or modify it
3174# under the terms of the GNU General Public License version 2 only, as
3175# published by the Free Software Foundation.  Oracle designates this
3176# particular file as subject to the "Classpath" exception as provided
3177# by Oracle in the LICENSE file that accompanied this code.
3178#
3179# This code is distributed in the hope that it will be useful, but WITHOUT
3180# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3181# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3182# version 2 for more details (a copy is included in the LICENSE file that
3183# accompanied this code).
3184#
3185# You should have received a copy of the GNU General Public License version
3186# 2 along with this work; if not, write to the Free Software Foundation,
3187# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3188#
3189# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3190# or visit www.oracle.com if you need additional information or have any
3191# questions.
3192#
3193
3194# Execute the check given as argument, and verify the result
3195# If the Boot JDK was previously found, do nothing
3196# $1 A command line (typically autoconf macro) to execute
3197
3198
3199# Test: Is bootjdk explicitely set by command line arguments?
3200
3201
3202# Test: Is bootjdk available from builddeps?
3203
3204
3205# Test: Is $JAVA_HOME set?
3206
3207
3208# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3209
3210
3211# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3212
3213
3214# Look for a jdk in the given path. If there are multiple, try to select the newest.
3215# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3216# $1 = Path to directory containing jdk installations.
3217# $2 = String to append to the found JDK directory to get the proper JDK home
3218
3219
3220# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3221# environmental variable as base for where to look.
3222# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3223
3224
3225# Test: Is there a JDK installed in default, well-known locations?
3226
3227
3228# Check that a command-line tool in the Boot JDK is correct
3229# $1 = name of variable to assign
3230# $2 = name of binary
3231
3232
3233###############################################################################
3234#
3235# We need a Boot JDK to bootstrap the build.
3236#
3237
3238
3239
3240
3241
3242#
3243# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3244# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3245#
3246# This code is free software; you can redistribute it and/or modify it
3247# under the terms of the GNU General Public License version 2 only, as
3248# published by the Free Software Foundation.  Oracle designates this
3249# particular file as subject to the "Classpath" exception as provided
3250# by Oracle in the LICENSE file that accompanied this code.
3251#
3252# This code is distributed in the hope that it will be useful, but WITHOUT
3253# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3254# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3255# version 2 for more details (a copy is included in the LICENSE file that
3256# accompanied this code).
3257#
3258# You should have received a copy of the GNU General Public License version
3259# 2 along with this work; if not, write to the Free Software Foundation,
3260# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3261#
3262# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3263# or visit www.oracle.com if you need additional information or have any
3264# questions.
3265#
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284#
3285# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309
3310
3311
3312
3313cygwin_help() {
3314    case $1 in
3315    unzip)
3316        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3317    zip)
3318        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3319    make)
3320        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3321    * )
3322       break ;;
3323    esac
3324}
3325
3326apt_help() {
3327    case $1 in
3328    devkit)
3329        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3330    openjdk)
3331        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3332    alsa)
3333        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3334    cups)
3335        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3336    freetype2)
3337        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3338    pulse)
3339        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3340    x11)
3341        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3342    ccache)
3343        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3344    * )
3345       break ;;
3346    esac
3347}
3348
3349yum_help() {
3350    case $1 in
3351    devkit)
3352        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3353    openjdk)
3354        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3355    alsa)
3356        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3357    cups)
3358        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3359    freetype2)
3360        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3361    pulse)
3362        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3363    x11)
3364        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3365    ccache)
3366        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3367    * )
3368       break ;;
3369    esac
3370}
3371
3372port_help() {
3373    PKGHANDLER_COMMAND=""
3374}
3375
3376pkgutil_help() {
3377    PKGHANDLER_COMMAND=""
3378}
3379
3380pkgadd_help() {
3381    PKGHANDLER_COMMAND=""
3382}
3383
3384
3385
3386#
3387# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3389#
3390# This code is free software; you can redistribute it and/or modify it
3391# under the terms of the GNU General Public License version 2 only, as
3392# published by the Free Software Foundation.  Oracle designates this
3393# particular file as subject to the "Classpath" exception as provided
3394# by Oracle in the LICENSE file that accompanied this code.
3395#
3396# This code is distributed in the hope that it will be useful, but WITHOUT
3397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3399# version 2 for more details (a copy is included in the LICENSE file that
3400# accompanied this code).
3401#
3402# You should have received a copy of the GNU General Public License version
3403# 2 along with this work; if not, write to the Free Software Foundation,
3404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3405#
3406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3407# or visit www.oracle.com if you need additional information or have any
3408# questions.
3409#
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425# Support for customization of the build process. Some build files
3426# will include counterparts from this location, if they exist. This allows
3427# for a degree of customization of the build targets and the rules/recipes
3428# to create them
3429
3430# Check whether --with-custom-make-dir was given.
3431if test "${with_custom_make_dir+set}" = set; then :
3432  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3433fi
3434
3435
3436
3437#
3438# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3439# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3440#
3441# This code is free software; you can redistribute it and/or modify it
3442# under the terms of the GNU General Public License version 2 only, as
3443# published by the Free Software Foundation.  Oracle designates this
3444# particular file as subject to the "Classpath" exception as provided
3445# by Oracle in the LICENSE file that accompanied this code.
3446#
3447# This code is distributed in the hope that it will be useful, but WITHOUT
3448# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3449# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3450# version 2 for more details (a copy is included in the LICENSE file that
3451# accompanied this code).
3452#
3453# You should have received a copy of the GNU General Public License version
3454# 2 along with this work; if not, write to the Free Software Foundation,
3455# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3456#
3457# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3458# or visit www.oracle.com if you need additional information or have any
3459# questions.
3460#
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3502# Converts autoconf style CPU name to OpenJDK style, into
3503# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3504
3505
3506# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3507# Converts autoconf style OS name to OpenJDK style, into
3508# VAR_OS and VAR_OS_API.
3509
3510
3511# Expects $host_os $host_cpu $build_os and $build_cpu
3512# and $with_target_bits to have been setup!
3513#
3514# Translate the standard triplet(quadruplet) definition
3515# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3516# OPENJDK_BUILD_OS, etc.
3517
3518
3519# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3520# accordingly. Must be done after setting up build and target system, but before
3521# doing anything else with these values.
3522
3523
3524    # Setup the legacy variables, for controlling the old makefiles.
3525    #
3526
3527
3528
3529
3530#%%% Build and target systems %%%
3531
3532
3533
3534
3535# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3536# Add -mX to various FLAGS variables.
3537
3538
3539
3540
3541
3542
3543#
3544# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568
3569
3570
3571
3572
3573
3574
3575#
3576# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3577# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3578#
3579# This code is free software; you can redistribute it and/or modify it
3580# under the terms of the GNU General Public License version 2 only, as
3581# published by the Free Software Foundation.  Oracle designates this
3582# particular file as subject to the "Classpath" exception as provided
3583# by Oracle in the LICENSE file that accompanied this code.
3584#
3585# This code is distributed in the hope that it will be useful, but WITHOUT
3586# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3587# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3588# version 2 for more details (a copy is included in the LICENSE file that
3589# accompanied this code).
3590#
3591# You should have received a copy of the GNU General Public License version
3592# 2 along with this work; if not, write to the Free Software Foundation,
3593# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3594#
3595# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3596# or visit www.oracle.com if you need additional information or have any
3597# questions.
3598#
3599
3600# $1 = compiler to test (CC or CXX)
3601# $2 = human readable name of compiler (C or C++)
3602
3603
3604
3605
3606
3607# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609# $3 = list of compiler names to search for
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622#
3623# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625#
3626# This code is free software; you can redistribute it and/or modify it
3627# under the terms of the GNU General Public License version 2 only, as
3628# published by the Free Software Foundation.  Oracle designates this
3629# particular file as subject to the "Classpath" exception as provided
3630# by Oracle in the LICENSE file that accompanied this code.
3631#
3632# This code is distributed in the hope that it will be useful, but WITHOUT
3633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635# version 2 for more details (a copy is included in the LICENSE file that
3636# accompanied this code).
3637#
3638# You should have received a copy of the GNU General Public License version
3639# 2 along with this work; if not, write to the Free Software Foundation,
3640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641#
3642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643# or visit www.oracle.com if you need additional information or have any
3644# questions.
3645#
3646
3647
3648
3649
3650
3651
3652
3653# Check if the VS env variables were setup prior to running configure.
3654# If not, then find vcvarsall.bat and run it automatically, and integrate
3655# the set env variables into the spec file.
3656
3657
3658
3659
3660
3661
3662# This line needs to be here, verbatim, after all includes and the dummy hook
3663# definitions. It is replaced with custom functionality when building
3664# custom sources.
3665#CUSTOM_AUTOCONF_INCLUDE
3666
3667# Do not change or remove the following line, it is needed for consistency checks:
3668DATE_WHEN_GENERATED=1351539315
3669
3670###############################################################################
3671#
3672# Initialization / Boot-strapping
3673#
3674# The bootstrapping process needs to solve the "chicken or the egg" problem,
3675# thus it jumps back and forth, each time gaining something needed later on.
3676#
3677###############################################################################
3678
3679# Basic initialization that must happen first of all
3680
3681# Save the original command line. This is passed to us by the wrapper configure script.
3682
3683DATE_WHEN_CONFIGURED=`LANG=C date`
3684
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3686$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3688$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3689
3690
3691
3692# Start with tools that do not need have cross compilation support
3693# and can be expected to be found in the default PATH. These tools are
3694# used by configure. Nor are these tools expected to be found in the
3695# devkit from the builddeps server either, since they are
3696# needed to download the devkit.
3697
3698# First are all the simple required tools.
3699
3700    for ac_prog in basename
3701do
3702  # Extract the first word of "$ac_prog", so it can be a program name with args.
3703set dummy $ac_prog; ac_word=$2
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
3706if test "${ac_cv_path_BASENAME+set}" = set; then :
3707  $as_echo_n "(cached) " >&6
3708else
3709  case $BASENAME in
3710  [\\/]* | ?:[\\/]*)
3711  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3712  ;;
3713  *)
3714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715for as_dir in $PATH
3716do
3717  IFS=$as_save_IFS
3718  test -z "$as_dir" && as_dir=.
3719    for ac_exec_ext in '' $ac_executable_extensions; do
3720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3721    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3723    break 2
3724  fi
3725done
3726  done
3727IFS=$as_save_IFS
3728
3729  ;;
3730esac
3731fi
3732BASENAME=$ac_cv_path_BASENAME
3733if test -n "$BASENAME"; then
3734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3735$as_echo "$BASENAME" >&6; }
3736else
3737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738$as_echo "no" >&6; }
3739fi
3740
3741
3742  test -n "$BASENAME" && break
3743done
3744
3745
3746    if test "x$BASENAME" = x; then
3747        if test "xbasename" = x; then
3748          PROG_NAME=basename
3749        else
3750          PROG_NAME=basename
3751        fi
3752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3753$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3754        as_fn_error $? "Cannot continue" "$LINENO" 5
3755    fi
3756
3757
3758
3759    for ac_prog in bash
3760do
3761  # Extract the first word of "$ac_prog", so it can be a program name with args.
3762set dummy $ac_prog; ac_word=$2
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3764$as_echo_n "checking for $ac_word... " >&6; }
3765if test "${ac_cv_path_BASH+set}" = set; then :
3766  $as_echo_n "(cached) " >&6
3767else
3768  case $BASH in
3769  [\\/]* | ?:[\\/]*)
3770  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3771  ;;
3772  *)
3773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776  IFS=$as_save_IFS
3777  test -z "$as_dir" && as_dir=.
3778    for ac_exec_ext in '' $ac_executable_extensions; do
3779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3780    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3782    break 2
3783  fi
3784done
3785  done
3786IFS=$as_save_IFS
3787
3788  ;;
3789esac
3790fi
3791BASH=$ac_cv_path_BASH
3792if test -n "$BASH"; then
3793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3794$as_echo "$BASH" >&6; }
3795else
3796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
3798fi
3799
3800
3801  test -n "$BASH" && break
3802done
3803
3804
3805    if test "x$BASH" = x; then
3806        if test "xbash" = x; then
3807          PROG_NAME=bash
3808        else
3809          PROG_NAME=bash
3810        fi
3811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3813        as_fn_error $? "Cannot continue" "$LINENO" 5
3814    fi
3815
3816
3817
3818    for ac_prog in cat
3819do
3820  # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
3824if test "${ac_cv_path_CAT+set}" = set; then :
3825  $as_echo_n "(cached) " >&6
3826else
3827  case $CAT in
3828  [\\/]* | ?:[\\/]*)
3829  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3830  ;;
3831  *)
3832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835  IFS=$as_save_IFS
3836  test -z "$as_dir" && as_dir=.
3837    for ac_exec_ext in '' $ac_executable_extensions; do
3838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3839    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841    break 2
3842  fi
3843done
3844  done
3845IFS=$as_save_IFS
3846
3847  ;;
3848esac
3849fi
3850CAT=$ac_cv_path_CAT
3851if test -n "$CAT"; then
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3853$as_echo "$CAT" >&6; }
3854else
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
3857fi
3858
3859
3860  test -n "$CAT" && break
3861done
3862
3863
3864    if test "x$CAT" = x; then
3865        if test "xcat" = x; then
3866          PROG_NAME=cat
3867        else
3868          PROG_NAME=cat
3869        fi
3870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3872        as_fn_error $? "Cannot continue" "$LINENO" 5
3873    fi
3874
3875
3876
3877    for ac_prog in chmod
3878do
3879  # Extract the first word of "$ac_prog", so it can be a program name with args.
3880set dummy $ac_prog; ac_word=$2
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882$as_echo_n "checking for $ac_word... " >&6; }
3883if test "${ac_cv_path_CHMOD+set}" = set; then :
3884  $as_echo_n "(cached) " >&6
3885else
3886  case $CHMOD in
3887  [\\/]* | ?:[\\/]*)
3888  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3889  ;;
3890  *)
3891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894  IFS=$as_save_IFS
3895  test -z "$as_dir" && as_dir=.
3896    for ac_exec_ext in '' $ac_executable_extensions; do
3897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3898    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3900    break 2
3901  fi
3902done
3903  done
3904IFS=$as_save_IFS
3905
3906  ;;
3907esac
3908fi
3909CHMOD=$ac_cv_path_CHMOD
3910if test -n "$CHMOD"; then
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3912$as_echo "$CHMOD" >&6; }
3913else
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919  test -n "$CHMOD" && break
3920done
3921
3922
3923    if test "x$CHMOD" = x; then
3924        if test "xchmod" = x; then
3925          PROG_NAME=chmod
3926        else
3927          PROG_NAME=chmod
3928        fi
3929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3931        as_fn_error $? "Cannot continue" "$LINENO" 5
3932    fi
3933
3934
3935
3936    for ac_prog in cmp
3937do
3938  # Extract the first word of "$ac_prog", so it can be a program name with args.
3939set dummy $ac_prog; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if test "${ac_cv_path_CMP+set}" = set; then :
3943  $as_echo_n "(cached) " >&6
3944else
3945  case $CMP in
3946  [\\/]* | ?:[\\/]*)
3947  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3948  ;;
3949  *)
3950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953  IFS=$as_save_IFS
3954  test -z "$as_dir" && as_dir=.
3955    for ac_exec_ext in '' $ac_executable_extensions; do
3956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3957    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959    break 2
3960  fi
3961done
3962  done
3963IFS=$as_save_IFS
3964
3965  ;;
3966esac
3967fi
3968CMP=$ac_cv_path_CMP
3969if test -n "$CMP"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3971$as_echo "$CMP" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978  test -n "$CMP" && break
3979done
3980
3981
3982    if test "x$CMP" = x; then
3983        if test "xcmp" = x; then
3984          PROG_NAME=cmp
3985        else
3986          PROG_NAME=cmp
3987        fi
3988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3990        as_fn_error $? "Cannot continue" "$LINENO" 5
3991    fi
3992
3993
3994
3995    for ac_prog in cp
3996do
3997  # Extract the first word of "$ac_prog", so it can be a program name with args.
3998set dummy $ac_prog; ac_word=$2
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4000$as_echo_n "checking for $ac_word... " >&6; }
4001if test "${ac_cv_path_CP+set}" = set; then :
4002  $as_echo_n "(cached) " >&6
4003else
4004  case $CP in
4005  [\\/]* | ?:[\\/]*)
4006  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4007  ;;
4008  *)
4009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010for as_dir in $PATH
4011do
4012  IFS=$as_save_IFS
4013  test -z "$as_dir" && as_dir=.
4014    for ac_exec_ext in '' $ac_executable_extensions; do
4015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4016    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4018    break 2
4019  fi
4020done
4021  done
4022IFS=$as_save_IFS
4023
4024  ;;
4025esac
4026fi
4027CP=$ac_cv_path_CP
4028if test -n "$CP"; then
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4030$as_echo "$CP" >&6; }
4031else
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034fi
4035
4036
4037  test -n "$CP" && break
4038done
4039
4040
4041    if test "x$CP" = x; then
4042        if test "xcp" = x; then
4043          PROG_NAME=cp
4044        else
4045          PROG_NAME=cp
4046        fi
4047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4049        as_fn_error $? "Cannot continue" "$LINENO" 5
4050    fi
4051
4052
4053
4054    for ac_prog in cut
4055do
4056  # Extract the first word of "$ac_prog", so it can be a program name with args.
4057set dummy $ac_prog; ac_word=$2
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
4060if test "${ac_cv_path_CUT+set}" = set; then :
4061  $as_echo_n "(cached) " >&6
4062else
4063  case $CUT in
4064  [\\/]* | ?:[\\/]*)
4065  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4066  ;;
4067  *)
4068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071  IFS=$as_save_IFS
4072  test -z "$as_dir" && as_dir=.
4073    for ac_exec_ext in '' $ac_executable_extensions; do
4074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4075    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077    break 2
4078  fi
4079done
4080  done
4081IFS=$as_save_IFS
4082
4083  ;;
4084esac
4085fi
4086CUT=$ac_cv_path_CUT
4087if test -n "$CUT"; then
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4089$as_echo "$CUT" >&6; }
4090else
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
4093fi
4094
4095
4096  test -n "$CUT" && break
4097done
4098
4099
4100    if test "x$CUT" = x; then
4101        if test "xcut" = x; then
4102          PROG_NAME=cut
4103        else
4104          PROG_NAME=cut
4105        fi
4106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4108        as_fn_error $? "Cannot continue" "$LINENO" 5
4109    fi
4110
4111
4112
4113    for ac_prog in date
4114do
4115  # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
4119if test "${ac_cv_path_DATE+set}" = set; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  case $DATE in
4123  [\\/]* | ?:[\\/]*)
4124  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4125  ;;
4126  *)
4127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130  IFS=$as_save_IFS
4131  test -z "$as_dir" && as_dir=.
4132    for ac_exec_ext in '' $ac_executable_extensions; do
4133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4134    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136    break 2
4137  fi
4138done
4139  done
4140IFS=$as_save_IFS
4141
4142  ;;
4143esac
4144fi
4145DATE=$ac_cv_path_DATE
4146if test -n "$DATE"; then
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4148$as_echo "$DATE" >&6; }
4149else
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152fi
4153
4154
4155  test -n "$DATE" && break
4156done
4157
4158
4159    if test "x$DATE" = x; then
4160        if test "xdate" = x; then
4161          PROG_NAME=date
4162        else
4163          PROG_NAME=date
4164        fi
4165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4167        as_fn_error $? "Cannot continue" "$LINENO" 5
4168    fi
4169
4170
4171
4172    for ac_prog in gdiff diff
4173do
4174  # Extract the first word of "$ac_prog", so it can be a program name with args.
4175set dummy $ac_prog; ac_word=$2
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
4178if test "${ac_cv_path_DIFF+set}" = set; then :
4179  $as_echo_n "(cached) " >&6
4180else
4181  case $DIFF in
4182  [\\/]* | ?:[\\/]*)
4183  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4184  ;;
4185  *)
4186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189  IFS=$as_save_IFS
4190  test -z "$as_dir" && as_dir=.
4191    for ac_exec_ext in '' $ac_executable_extensions; do
4192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195    break 2
4196  fi
4197done
4198  done
4199IFS=$as_save_IFS
4200
4201  ;;
4202esac
4203fi
4204DIFF=$ac_cv_path_DIFF
4205if test -n "$DIFF"; then
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4207$as_echo "$DIFF" >&6; }
4208else
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
4212
4213
4214  test -n "$DIFF" && break
4215done
4216
4217
4218    if test "x$DIFF" = x; then
4219        if test "xgdiff diff" = x; then
4220          PROG_NAME=diff
4221        else
4222          PROG_NAME=gdiff diff
4223        fi
4224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4226        as_fn_error $? "Cannot continue" "$LINENO" 5
4227    fi
4228
4229
4230
4231    for ac_prog in dirname
4232do
4233  # Extract the first word of "$ac_prog", so it can be a program name with args.
4234set dummy $ac_prog; ac_word=$2
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236$as_echo_n "checking for $ac_word... " >&6; }
4237if test "${ac_cv_path_DIRNAME+set}" = set; then :
4238  $as_echo_n "(cached) " >&6
4239else
4240  case $DIRNAME in
4241  [\\/]* | ?:[\\/]*)
4242  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4243  ;;
4244  *)
4245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248  IFS=$as_save_IFS
4249  test -z "$as_dir" && as_dir=.
4250    for ac_exec_ext in '' $ac_executable_extensions; do
4251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4254    break 2
4255  fi
4256done
4257  done
4258IFS=$as_save_IFS
4259
4260  ;;
4261esac
4262fi
4263DIRNAME=$ac_cv_path_DIRNAME
4264if test -n "$DIRNAME"; then
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4266$as_echo "$DIRNAME" >&6; }
4267else
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273  test -n "$DIRNAME" && break
4274done
4275
4276
4277    if test "x$DIRNAME" = x; then
4278        if test "xdirname" = x; then
4279          PROG_NAME=dirname
4280        else
4281          PROG_NAME=dirname
4282        fi
4283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4285        as_fn_error $? "Cannot continue" "$LINENO" 5
4286    fi
4287
4288
4289
4290    for ac_prog in echo
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if test "${ac_cv_path_ECHO+set}" = set; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $ECHO in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322ECHO=$ac_cv_path_ECHO
4323if test -n "$ECHO"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4325$as_echo "$ECHO" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$ECHO" && break
4333done
4334
4335
4336    if test "x$ECHO" = x; then
4337        if test "xecho" = x; then
4338          PROG_NAME=echo
4339        else
4340          PROG_NAME=echo
4341        fi
4342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4344        as_fn_error $? "Cannot continue" "$LINENO" 5
4345    fi
4346
4347
4348
4349    for ac_prog in expr
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if test "${ac_cv_path_EXPR+set}" = set; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $EXPR in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4370    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381EXPR=$ac_cv_path_EXPR
4382if test -n "$EXPR"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4384$as_echo "$EXPR" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$EXPR" && break
4392done
4393
4394
4395    if test "x$EXPR" = x; then
4396        if test "xexpr" = x; then
4397          PROG_NAME=expr
4398        else
4399          PROG_NAME=expr
4400        fi
4401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4403        as_fn_error $? "Cannot continue" "$LINENO" 5
4404    fi
4405
4406
4407
4408    for ac_prog in file
4409do
4410  # Extract the first word of "$ac_prog", so it can be a program name with args.
4411set dummy $ac_prog; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if test "${ac_cv_path_FILE+set}" = set; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $FILE in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440FILE=$ac_cv_path_FILE
4441if test -n "$FILE"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4443$as_echo "$FILE" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450  test -n "$FILE" && break
4451done
4452
4453
4454    if test "x$FILE" = x; then
4455        if test "xfile" = x; then
4456          PROG_NAME=file
4457        else
4458          PROG_NAME=file
4459        fi
4460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4462        as_fn_error $? "Cannot continue" "$LINENO" 5
4463    fi
4464
4465
4466
4467    for ac_prog in find
4468do
4469  # Extract the first word of "$ac_prog", so it can be a program name with args.
4470set dummy $ac_prog; ac_word=$2
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
4473if test "${ac_cv_path_FIND+set}" = set; then :
4474  $as_echo_n "(cached) " >&6
4475else
4476  case $FIND in
4477  [\\/]* | ?:[\\/]*)
4478  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4479  ;;
4480  *)
4481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH
4483do
4484  IFS=$as_save_IFS
4485  test -z "$as_dir" && as_dir=.
4486    for ac_exec_ext in '' $ac_executable_extensions; do
4487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4488    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490    break 2
4491  fi
4492done
4493  done
4494IFS=$as_save_IFS
4495
4496  ;;
4497esac
4498fi
4499FIND=$ac_cv_path_FIND
4500if test -n "$FIND"; then
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4502$as_echo "$FIND" >&6; }
4503else
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509  test -n "$FIND" && break
4510done
4511
4512
4513    if test "x$FIND" = x; then
4514        if test "xfind" = x; then
4515          PROG_NAME=find
4516        else
4517          PROG_NAME=find
4518        fi
4519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4521        as_fn_error $? "Cannot continue" "$LINENO" 5
4522    fi
4523
4524
4525
4526    for ac_prog in head
4527do
4528  # Extract the first word of "$ac_prog", so it can be a program name with args.
4529set dummy $ac_prog; ac_word=$2
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
4532if test "${ac_cv_path_HEAD+set}" = set; then :
4533  $as_echo_n "(cached) " >&6
4534else
4535  case $HEAD in
4536  [\\/]* | ?:[\\/]*)
4537  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4538  ;;
4539  *)
4540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543  IFS=$as_save_IFS
4544  test -z "$as_dir" && as_dir=.
4545    for ac_exec_ext in '' $ac_executable_extensions; do
4546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4547    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4549    break 2
4550  fi
4551done
4552  done
4553IFS=$as_save_IFS
4554
4555  ;;
4556esac
4557fi
4558HEAD=$ac_cv_path_HEAD
4559if test -n "$HEAD"; then
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4561$as_echo "$HEAD" >&6; }
4562else
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565fi
4566
4567
4568  test -n "$HEAD" && break
4569done
4570
4571
4572    if test "x$HEAD" = x; then
4573        if test "xhead" = x; then
4574          PROG_NAME=head
4575        else
4576          PROG_NAME=head
4577        fi
4578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4580        as_fn_error $? "Cannot continue" "$LINENO" 5
4581    fi
4582
4583
4584
4585    for ac_prog in ln
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if test "${ac_cv_path_LN+set}" = set; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $LN in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4606    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617LN=$ac_cv_path_LN
4618if test -n "$LN"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4620$as_echo "$LN" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$LN" && break
4628done
4629
4630
4631    if test "x$LN" = x; then
4632        if test "xln" = x; then
4633          PROG_NAME=ln
4634        else
4635          PROG_NAME=ln
4636        fi
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4639        as_fn_error $? "Cannot continue" "$LINENO" 5
4640    fi
4641
4642
4643
4644    for ac_prog in ls
4645do
4646  # Extract the first word of "$ac_prog", so it can be a program name with args.
4647set dummy $ac_prog; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if test "${ac_cv_path_LS+set}" = set; then :
4651  $as_echo_n "(cached) " >&6
4652else
4653  case $LS in
4654  [\\/]* | ?:[\\/]*)
4655  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4656  ;;
4657  *)
4658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673  ;;
4674esac
4675fi
4676LS=$ac_cv_path_LS
4677if test -n "$LS"; then
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4679$as_echo "$LS" >&6; }
4680else
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686  test -n "$LS" && break
4687done
4688
4689
4690    if test "x$LS" = x; then
4691        if test "xls" = x; then
4692          PROG_NAME=ls
4693        else
4694          PROG_NAME=ls
4695        fi
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4698        as_fn_error $? "Cannot continue" "$LINENO" 5
4699    fi
4700
4701
4702
4703    for ac_prog in mkdir
4704do
4705  # Extract the first word of "$ac_prog", so it can be a program name with args.
4706set dummy $ac_prog; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if test "${ac_cv_path_MKDIR+set}" = set; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  case $MKDIR in
4713  [\\/]* | ?:[\\/]*)
4714  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4715  ;;
4716  *)
4717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in $PATH
4719do
4720  IFS=$as_save_IFS
4721  test -z "$as_dir" && as_dir=.
4722    for ac_exec_ext in '' $ac_executable_extensions; do
4723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4724    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726    break 2
4727  fi
4728done
4729  done
4730IFS=$as_save_IFS
4731
4732  ;;
4733esac
4734fi
4735MKDIR=$ac_cv_path_MKDIR
4736if test -n "$MKDIR"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4738$as_echo "$MKDIR" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745  test -n "$MKDIR" && break
4746done
4747
4748
4749    if test "x$MKDIR" = x; then
4750        if test "xmkdir" = x; then
4751          PROG_NAME=mkdir
4752        else
4753          PROG_NAME=mkdir
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4757        as_fn_error $? "Cannot continue" "$LINENO" 5
4758    fi
4759
4760
4761
4762    for ac_prog in mktemp
4763do
4764  # Extract the first word of "$ac_prog", so it can be a program name with args.
4765set dummy $ac_prog; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
4768if test "${ac_cv_path_MKTEMP+set}" = set; then :
4769  $as_echo_n "(cached) " >&6
4770else
4771  case $MKTEMP in
4772  [\\/]* | ?:[\\/]*)
4773  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4774  ;;
4775  *)
4776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4783    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791  ;;
4792esac
4793fi
4794MKTEMP=$ac_cv_path_MKTEMP
4795if test -n "$MKTEMP"; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4797$as_echo "$MKTEMP" >&6; }
4798else
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804  test -n "$MKTEMP" && break
4805done
4806
4807
4808    if test "x$MKTEMP" = x; then
4809        if test "xmktemp" = x; then
4810          PROG_NAME=mktemp
4811        else
4812          PROG_NAME=mktemp
4813        fi
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4816        as_fn_error $? "Cannot continue" "$LINENO" 5
4817    fi
4818
4819
4820
4821    for ac_prog in mv
4822do
4823  # Extract the first word of "$ac_prog", so it can be a program name with args.
4824set dummy $ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if test "${ac_cv_path_MV+set}" = set; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830  case $MV in
4831  [\\/]* | ?:[\\/]*)
4832  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4833  ;;
4834  *)
4835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in $PATH
4837do
4838  IFS=$as_save_IFS
4839  test -z "$as_dir" && as_dir=.
4840    for ac_exec_ext in '' $ac_executable_extensions; do
4841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4842    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844    break 2
4845  fi
4846done
4847  done
4848IFS=$as_save_IFS
4849
4850  ;;
4851esac
4852fi
4853MV=$ac_cv_path_MV
4854if test -n "$MV"; then
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4856$as_echo "$MV" >&6; }
4857else
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863  test -n "$MV" && break
4864done
4865
4866
4867    if test "x$MV" = x; then
4868        if test "xmv" = x; then
4869          PROG_NAME=mv
4870        else
4871          PROG_NAME=mv
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4875        as_fn_error $? "Cannot continue" "$LINENO" 5
4876    fi
4877
4878
4879
4880    for ac_prog in printf
4881do
4882  # Extract the first word of "$ac_prog", so it can be a program name with args.
4883set dummy $ac_prog; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if test "${ac_cv_path_PRINTF+set}" = set; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $PRINTF in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4901    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912PRINTF=$ac_cv_path_PRINTF
4913if test -n "$PRINTF"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4915$as_echo "$PRINTF" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922  test -n "$PRINTF" && break
4923done
4924
4925
4926    if test "x$PRINTF" = x; then
4927        if test "xprintf" = x; then
4928          PROG_NAME=printf
4929        else
4930          PROG_NAME=printf
4931        fi
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4934        as_fn_error $? "Cannot continue" "$LINENO" 5
4935    fi
4936
4937
4938
4939    for ac_prog in pwd
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $THEPWDCMD in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4960    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971THEPWDCMD=$ac_cv_path_THEPWDCMD
4972if test -n "$THEPWDCMD"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4974$as_echo "$THEPWDCMD" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$THEPWDCMD" && break
4982done
4983
4984
4985    if test "x$THEPWDCMD" = x; then
4986        if test "xpwd" = x; then
4987          PROG_NAME=thepwdcmd
4988        else
4989          PROG_NAME=pwd
4990        fi
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4993        as_fn_error $? "Cannot continue" "$LINENO" 5
4994    fi
4995
4996
4997
4998    for ac_prog in rm
4999do
5000  # Extract the first word of "$ac_prog", so it can be a program name with args.
5001set dummy $ac_prog; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if test "${ac_cv_path_RM+set}" = set; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $RM in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030RM=$ac_cv_path_RM
5031if test -n "$RM"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5033$as_echo "$RM" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040  test -n "$RM" && break
5041done
5042
5043
5044    if test "x$RM" = x; then
5045        if test "xrm" = x; then
5046          PROG_NAME=rm
5047        else
5048          PROG_NAME=rm
5049        fi
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5052        as_fn_error $? "Cannot continue" "$LINENO" 5
5053    fi
5054
5055
5056
5057    for ac_prog in sh
5058do
5059  # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
5063if test "${ac_cv_path_SH+set}" = set; then :
5064  $as_echo_n "(cached) " >&6
5065else
5066  case $SH in
5067  [\\/]* | ?:[\\/]*)
5068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5069  ;;
5070  *)
5071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074  IFS=$as_save_IFS
5075  test -z "$as_dir" && as_dir=.
5076    for ac_exec_ext in '' $ac_executable_extensions; do
5077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080    break 2
5081  fi
5082done
5083  done
5084IFS=$as_save_IFS
5085
5086  ;;
5087esac
5088fi
5089SH=$ac_cv_path_SH
5090if test -n "$SH"; then
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5092$as_echo "$SH" >&6; }
5093else
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099  test -n "$SH" && break
5100done
5101
5102
5103    if test "x$SH" = x; then
5104        if test "xsh" = x; then
5105          PROG_NAME=sh
5106        else
5107          PROG_NAME=sh
5108        fi
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5111        as_fn_error $? "Cannot continue" "$LINENO" 5
5112    fi
5113
5114
5115
5116    for ac_prog in sort
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if test "${ac_cv_path_SORT+set}" = set; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $SORT in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148SORT=$ac_cv_path_SORT
5149if test -n "$SORT"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5151$as_echo "$SORT" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$SORT" && break
5159done
5160
5161
5162    if test "x$SORT" = x; then
5163        if test "xsort" = x; then
5164          PROG_NAME=sort
5165        else
5166          PROG_NAME=sort
5167        fi
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        as_fn_error $? "Cannot continue" "$LINENO" 5
5171    fi
5172
5173
5174
5175    for ac_prog in tail
5176do
5177  # Extract the first word of "$ac_prog", so it can be a program name with args.
5178set dummy $ac_prog; ac_word=$2
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5180$as_echo_n "checking for $ac_word... " >&6; }
5181if test "${ac_cv_path_TAIL+set}" = set; then :
5182  $as_echo_n "(cached) " >&6
5183else
5184  case $TAIL in
5185  [\\/]* | ?:[\\/]*)
5186  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5187  ;;
5188  *)
5189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192  IFS=$as_save_IFS
5193  test -z "$as_dir" && as_dir=.
5194    for ac_exec_ext in '' $ac_executable_extensions; do
5195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198    break 2
5199  fi
5200done
5201  done
5202IFS=$as_save_IFS
5203
5204  ;;
5205esac
5206fi
5207TAIL=$ac_cv_path_TAIL
5208if test -n "$TAIL"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5210$as_echo "$TAIL" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217  test -n "$TAIL" && break
5218done
5219
5220
5221    if test "x$TAIL" = x; then
5222        if test "xtail" = x; then
5223          PROG_NAME=tail
5224        else
5225          PROG_NAME=tail
5226        fi
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5229        as_fn_error $? "Cannot continue" "$LINENO" 5
5230    fi
5231
5232
5233
5234    for ac_prog in tar
5235do
5236  # Extract the first word of "$ac_prog", so it can be a program name with args.
5237set dummy $ac_prog; ac_word=$2
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239$as_echo_n "checking for $ac_word... " >&6; }
5240if test "${ac_cv_path_TAR+set}" = set; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $TAR in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5246  ;;
5247  *)
5248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249for as_dir in $PATH
5250do
5251  IFS=$as_save_IFS
5252  test -z "$as_dir" && as_dir=.
5253    for ac_exec_ext in '' $ac_executable_extensions; do
5254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5255    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257    break 2
5258  fi
5259done
5260  done
5261IFS=$as_save_IFS
5262
5263  ;;
5264esac
5265fi
5266TAR=$ac_cv_path_TAR
5267if test -n "$TAR"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5269$as_echo "$TAR" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276  test -n "$TAR" && break
5277done
5278
5279
5280    if test "x$TAR" = x; then
5281        if test "xtar" = x; then
5282          PROG_NAME=tar
5283        else
5284          PROG_NAME=tar
5285        fi
5286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5288        as_fn_error $? "Cannot continue" "$LINENO" 5
5289    fi
5290
5291
5292
5293    for ac_prog in tee
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if test "${ac_cv_path_TEE+set}" = set; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $TEE in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5314    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325TEE=$ac_cv_path_TEE
5326if test -n "$TEE"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5328$as_echo "$TEE" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$TEE" && break
5336done
5337
5338
5339    if test "x$TEE" = x; then
5340        if test "xtee" = x; then
5341          PROG_NAME=tee
5342        else
5343          PROG_NAME=tee
5344        fi
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5347        as_fn_error $? "Cannot continue" "$LINENO" 5
5348    fi
5349
5350
5351
5352    for ac_prog in touch
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if test "${ac_cv_path_TOUCH+set}" = set; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $TOUCH in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5373    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384TOUCH=$ac_cv_path_TOUCH
5385if test -n "$TOUCH"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5387$as_echo "$TOUCH" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$TOUCH" && break
5395done
5396
5397
5398    if test "x$TOUCH" = x; then
5399        if test "xtouch" = x; then
5400          PROG_NAME=touch
5401        else
5402          PROG_NAME=touch
5403        fi
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5406        as_fn_error $? "Cannot continue" "$LINENO" 5
5407    fi
5408
5409
5410
5411    for ac_prog in tr
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if test "${ac_cv_path_TR+set}" = set; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $TR in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443TR=$ac_cv_path_TR
5444if test -n "$TR"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5446$as_echo "$TR" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$TR" && break
5454done
5455
5456
5457    if test "x$TR" = x; then
5458        if test "xtr" = x; then
5459          PROG_NAME=tr
5460        else
5461          PROG_NAME=tr
5462        fi
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5465        as_fn_error $? "Cannot continue" "$LINENO" 5
5466    fi
5467
5468
5469
5470    for ac_prog in uname
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if test "${ac_cv_path_UNAME+set}" = set; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $UNAME in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502UNAME=$ac_cv_path_UNAME
5503if test -n "$UNAME"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5505$as_echo "$UNAME" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$UNAME" && break
5513done
5514
5515
5516    if test "x$UNAME" = x; then
5517        if test "xuname" = x; then
5518          PROG_NAME=uname
5519        else
5520          PROG_NAME=uname
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5524        as_fn_error $? "Cannot continue" "$LINENO" 5
5525    fi
5526
5527
5528
5529    for ac_prog in uniq
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if test "${ac_cv_path_UNIQ+set}" = set; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $UNIQ in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561UNIQ=$ac_cv_path_UNIQ
5562if test -n "$UNIQ"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5564$as_echo "$UNIQ" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$UNIQ" && break
5572done
5573
5574
5575    if test "x$UNIQ" = x; then
5576        if test "xuniq" = x; then
5577          PROG_NAME=uniq
5578        else
5579          PROG_NAME=uniq
5580        fi
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5583        as_fn_error $? "Cannot continue" "$LINENO" 5
5584    fi
5585
5586
5587
5588    for ac_prog in wc
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if test "${ac_cv_path_WC+set}" = set; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $WC in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5609    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620WC=$ac_cv_path_WC
5621if test -n "$WC"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5623$as_echo "$WC" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$WC" && break
5631done
5632
5633
5634    if test "x$WC" = x; then
5635        if test "xwc" = x; then
5636          PROG_NAME=wc
5637        else
5638          PROG_NAME=wc
5639        fi
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5642        as_fn_error $? "Cannot continue" "$LINENO" 5
5643    fi
5644
5645
5646
5647    for ac_prog in which
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if test "${ac_cv_path_WHICH+set}" = set; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $WHICH in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5668    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679WHICH=$ac_cv_path_WHICH
5680if test -n "$WHICH"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5682$as_echo "$WHICH" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$WHICH" && break
5690done
5691
5692
5693    if test "x$WHICH" = x; then
5694        if test "xwhich" = x; then
5695          PROG_NAME=which
5696        else
5697          PROG_NAME=which
5698        fi
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5701        as_fn_error $? "Cannot continue" "$LINENO" 5
5702    fi
5703
5704
5705
5706    for ac_prog in xargs
5707do
5708  # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_path_XARGS+set}" = set; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715  case $XARGS in
5716  [\\/]* | ?:[\\/]*)
5717  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5718  ;;
5719  *)
5720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723  IFS=$as_save_IFS
5724  test -z "$as_dir" && as_dir=.
5725    for ac_exec_ext in '' $ac_executable_extensions; do
5726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5727    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729    break 2
5730  fi
5731done
5732  done
5733IFS=$as_save_IFS
5734
5735  ;;
5736esac
5737fi
5738XARGS=$ac_cv_path_XARGS
5739if test -n "$XARGS"; then
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5741$as_echo "$XARGS" >&6; }
5742else
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748  test -n "$XARGS" && break
5749done
5750
5751
5752    if test "x$XARGS" = x; then
5753        if test "xxargs" = x; then
5754          PROG_NAME=xargs
5755        else
5756          PROG_NAME=xargs
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5760        as_fn_error $? "Cannot continue" "$LINENO" 5
5761    fi
5762
5763
5764
5765# Then required tools that require some special treatment.
5766for ac_prog in gawk mawk nawk awk
5767do
5768  # Extract the first word of "$ac_prog", so it can be a program name with args.
5769set dummy $ac_prog; ac_word=$2
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5771$as_echo_n "checking for $ac_word... " >&6; }
5772if test "${ac_cv_prog_AWK+set}" = set; then :
5773  $as_echo_n "(cached) " >&6
5774else
5775  if test -n "$AWK"; then
5776  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5777else
5778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_prog_AWK="$ac_prog"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793fi
5794fi
5795AWK=$ac_cv_prog_AWK
5796if test -n "$AWK"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5798$as_echo "$AWK" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805  test -n "$AWK" && break
5806done
5807
5808
5809    if test "x$AWK" = x; then
5810        if test "x" = x; then
5811          PROG_NAME=awk
5812        else
5813          PROG_NAME=
5814        fi
5815        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5816$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5817        as_fn_error $? "Cannot continue" "$LINENO" 5
5818    fi
5819
5820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5821$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5822if test "${ac_cv_path_GREP+set}" = set; then :
5823  $as_echo_n "(cached) " >&6
5824else
5825  if test -z "$GREP"; then
5826  ac_path_GREP_found=false
5827  # Loop through the user's path and test for each of PROGNAME-LIST
5828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5830do
5831  IFS=$as_save_IFS
5832  test -z "$as_dir" && as_dir=.
5833    for ac_prog in grep ggrep; do
5834    for ac_exec_ext in '' $ac_executable_extensions; do
5835      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5836      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5837# Check for GNU ac_path_GREP and select it if it is found.
5838  # Check for GNU $ac_path_GREP
5839case `"$ac_path_GREP" --version 2>&1` in
5840*GNU*)
5841  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5842*)
5843  ac_count=0
5844  $as_echo_n 0123456789 >"conftest.in"
5845  while :
5846  do
5847    cat "conftest.in" "conftest.in" >"conftest.tmp"
5848    mv "conftest.tmp" "conftest.in"
5849    cp "conftest.in" "conftest.nl"
5850    $as_echo 'GREP' >> "conftest.nl"
5851    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5852    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5853    as_fn_arith $ac_count + 1 && ac_count=$as_val
5854    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5855      # Best one so far, save it but keep looking for a better one
5856      ac_cv_path_GREP="$ac_path_GREP"
5857      ac_path_GREP_max=$ac_count
5858    fi
5859    # 10*(2^10) chars as input seems more than enough
5860    test $ac_count -gt 10 && break
5861  done
5862  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5863esac
5864
5865      $ac_path_GREP_found && break 3
5866    done
5867  done
5868  done
5869IFS=$as_save_IFS
5870  if test -z "$ac_cv_path_GREP"; then
5871    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5872  fi
5873else
5874  ac_cv_path_GREP=$GREP
5875fi
5876
5877fi
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5879$as_echo "$ac_cv_path_GREP" >&6; }
5880 GREP="$ac_cv_path_GREP"
5881
5882
5883
5884    if test "x$GREP" = x; then
5885        if test "x" = x; then
5886          PROG_NAME=grep
5887        else
5888          PROG_NAME=
5889        fi
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5891$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5892        as_fn_error $? "Cannot continue" "$LINENO" 5
5893    fi
5894
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5896$as_echo_n "checking for egrep... " >&6; }
5897if test "${ac_cv_path_EGREP+set}" = set; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5901   then ac_cv_path_EGREP="$GREP -E"
5902   else
5903     if test -z "$EGREP"; then
5904  ac_path_EGREP_found=false
5905  # Loop through the user's path and test for each of PROGNAME-LIST
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_prog in egrep; do
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5914      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5915# Check for GNU ac_path_EGREP and select it if it is found.
5916  # Check for GNU $ac_path_EGREP
5917case `"$ac_path_EGREP" --version 2>&1` in
5918*GNU*)
5919  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5920*)
5921  ac_count=0
5922  $as_echo_n 0123456789 >"conftest.in"
5923  while :
5924  do
5925    cat "conftest.in" "conftest.in" >"conftest.tmp"
5926    mv "conftest.tmp" "conftest.in"
5927    cp "conftest.in" "conftest.nl"
5928    $as_echo 'EGREP' >> "conftest.nl"
5929    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5930    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5931    as_fn_arith $ac_count + 1 && ac_count=$as_val
5932    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5933      # Best one so far, save it but keep looking for a better one
5934      ac_cv_path_EGREP="$ac_path_EGREP"
5935      ac_path_EGREP_max=$ac_count
5936    fi
5937    # 10*(2^10) chars as input seems more than enough
5938    test $ac_count -gt 10 && break
5939  done
5940  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5941esac
5942
5943      $ac_path_EGREP_found && break 3
5944    done
5945  done
5946  done
5947IFS=$as_save_IFS
5948  if test -z "$ac_cv_path_EGREP"; then
5949    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5950  fi
5951else
5952  ac_cv_path_EGREP=$EGREP
5953fi
5954
5955   fi
5956fi
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5958$as_echo "$ac_cv_path_EGREP" >&6; }
5959 EGREP="$ac_cv_path_EGREP"
5960
5961
5962
5963    if test "x$EGREP" = x; then
5964        if test "x" = x; then
5965          PROG_NAME=egrep
5966        else
5967          PROG_NAME=
5968        fi
5969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5970$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5971        as_fn_error $? "Cannot continue" "$LINENO" 5
5972    fi
5973
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5975$as_echo_n "checking for fgrep... " >&6; }
5976if test "${ac_cv_path_FGREP+set}" = set; then :
5977  $as_echo_n "(cached) " >&6
5978else
5979  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5980   then ac_cv_path_FGREP="$GREP -F"
5981   else
5982     if test -z "$FGREP"; then
5983  ac_path_FGREP_found=false
5984  # Loop through the user's path and test for each of PROGNAME-LIST
5985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5987do
5988  IFS=$as_save_IFS
5989  test -z "$as_dir" && as_dir=.
5990    for ac_prog in fgrep; do
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5993      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5994# Check for GNU ac_path_FGREP and select it if it is found.
5995  # Check for GNU $ac_path_FGREP
5996case `"$ac_path_FGREP" --version 2>&1` in
5997*GNU*)
5998  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5999*)
6000  ac_count=0
6001  $as_echo_n 0123456789 >"conftest.in"
6002  while :
6003  do
6004    cat "conftest.in" "conftest.in" >"conftest.tmp"
6005    mv "conftest.tmp" "conftest.in"
6006    cp "conftest.in" "conftest.nl"
6007    $as_echo 'FGREP' >> "conftest.nl"
6008    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6009    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6010    as_fn_arith $ac_count + 1 && ac_count=$as_val
6011    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6012      # Best one so far, save it but keep looking for a better one
6013      ac_cv_path_FGREP="$ac_path_FGREP"
6014      ac_path_FGREP_max=$ac_count
6015    fi
6016    # 10*(2^10) chars as input seems more than enough
6017    test $ac_count -gt 10 && break
6018  done
6019  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6020esac
6021
6022      $ac_path_FGREP_found && break 3
6023    done
6024  done
6025  done
6026IFS=$as_save_IFS
6027  if test -z "$ac_cv_path_FGREP"; then
6028    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6029  fi
6030else
6031  ac_cv_path_FGREP=$FGREP
6032fi
6033
6034   fi
6035fi
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6037$as_echo "$ac_cv_path_FGREP" >&6; }
6038 FGREP="$ac_cv_path_FGREP"
6039
6040
6041
6042    if test "x$FGREP" = x; then
6043        if test "x" = x; then
6044          PROG_NAME=fgrep
6045        else
6046          PROG_NAME=
6047        fi
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6050        as_fn_error $? "Cannot continue" "$LINENO" 5
6051    fi
6052
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6054$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6055if test "${ac_cv_path_SED+set}" = set; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6059     for ac_i in 1 2 3 4 5 6 7; do
6060       ac_script="$ac_script$as_nl$ac_script"
6061     done
6062     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6063     { ac_script=; unset ac_script;}
6064     if test -z "$SED"; then
6065  ac_path_SED_found=false
6066  # Loop through the user's path and test for each of PROGNAME-LIST
6067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070  IFS=$as_save_IFS
6071  test -z "$as_dir" && as_dir=.
6072    for ac_prog in sed gsed; do
6073    for ac_exec_ext in '' $ac_executable_extensions; do
6074      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6075      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6076# Check for GNU ac_path_SED and select it if it is found.
6077  # Check for GNU $ac_path_SED
6078case `"$ac_path_SED" --version 2>&1` in
6079*GNU*)
6080  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6081*)
6082  ac_count=0
6083  $as_echo_n 0123456789 >"conftest.in"
6084  while :
6085  do
6086    cat "conftest.in" "conftest.in" >"conftest.tmp"
6087    mv "conftest.tmp" "conftest.in"
6088    cp "conftest.in" "conftest.nl"
6089    $as_echo '' >> "conftest.nl"
6090    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6091    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6092    as_fn_arith $ac_count + 1 && ac_count=$as_val
6093    if test $ac_count -gt ${ac_path_SED_max-0}; then
6094      # Best one so far, save it but keep looking for a better one
6095      ac_cv_path_SED="$ac_path_SED"
6096      ac_path_SED_max=$ac_count
6097    fi
6098    # 10*(2^10) chars as input seems more than enough
6099    test $ac_count -gt 10 && break
6100  done
6101  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6102esac
6103
6104      $ac_path_SED_found && break 3
6105    done
6106  done
6107  done
6108IFS=$as_save_IFS
6109  if test -z "$ac_cv_path_SED"; then
6110    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6111  fi
6112else
6113  ac_cv_path_SED=$SED
6114fi
6115
6116fi
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6118$as_echo "$ac_cv_path_SED" >&6; }
6119 SED="$ac_cv_path_SED"
6120  rm -f conftest.sed
6121
6122
6123    if test "x$SED" = x; then
6124        if test "x" = x; then
6125          PROG_NAME=sed
6126        else
6127          PROG_NAME=
6128        fi
6129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6130$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6131        as_fn_error $? "Cannot continue" "$LINENO" 5
6132    fi
6133
6134
6135for ac_prog in nawk gawk awk
6136do
6137  # Extract the first word of "$ac_prog", so it can be a program name with args.
6138set dummy $ac_prog; ac_word=$2
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6140$as_echo_n "checking for $ac_word... " >&6; }
6141if test "${ac_cv_path_NAWK+set}" = set; then :
6142  $as_echo_n "(cached) " >&6
6143else
6144  case $NAWK in
6145  [\\/]* | ?:[\\/]*)
6146  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6147  ;;
6148  *)
6149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152  IFS=$as_save_IFS
6153  test -z "$as_dir" && as_dir=.
6154    for ac_exec_ext in '' $ac_executable_extensions; do
6155  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6156    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6158    break 2
6159  fi
6160done
6161  done
6162IFS=$as_save_IFS
6163
6164  ;;
6165esac
6166fi
6167NAWK=$ac_cv_path_NAWK
6168if test -n "$NAWK"; then
6169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6170$as_echo "$NAWK" >&6; }
6171else
6172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6173$as_echo "no" >&6; }
6174fi
6175
6176
6177  test -n "$NAWK" && break
6178done
6179
6180
6181    if test "x$NAWK" = x; then
6182        if test "x" = x; then
6183          PROG_NAME=nawk
6184        else
6185          PROG_NAME=
6186        fi
6187        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6188$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6189        as_fn_error $? "Cannot continue" "$LINENO" 5
6190    fi
6191
6192
6193# Always force rm.
6194RM="$RM -f"
6195
6196# These are not required on all platforms
6197# Extract the first word of "cygpath", so it can be a program name with args.
6198set dummy cygpath; ac_word=$2
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6200$as_echo_n "checking for $ac_word... " >&6; }
6201if test "${ac_cv_path_CYGPATH+set}" = set; then :
6202  $as_echo_n "(cached) " >&6
6203else
6204  case $CYGPATH in
6205  [\\/]* | ?:[\\/]*)
6206  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6207  ;;
6208  *)
6209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212  IFS=$as_save_IFS
6213  test -z "$as_dir" && as_dir=.
6214    for ac_exec_ext in '' $ac_executable_extensions; do
6215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6216    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218    break 2
6219  fi
6220done
6221  done
6222IFS=$as_save_IFS
6223
6224  ;;
6225esac
6226fi
6227CYGPATH=$ac_cv_path_CYGPATH
6228if test -n "$CYGPATH"; then
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6230$as_echo "$CYGPATH" >&6; }
6231else
6232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
6234fi
6235
6236
6237# Extract the first word of "readlink", so it can be a program name with args.
6238set dummy readlink; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if test "${ac_cv_path_READLINK+set}" = set; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  case $READLINK in
6245  [\\/]* | ?:[\\/]*)
6246  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6247  ;;
6248  *)
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6256    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258    break 2
6259  fi
6260done
6261  done
6262IFS=$as_save_IFS
6263
6264  ;;
6265esac
6266fi
6267READLINK=$ac_cv_path_READLINK
6268if test -n "$READLINK"; then
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6270$as_echo "$READLINK" >&6; }
6271else
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273$as_echo "no" >&6; }
6274fi
6275
6276
6277# Extract the first word of "df", so it can be a program name with args.
6278set dummy df; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if test "${ac_cv_path_DF+set}" = set; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  case $DF in
6285  [\\/]* | ?:[\\/]*)
6286  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6287  ;;
6288  *)
6289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292  IFS=$as_save_IFS
6293  test -z "$as_dir" && as_dir=.
6294    for ac_exec_ext in '' $ac_executable_extensions; do
6295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6296    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298    break 2
6299  fi
6300done
6301  done
6302IFS=$as_save_IFS
6303
6304  ;;
6305esac
6306fi
6307DF=$ac_cv_path_DF
6308if test -n "$DF"; then
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6310$as_echo "$DF" >&6; }
6311else
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }
6314fi
6315
6316
6317# Extract the first word of "SetFile", so it can be a program name with args.
6318set dummy SetFile; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
6321if test "${ac_cv_path_SETFILE+set}" = set; then :
6322  $as_echo_n "(cached) " >&6
6323else
6324  case $SETFILE in
6325  [\\/]* | ?:[\\/]*)
6326  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6327  ;;
6328  *)
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_exec_ext in '' $ac_executable_extensions; do
6335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6336    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338    break 2
6339  fi
6340done
6341  done
6342IFS=$as_save_IFS
6343
6344  ;;
6345esac
6346fi
6347SETFILE=$ac_cv_path_SETFILE
6348if test -n "$SETFILE"; then
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6350$as_echo "$SETFILE" >&6; }
6351else
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357
6358
6359# Now we can determine OpenJDK build and target platforms. This is required to
6360# have early on.
6361# Make sure we can run config.sub.
6362$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6363  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6366$as_echo_n "checking build system type... " >&6; }
6367if test "${ac_cv_build+set}" = set; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370  ac_build_alias=$build_alias
6371test "x$ac_build_alias" = x &&
6372  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6373test "x$ac_build_alias" = x &&
6374  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6375ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6376  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6377
6378fi
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6380$as_echo "$ac_cv_build" >&6; }
6381case $ac_cv_build in
6382*-*-*) ;;
6383*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6384esac
6385build=$ac_cv_build
6386ac_save_IFS=$IFS; IFS='-'
6387set x $ac_cv_build
6388shift
6389build_cpu=$1
6390build_vendor=$2
6391shift; shift
6392# Remember, the first character of IFS is used to create $*,
6393# except with old shells:
6394build_os=$*
6395IFS=$ac_save_IFS
6396case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6397
6398
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6400$as_echo_n "checking host system type... " >&6; }
6401if test "${ac_cv_host+set}" = set; then :
6402  $as_echo_n "(cached) " >&6
6403else
6404  if test "x$host_alias" = x; then
6405  ac_cv_host=$ac_cv_build
6406else
6407  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6408    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6409fi
6410
6411fi
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6413$as_echo "$ac_cv_host" >&6; }
6414case $ac_cv_host in
6415*-*-*) ;;
6416*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6417esac
6418host=$ac_cv_host
6419ac_save_IFS=$IFS; IFS='-'
6420set x $ac_cv_host
6421shift
6422host_cpu=$1
6423host_vendor=$2
6424shift; shift
6425# Remember, the first character of IFS is used to create $*,
6426# except with old shells:
6427host_os=$*
6428IFS=$ac_save_IFS
6429case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6430
6431
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6433$as_echo_n "checking target system type... " >&6; }
6434if test "${ac_cv_target+set}" = set; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  if test "x$target_alias" = x; then
6438  ac_cv_target=$ac_cv_host
6439else
6440  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6441    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6442fi
6443
6444fi
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6446$as_echo "$ac_cv_target" >&6; }
6447case $ac_cv_target in
6448*-*-*) ;;
6449*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6450esac
6451target=$ac_cv_target
6452ac_save_IFS=$IFS; IFS='-'
6453set x $ac_cv_target
6454shift
6455target_cpu=$1
6456target_vendor=$2
6457shift; shift
6458# Remember, the first character of IFS is used to create $*,
6459# except with old shells:
6460target_os=$*
6461IFS=$ac_save_IFS
6462case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6463
6464
6465# The aliases save the names the user supplied, while $host etc.
6466# will get canonicalized.
6467test -n "$target_alias" &&
6468  test "$program_prefix$program_suffix$program_transform_name" = \
6469    NONENONEs,x,x, &&
6470  program_prefix=${target_alias}-
6471
6472# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6473# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6474# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6475# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6476# to use the configure naming style.
6477
6478
6479
6480
6481
6482    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6483    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6484    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6485    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6486    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6487    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6488
6489
6490
6491    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6492
6493  case "$build_os" in
6494    *linux*)
6495      VAR_OS=linux
6496      VAR_OS_API=posix
6497      VAR_OS_ENV=linux
6498      ;;
6499    *solaris*)
6500      VAR_OS=solaris
6501      VAR_OS_API=posix
6502      VAR_OS_ENV=solaris
6503      ;;
6504    *darwin*)
6505      VAR_OS=macosx
6506      VAR_OS_API=posix
6507      VAR_OS_ENV=macosx
6508      ;;
6509    *bsd*)
6510      VAR_OS=bsd
6511      VAR_OS_API=posix
6512      VAR_OS_ENV=bsd
6513      ;;
6514    *cygwin*)
6515      VAR_OS=windows
6516      VAR_OS_API=winapi
6517      VAR_OS_ENV=windows.cygwin
6518      ;;
6519    *mingw*)
6520      VAR_OS=windows
6521      VAR_OS_API=winapi
6522      VAR_OS_ENV=windows.msys
6523      ;;
6524    *)
6525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6526      ;;
6527  esac
6528
6529
6530  # First argument is the cpu name from the trip/quad
6531  case "$build_cpu" in
6532    x86_64)
6533      VAR_CPU=x86_64
6534      VAR_CPU_ARCH=x86
6535      VAR_CPU_BITS=64
6536      VAR_CPU_ENDIAN=little
6537      ;;
6538    i?86)
6539      VAR_CPU=x86
6540      VAR_CPU_ARCH=x86
6541      VAR_CPU_BITS=32
6542      VAR_CPU_ENDIAN=little
6543      ;;
6544    arm*)
6545      VAR_CPU=arm
6546      VAR_CPU_ARCH=arm
6547      VAR_CPU_BITS=32
6548      VAR_CPU_ENDIAN=little
6549      ;;
6550    powerpc)
6551      VAR_CPU=ppc
6552      VAR_CPU_ARCH=ppc
6553      VAR_CPU_BITS=32
6554      VAR_CPU_ENDIAN=big
6555       ;;
6556    powerpc64)
6557      VAR_CPU=ppc64
6558      VAR_CPU_ARCH=ppc
6559      VAR_CPU_BITS=64
6560      VAR_CPU_ENDIAN=big
6561       ;;
6562    sparc)
6563      VAR_CPU=sparc
6564      VAR_CPU_ARCH=sparc
6565      VAR_CPU_BITS=32
6566      VAR_CPU_ENDIAN=big
6567       ;;
6568    sparcv9)
6569      VAR_CPU=sparcv9
6570      VAR_CPU_ARCH=sparc
6571      VAR_CPU_BITS=64
6572      VAR_CPU_ENDIAN=big
6573       ;;
6574    *)
6575      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6576      ;;
6577  esac
6578
6579    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6580    OPENJDK_BUILD_OS="$VAR_OS"
6581    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6582    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6583    OPENJDK_BUILD_CPU="$VAR_CPU"
6584    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6585    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6586    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6587
6588
6589
6590
6591
6592
6593
6594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6595$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6597$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6598
6599    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6600
6601  case "$host_os" in
6602    *linux*)
6603      VAR_OS=linux
6604      VAR_OS_API=posix
6605      VAR_OS_ENV=linux
6606      ;;
6607    *solaris*)
6608      VAR_OS=solaris
6609      VAR_OS_API=posix
6610      VAR_OS_ENV=solaris
6611      ;;
6612    *darwin*)
6613      VAR_OS=macosx
6614      VAR_OS_API=posix
6615      VAR_OS_ENV=macosx
6616      ;;
6617    *bsd*)
6618      VAR_OS=bsd
6619      VAR_OS_API=posix
6620      VAR_OS_ENV=bsd
6621      ;;
6622    *cygwin*)
6623      VAR_OS=windows
6624      VAR_OS_API=winapi
6625      VAR_OS_ENV=windows.cygwin
6626      ;;
6627    *mingw*)
6628      VAR_OS=windows
6629      VAR_OS_API=winapi
6630      VAR_OS_ENV=windows.msys
6631      ;;
6632    *)
6633      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6634      ;;
6635  esac
6636
6637
6638  # First argument is the cpu name from the trip/quad
6639  case "$host_cpu" in
6640    x86_64)
6641      VAR_CPU=x86_64
6642      VAR_CPU_ARCH=x86
6643      VAR_CPU_BITS=64
6644      VAR_CPU_ENDIAN=little
6645      ;;
6646    i?86)
6647      VAR_CPU=x86
6648      VAR_CPU_ARCH=x86
6649      VAR_CPU_BITS=32
6650      VAR_CPU_ENDIAN=little
6651      ;;
6652    arm*)
6653      VAR_CPU=arm
6654      VAR_CPU_ARCH=arm
6655      VAR_CPU_BITS=32
6656      VAR_CPU_ENDIAN=little
6657      ;;
6658    powerpc)
6659      VAR_CPU=ppc
6660      VAR_CPU_ARCH=ppc
6661      VAR_CPU_BITS=32
6662      VAR_CPU_ENDIAN=big
6663       ;;
6664    powerpc64)
6665      VAR_CPU=ppc64
6666      VAR_CPU_ARCH=ppc
6667      VAR_CPU_BITS=64
6668      VAR_CPU_ENDIAN=big
6669       ;;
6670    sparc)
6671      VAR_CPU=sparc
6672      VAR_CPU_ARCH=sparc
6673      VAR_CPU_BITS=32
6674      VAR_CPU_ENDIAN=big
6675       ;;
6676    sparcv9)
6677      VAR_CPU=sparcv9
6678      VAR_CPU_ARCH=sparc
6679      VAR_CPU_BITS=64
6680      VAR_CPU_ENDIAN=big
6681       ;;
6682    *)
6683      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6684      ;;
6685  esac
6686
6687    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6688    OPENJDK_TARGET_OS="$VAR_OS"
6689    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6690    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6691    OPENJDK_TARGET_CPU="$VAR_CPU"
6692    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6693    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6694    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6695
6696
6697
6698
6699
6700
6701
6702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6703$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6705$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6706
6707
6708
6709# Check whether --with-target-bits was given.
6710if test "${with_target_bits+set}" = set; then :
6711  withval=$with_target_bits;
6712fi
6713
6714
6715  # We have three types of compiles:
6716  # native  == normal compilation, target system == build system
6717  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6718  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6719  #
6720  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6721    # We're doing a proper cross-compilation
6722    COMPILE_TYPE="cross"
6723  else
6724    COMPILE_TYPE="native"
6725  fi
6726
6727  if test "x$with_target_bits" != x; then
6728    if test "x$COMPILE_TYPE" = "xcross"; then
6729      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6730    fi
6731
6732    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6733      # A reduced build is requested
6734      COMPILE_TYPE="reduced"
6735      OPENJDK_TARGET_CPU_BITS=32
6736      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6737        OPENJDK_TARGET_CPU=x86
6738      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6739        OPENJDK_TARGET_CPU=sparc
6740      else
6741        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6742      fi
6743    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6744      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
6745    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6746      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6747$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6748    else
6749      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6750    fi
6751  fi
6752
6753
6754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6755$as_echo_n "checking compilation type... " >&6; }
6756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6757$as_echo "$COMPILE_TYPE" >&6; }
6758
6759
6760    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6761       REQUIRED_OS_NAME=SunOS
6762       REQUIRED_OS_VERSION=5.10
6763    fi
6764    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6765       REQUIRED_OS_NAME=Linux
6766       REQUIRED_OS_VERSION=2.6
6767    fi
6768    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6769        REQUIRED_OS_NAME=Windows
6770        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6771            REQUIRED_OS_VERSION=5.2
6772        else
6773            REQUIRED_OS_VERSION=5.1
6774        fi
6775    fi
6776    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6777        REQUIRED_OS_NAME=Darwin
6778        REQUIRED_OS_VERSION=11.2
6779    fi
6780
6781
6782
6783
6784
6785    # Also store the legacy naming of the cpu.
6786    # Ie i586 and amd64 instead of x86 and x86_64
6787    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6788    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6789      OPENJDK_TARGET_CPU_LEGACY="i586"
6790    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6791      # On all platforms except MacOSX replace x86_64 with amd64.
6792      OPENJDK_TARGET_CPU_LEGACY="amd64"
6793    fi
6794
6795
6796    # And the second legacy naming of the cpu.
6797    # Ie i386 and amd64 instead of x86 and x86_64.
6798    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6799    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6800      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6801    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6802      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6803    fi
6804
6805
6806    # This is the name of the cpu (but using i386 and amd64 instead of
6807    # x86 and x86_64, respectively), preceeded by a /, to be used when
6808    # locating libraries. On macosx, it's empty, though.
6809    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6810    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6811        OPENJDK_TARGET_CPU_LIBDIR=""
6812    fi
6813
6814
6815    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6816    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6817    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6818    OPENJDK_TARGET_CPU_ISADIR=""
6819    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6820      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6821          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6822      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6823          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6824      fi
6825    fi
6826
6827
6828    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6829    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6830    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6831      # On linux only, we replace x86 with i386.
6832      OPENJDK_TARGET_CPU_OSARCH="i386"
6833    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6834      # On all platforms except macosx, we replace x86_64 with amd64.
6835      OPENJDK_TARGET_CPU_OSARCH="amd64"
6836    fi
6837
6838
6839    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6840    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6841      OPENJDK_TARGET_CPU_JLI="i386"
6842    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6843      # On all platforms except macosx, we replace x86_64 with amd64.
6844      OPENJDK_TARGET_CPU_JLI="amd64"
6845    fi
6846    # Now setup the -D flags for building libjli.
6847    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6848    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6849      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6850        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6851      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6852        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6853      fi
6854    fi
6855
6856
6857    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6858    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6859        OPENJDK_TARGET_OS_API_DIR="solaris"
6860    fi
6861    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6862        OPENJDK_TARGET_OS_API_DIR="windows"
6863    fi
6864
6865
6866    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6867        A_LP64="LP64:="
6868        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6869        # unpack200.exe
6870        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6871            ADD_LP64="-D_LP64=1"
6872        fi
6873    fi
6874    LP64=$A_LP64
6875
6876
6877    if test "x$COMPILE_TYPE" = "xcross"; then
6878      # FIXME: ... or should this include reduced builds..?
6879      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6880    else
6881      DEFINE_CROSS_COMPILE_ARCH=""
6882    fi
6883
6884
6885
6886
6887# Continue setting up basic stuff. Most remaining code require fundamental tools.
6888
6889# Locate the directory of this script.
6890SCRIPT="$0"
6891
6892    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6893        # Follow a chain of symbolic links. Use readlink
6894        # where it exists, else fall back to horribly
6895        # complicated shell code.
6896        if test "x$READLINK_TESTED" != yes; then
6897            # On MacOSX there is a readlink tool with a different
6898            # purpose than the GNU readlink tool. Check the found readlink.
6899            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6900            if test "x$ISGNU" = x; then
6901                 # A readlink that we do not know how to use.
6902                 # Are there other non-GNU readlinks out there?
6903                 READLINK_TESTED=yes
6904                 READLINK=
6905            fi
6906        fi
6907
6908        if test "x$READLINK" != x; then
6909            SCRIPT=`$READLINK -f $SCRIPT`
6910        else
6911            STARTDIR=$PWD
6912            COUNTER=0
6913            sym_link_dir=`$DIRNAME $SCRIPT`
6914            sym_link_file=`$BASENAME $SCRIPT`
6915            while test $COUNTER -lt 20; do
6916                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6917                if test "x$ISLINK" == x; then
6918                    # This is not a symbolic link! We are done!
6919                    break
6920                fi
6921                # The link might be relative! We have to use cd to travel safely.
6922                cd $sym_link_dir
6923                # ... and we must get the to the absolute path, not one using symbolic links.
6924                cd `pwd -P`
6925                cd `$DIRNAME $ISLINK`
6926                sym_link_dir=`$THEPWDCMD`
6927                sym_link_file=`$BASENAME $ISLINK`
6928                let COUNTER=COUNTER+1
6929            done
6930            cd $STARTDIR
6931            SCRIPT=$sym_link_dir/$sym_link_file
6932        fi
6933    fi
6934
6935AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6936
6937# Where is the source? It is located two levels above the configure script.
6938CURDIR="$PWD"
6939cd "$AUTOCONF_DIR/../.."
6940SRC_ROOT="`pwd`"
6941
6942if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6943  PATH_SEP=";"
6944
6945  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6946  if test $SRC_ROOT_LENGTH -gt 100; then
6947      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6948  fi
6949
6950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6952$as_echo_n "checking cygwin release... " >&6; }
6953    CYGWIN_VERSION=`$UNAME -r`
6954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6955$as_echo "$CYGWIN_VERSION" >&6; }
6956    WINDOWS_ENV_VENDOR='cygwin'
6957    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6958
6959    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6960    if test "x$CYGWIN_VERSION_OK" = x; then
6961      { $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
6962$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;}
6963      as_fn_error $? "Cannot continue" "$LINENO" 5
6964    fi
6965    if test "x$CYGPATH" = x; then
6966        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6967    fi
6968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6969$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6970    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6971    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6972    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6973    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6975$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6976    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6977    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6978    if test "x$test_cygdrive_prefix" = x; then
6979        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6980    fi
6981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6983$as_echo_n "checking msys release... " >&6; }
6984    MSYS_VERSION=`$UNAME -r`
6985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6986$as_echo "$MSYS_VERSION" >&6; }
6987
6988    WINDOWS_ENV_VENDOR='msys'
6989    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6990
6991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
6992$as_echo_n "checking msys root directory as unix-style path... " >&6; }
6993    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6994    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
6995
6996  windows_path="$MSYS_ROOT_PATH"
6997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6998    unix_path=`$CYGPATH -u "$windows_path"`
6999    MSYS_ROOT_PATH="$unix_path"
7000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7002    MSYS_ROOT_PATH="$unix_path"
7003  fi
7004
7005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7006$as_echo "$MSYS_ROOT_PATH" >&6; }
7007    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7008  else
7009    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7010  fi
7011
7012  # Test if windows or unix (cygwin/msys) find is first in path.
7013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7014$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7015  FIND_BINARY_OUTPUT=`find --version 2>&1`
7016  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7018$as_echo "unix style" >&6; }
7019  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7021$as_echo "Windows" >&6; }
7022    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7023$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7024    { $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
7025$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7026    as_fn_error $? "Cannot continue" "$LINENO" 5
7027  else
7028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7029$as_echo "unknown" >&6; }
7030    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7031$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7032  fi
7033
7034else
7035  PATH_SEP=":"
7036fi
7037
7038
7039
7040cd "$CURDIR"
7041
7042
7043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7044
7045  # Input might be given as Windows format, start by converting to
7046  # unix format.
7047  path="$SRC_ROOT"
7048  new_path=`$CYGPATH -u "$path"`
7049
7050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7053  # "foo.exe" is OK but "foo" is an error.
7054  #
7055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7056  # It is also a way to make sure we got the proper file name for the real test later on.
7057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7058  if test "x$test_shortpath" = x; then
7059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7060$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7061    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7062  fi
7063
7064  # Call helper function which possibly converts this using DOS-style short mode.
7065  # If so, the updated path is stored in $new_path.
7066
7067  input_path="$new_path"
7068  # Check if we need to convert this using DOS-style short mode. If the path
7069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7070  # take no chances and rewrite it.
7071  # Note: m4 eats our [], so we need to use [ and ] instead.
7072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7073  if test "x$has_forbidden_chars" != x; then
7074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7078      # Going to short mode and back again did indeed matter. Since short mode is
7079      # case insensitive, let's make it lowercase to improve readability.
7080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7081      # Now convert it back to Unix-stile (cygpath)
7082      input_path=`$CYGPATH -u "$shortmode_path"`
7083      new_path="$input_path"
7084    fi
7085  fi
7086
7087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7088  if test "x$test_cygdrive_prefix" = x; then
7089    # As a simple fix, exclude /usr/bin since it's not a real path.
7090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7092      # a path prefixed by /cygdrive for fixpath to work.
7093      new_path="$CYGWIN_ROOT_PATH$input_path"
7094    fi
7095  fi
7096
7097
7098  if test "x$path" != "x$new_path"; then
7099    SRC_ROOT="$new_path"
7100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7101$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7102  fi
7103
7104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7105
7106  path="$SRC_ROOT"
7107  has_colon=`$ECHO $path | $GREP ^.:`
7108  new_path="$path"
7109  if test "x$has_colon" = x; then
7110    # Not in mixed or Windows style, start by that.
7111    new_path=`cmd //c echo $path`
7112  fi
7113
7114
7115  input_path="$new_path"
7116  # Check if we need to convert this using DOS-style short mode. If the path
7117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7118  # take no chances and rewrite it.
7119  # Note: m4 eats our [], so we need to use [ and ] instead.
7120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7121  if test "x$has_forbidden_chars" != x; then
7122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7124  fi
7125
7126
7127  windows_path="$new_path"
7128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7129    unix_path=`$CYGPATH -u "$windows_path"`
7130    new_path="$unix_path"
7131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7133    new_path="$unix_path"
7134  fi
7135
7136  if test "x$path" != "x$new_path"; then
7137    SRC_ROOT="$new_path"
7138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7139$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7140  fi
7141
7142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7144
7145  else
7146    # We're on a posix platform. Hooray! :)
7147    path="$SRC_ROOT"
7148
7149    if test ! -f "$path" && test ! -d "$path"; then
7150      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7151    fi
7152
7153    has_space=`$ECHO "$path" | $GREP " "`
7154    if test "x$has_space" != x; then
7155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7156$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7158    fi
7159  fi
7160
7161
7162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7163
7164  # Input might be given as Windows format, start by converting to
7165  # unix format.
7166  path="$CURDIR"
7167  new_path=`$CYGPATH -u "$path"`
7168
7169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7172  # "foo.exe" is OK but "foo" is an error.
7173  #
7174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7175  # It is also a way to make sure we got the proper file name for the real test later on.
7176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7177  if test "x$test_shortpath" = x; then
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7179$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7180    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7181  fi
7182
7183  # Call helper function which possibly converts this using DOS-style short mode.
7184  # If so, the updated path is stored in $new_path.
7185
7186  input_path="$new_path"
7187  # Check if we need to convert this using DOS-style short mode. If the path
7188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7189  # take no chances and rewrite it.
7190  # Note: m4 eats our [], so we need to use [ and ] instead.
7191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7192  if test "x$has_forbidden_chars" != x; then
7193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7197      # Going to short mode and back again did indeed matter. Since short mode is
7198      # case insensitive, let's make it lowercase to improve readability.
7199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7200      # Now convert it back to Unix-stile (cygpath)
7201      input_path=`$CYGPATH -u "$shortmode_path"`
7202      new_path="$input_path"
7203    fi
7204  fi
7205
7206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7207  if test "x$test_cygdrive_prefix" = x; then
7208    # As a simple fix, exclude /usr/bin since it's not a real path.
7209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7211      # a path prefixed by /cygdrive for fixpath to work.
7212      new_path="$CYGWIN_ROOT_PATH$input_path"
7213    fi
7214  fi
7215
7216
7217  if test "x$path" != "x$new_path"; then
7218    CURDIR="$new_path"
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7220$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7221  fi
7222
7223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224
7225  path="$CURDIR"
7226  has_colon=`$ECHO $path | $GREP ^.:`
7227  new_path="$path"
7228  if test "x$has_colon" = x; then
7229    # Not in mixed or Windows style, start by that.
7230    new_path=`cmd //c echo $path`
7231  fi
7232
7233
7234  input_path="$new_path"
7235  # Check if we need to convert this using DOS-style short mode. If the path
7236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7237  # take no chances and rewrite it.
7238  # Note: m4 eats our [], so we need to use [ and ] instead.
7239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7240  if test "x$has_forbidden_chars" != x; then
7241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7243  fi
7244
7245
7246  windows_path="$new_path"
7247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7248    unix_path=`$CYGPATH -u "$windows_path"`
7249    new_path="$unix_path"
7250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7252    new_path="$unix_path"
7253  fi
7254
7255  if test "x$path" != "x$new_path"; then
7256    CURDIR="$new_path"
7257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7258$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7259  fi
7260
7261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7263
7264  else
7265    # We're on a posix platform. Hooray! :)
7266    path="$CURDIR"
7267
7268    if test ! -f "$path" && test ! -d "$path"; then
7269      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7270    fi
7271
7272    has_space=`$ECHO "$path" | $GREP " "`
7273    if test "x$has_space" != x; then
7274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7275$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7276      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7277    fi
7278  fi
7279
7280
7281if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7282    # Add extra search paths on solaris for utilities like ar and as etc...
7283    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7284fi
7285
7286# You can force the sys-root if the sys-root encoded into the cross compiler tools
7287# is not correct.
7288
7289# Check whether --with-sys-root was given.
7290if test "${with_sys_root+set}" = set; then :
7291  withval=$with_sys_root;
7292fi
7293
7294
7295if test "x$with_sys_root" != x; then
7296  SYS_ROOT=$with_sys_root
7297else
7298  SYS_ROOT=/
7299fi
7300
7301
7302
7303# Check whether --with-tools-dir was given.
7304if test "${with_tools_dir+set}" = set; then :
7305  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7306fi
7307
7308
7309
7310# Check whether --with-devkit was given.
7311if test "${with_devkit+set}" = set; then :
7312  withval=$with_devkit;
7313    if test "x$with_sys_root" != x; then
7314      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7315    fi
7316    if test "x$with_tools_dir" != x; then
7317      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7318    fi
7319    TOOLS_DIR=$with_devkit/bin
7320    SYS_ROOT=$with_devkit/$host_alias/libc
7321
7322fi
7323
7324
7325
7326
7327# Setup default logging of stdout and stderr to build.log in the output root.
7328BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7329BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7330BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7331
7332
7333
7334
7335
7336# These are needed to be able to create a configuration name (and thus the output directory)
7337
7338###############################################################################
7339#
7340# Check which variant of the JDK that we want to build.
7341# Currently we have:
7342#    normal:   standard edition
7343# but the custom make system may add other variants
7344#
7345# Effectively the JDK variant gives a name to a specific set of
7346# modules to compile into the JDK. In the future, these modules
7347# might even be Jigsaw modules.
7348#
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7350$as_echo_n "checking which variant of the JDK to build... " >&6; }
7351
7352# Check whether --with-jdk-variant was given.
7353if test "${with_jdk_variant+set}" = set; then :
7354  withval=$with_jdk_variant;
7355fi
7356
7357
7358if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7359    JDK_VARIANT="normal"
7360else
7361    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7362fi
7363
7364
7365
7366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7367$as_echo "$JDK_VARIANT" >&6; }
7368
7369
7370
7371###############################################################################
7372#
7373# Check which variants of the JVM that we want to build.
7374# Currently we have:
7375#    server: normal interpreter and a tiered C1/C2 compiler
7376#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7377#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7378#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7379#    zero: no machine code interpreter, no compiler
7380#    zeroshark: zero interpreter and shark/llvm compiler backend
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7382$as_echo_n "checking which variants of the JVM to build... " >&6; }
7383
7384# Check whether --with-jvm-variants was given.
7385if test "${with_jvm_variants+set}" = set; then :
7386  withval=$with_jvm_variants;
7387fi
7388
7389
7390if test "x$with_jvm_variants" = x; then
7391     with_jvm_variants="server"
7392fi
7393
7394JVM_VARIANTS=",$with_jvm_variants,"
7395TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7396
7397if test "x$TEST_VARIANTS" != "x,"; then
7398   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7399fi
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7401$as_echo "$with_jvm_variants" >&6; }
7402
7403JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7404JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7405JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7406JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7407JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7408
7409if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7410    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7411        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7412    fi
7413fi
7414if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7415    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7416        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7417    fi
7418fi
7419
7420# Replace the commas with AND for use in the build directory name.
7421ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7422COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7423if test "x$COUNT_VARIANTS" != "x,1"; then
7424    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7425else
7426    BUILDING_MULTIPLE_JVM_VARIANTS=no
7427fi
7428
7429
7430
7431
7432
7433
7434
7435
7436if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7437   MACOSX_UNIVERSAL="true"
7438fi
7439
7440
7441
7442
7443
7444###############################################################################
7445#
7446# Set the debug level
7447#    release: no debug information, all optimizations, no asserts.
7448#    fastdebug: debug information (-g), all optimizations, all asserts
7449#    slowdebug: debug information (-g), no optimizations, all asserts
7450#
7451DEBUG_LEVEL="release"
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7453$as_echo_n "checking which debug level to use... " >&6; }
7454# Check whether --enable-debug was given.
7455if test "${enable_debug+set}" = set; then :
7456  enableval=$enable_debug;
7457        ENABLE_DEBUG="${enableval}"
7458        DEBUG_LEVEL="fastdebug"
7459
7460else
7461  ENABLE_DEBUG="no"
7462fi
7463
7464
7465
7466# Check whether --with-debug-level was given.
7467if test "${with_debug_level+set}" = set; then :
7468  withval=$with_debug_level;
7469        DEBUG_LEVEL="${withval}"
7470        if test "x$ENABLE_DEBUG" = xyes; then
7471			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7472        fi
7473
7474fi
7475
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7477$as_echo "$DEBUG_LEVEL" >&6; }
7478
7479if test "x$DEBUG_LEVEL" != xrelease && \
7480   test "x$DEBUG_LEVEL" != xfastdebug && \
7481   test "x$DEBUG_LEVEL" != xslowdebug; then
7482   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7483fi
7484
7485
7486###############################################################################
7487#
7488# Setup legacy vars/targets and new vars to deal with different debug levels.
7489#
7490
7491case $DEBUG_LEVEL in
7492      release )
7493          VARIANT="OPT"
7494          FASTDEBUG="false"
7495          DEBUG_CLASSFILES="false"
7496          BUILD_VARIANT_RELEASE=""
7497          HOTSPOT_DEBUG_LEVEL="product"
7498          HOTSPOT_EXPORT="product"
7499           ;;
7500      fastdebug )
7501          VARIANT="DBG"
7502          FASTDEBUG="true"
7503          DEBUG_CLASSFILES="true"
7504          BUILD_VARIANT_RELEASE="-fastdebug"
7505          HOTSPOT_DEBUG_LEVEL="fastdebug"
7506          HOTSPOT_EXPORT="fastdebug"
7507           ;;
7508      slowdebug )
7509          VARIANT="DBG"
7510          FASTDEBUG="false"
7511          DEBUG_CLASSFILES="true"
7512          BUILD_VARIANT_RELEASE="-debug"
7513          HOTSPOT_DEBUG_LEVEL="jvmg"
7514          HOTSPOT_EXPORT="debug"
7515           ;;
7516esac
7517
7518#####
7519# Generate the legacy makefile targets for hotspot.
7520# The hotspot api for selecting the build artifacts, really, needs to be improved.
7521#
7522HOTSPOT_TARGET=""
7523
7524if test "x$JVM_VARIANT_SERVER" = xtrue; then
7525    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7526fi
7527
7528if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7529    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7530fi
7531
7532if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7533    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7534fi
7535
7536if test "x$JVM_VARIANT_ZERO" = xtrue; then
7537    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7538fi
7539
7540if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7541    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7542fi
7543
7544HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7545
7546# On Macosx universal binaries are produced, but they only contain
7547# 64 bit intel. This invalidates control of which jvms are built
7548# from configure, but only server is valid anyway. Fix this
7549# when hotspot makefiles are rewritten.
7550if test "x$MACOSX_UNIVERSAL" = xtrue; then
7551    HOTSPOT_TARGET=universal_product
7552fi
7553
7554#####
7555
7556
7557
7558
7559
7560
7561
7562
7563# With basic setup done, call the custom early hook.
7564
7565
7566# To properly create a configuration name, we need to have the OpenJDK target
7567# and options (variants and debug level) parsed.
7568
7569
7570
7571# Check whether --with-conf-name was given.
7572if test "${with_conf_name+set}" = set; then :
7573  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7574fi
7575
7576
7577# Test from where we are running configure, in or outside of src root.
7578if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7579    # We are running configure from the src root.
7580    # Create a default ./build/target-variant-debuglevel output root.
7581    if test "x${CONF_NAME}" = x; then
7582        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7583    fi
7584    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7585    $MKDIR -p "$OUTPUT_ROOT"
7586    if test ! -d "$OUTPUT_ROOT"; then
7587        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7588    fi
7589else
7590    # We are running configure from outside of the src dir.
7591    # Then use the current directory as output dir!
7592    # If configuration is situated in normal build directory, just use the build
7593    # directory name as configuration name, otherwise use the complete path.
7594    if test "x${CONF_NAME}" = x; then
7595        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7596    fi
7597    OUTPUT_ROOT="$CURDIR"
7598
7599    # WARNING: This might be a bad thing to do. You need to be sure you want to
7600    # have a configuration in this directory. Do some sanity checks!
7601
7602    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7603      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7604      # other files
7605      files_present=`$LS $OUTPUT_ROOT`
7606      if test "x$files_present" != x; then
7607        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7608$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7610$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7612$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7614$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7615        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7616$as_echo "$as_me: seriously mess up just about everything." >&6;}
7617        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7618$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7619        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7620$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7621        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7622      fi
7623    fi
7624fi
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7626$as_echo_n "checking what configuration name to use... " >&6; }
7627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7628$as_echo "$CONF_NAME" >&6; }
7629
7630
7631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7632
7633  # Input might be given as Windows format, start by converting to
7634  # unix format.
7635  path="$OUTPUT_ROOT"
7636  new_path=`$CYGPATH -u "$path"`
7637
7638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7641  # "foo.exe" is OK but "foo" is an error.
7642  #
7643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7644  # It is also a way to make sure we got the proper file name for the real test later on.
7645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7646  if test "x$test_shortpath" = x; then
7647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7648$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7649    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7650  fi
7651
7652  # Call helper function which possibly converts this using DOS-style short mode.
7653  # If so, the updated path is stored in $new_path.
7654
7655  input_path="$new_path"
7656  # Check if we need to convert this using DOS-style short mode. If the path
7657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7658  # take no chances and rewrite it.
7659  # Note: m4 eats our [], so we need to use [ and ] instead.
7660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7661  if test "x$has_forbidden_chars" != x; then
7662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7666      # Going to short mode and back again did indeed matter. Since short mode is
7667      # case insensitive, let's make it lowercase to improve readability.
7668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7669      # Now convert it back to Unix-stile (cygpath)
7670      input_path=`$CYGPATH -u "$shortmode_path"`
7671      new_path="$input_path"
7672    fi
7673  fi
7674
7675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7676  if test "x$test_cygdrive_prefix" = x; then
7677    # As a simple fix, exclude /usr/bin since it's not a real path.
7678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7680      # a path prefixed by /cygdrive for fixpath to work.
7681      new_path="$CYGWIN_ROOT_PATH$input_path"
7682    fi
7683  fi
7684
7685
7686  if test "x$path" != "x$new_path"; then
7687    OUTPUT_ROOT="$new_path"
7688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7689$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7690  fi
7691
7692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7693
7694  path="$OUTPUT_ROOT"
7695  has_colon=`$ECHO $path | $GREP ^.:`
7696  new_path="$path"
7697  if test "x$has_colon" = x; then
7698    # Not in mixed or Windows style, start by that.
7699    new_path=`cmd //c echo $path`
7700  fi
7701
7702
7703  input_path="$new_path"
7704  # Check if we need to convert this using DOS-style short mode. If the path
7705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7706  # take no chances and rewrite it.
7707  # Note: m4 eats our [], so we need to use [ and ] instead.
7708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7709  if test "x$has_forbidden_chars" != x; then
7710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7712  fi
7713
7714
7715  windows_path="$new_path"
7716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7717    unix_path=`$CYGPATH -u "$windows_path"`
7718    new_path="$unix_path"
7719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7721    new_path="$unix_path"
7722  fi
7723
7724  if test "x$path" != "x$new_path"; then
7725    OUTPUT_ROOT="$new_path"
7726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7727$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7728  fi
7729
7730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7732
7733  else
7734    # We're on a posix platform. Hooray! :)
7735    path="$OUTPUT_ROOT"
7736
7737    if test ! -f "$path" && test ! -d "$path"; then
7738      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7739    fi
7740
7741    has_space=`$ECHO "$path" | $GREP " "`
7742    if test "x$has_space" != x; then
7743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7744$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7745      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7746    fi
7747  fi
7748
7749
7750SPEC=$OUTPUT_ROOT/spec.gmk
7751
7752CONF_NAME=$CONF_NAME
7753
7754OUTPUT_ROOT=$OUTPUT_ROOT
7755
7756
7757# Most of the probed defines are put into config.h
7758ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7759
7760# The spec.gmk file contains all variables for the make system.
7761ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7762
7763# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7764ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7765
7766# The bootcycle-spec.gmk file contains support for boot cycle builds.
7767ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7768
7769# The compare.sh is used to compare the build output to other builds.
7770ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7771
7772# Spec.sh is currently used by compare-objects.sh
7773ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7774
7775# The generated Makefile knows where the spec.gmk is and where the source is.
7776# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7777# which will look for generated configurations
7778ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7779
7780
7781# Save the arguments given to us
7782echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7783
7784
7785# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7786
7787    for ac_prog in apt-get yum port pkgutil pkgadd
7788do
7789  # Extract the first word of "$ac_prog", so it can be a program name with args.
7790set dummy $ac_prog; ac_word=$2
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7792$as_echo_n "checking for $ac_word... " >&6; }
7793if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7794  $as_echo_n "(cached) " >&6
7795else
7796  if test -n "$PKGHANDLER"; then
7797  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7798else
7799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
7802  IFS=$as_save_IFS
7803  test -z "$as_dir" && as_dir=.
7804    for ac_exec_ext in '' $ac_executable_extensions; do
7805  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7806    ac_cv_prog_PKGHANDLER="$ac_prog"
7807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808    break 2
7809  fi
7810done
7811  done
7812IFS=$as_save_IFS
7813
7814fi
7815fi
7816PKGHANDLER=$ac_cv_prog_PKGHANDLER
7817if test -n "$PKGHANDLER"; then
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7819$as_echo "$PKGHANDLER" >&6; }
7820else
7821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822$as_echo "no" >&6; }
7823fi
7824
7825
7826  test -n "$PKGHANDLER" && break
7827done
7828
7829
7830
7831# Setup tools that requires more complex handling, or that is not needed by the configure script.
7832
7833
7834  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7835  if test "x$MAKE" != x; then
7836    # User has supplied a make, test it.
7837    if test ! -f "$MAKE"; then
7838      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7839    fi
7840
7841  MAKE_CANDIDATE=""$MAKE""
7842  DESCRIPTION="user supplied MAKE=$MAKE"
7843  if test "x$MAKE_CANDIDATE" != x; then
7844    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7845$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7846    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7847    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7848    if test "x$IS_GNU_MAKE" = x; then
7849      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7850$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7851    else
7852      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7853      if test "x$IS_MODERN_MAKE" = x; then
7854        { $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
7855$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;}
7856      else
7857        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7858          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7859            MAKE_EXPECTED_ENV='cygwin'
7860          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7861            MAKE_EXPECTED_ENV='msys'
7862          else
7863            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7864          fi
7865          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7866          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7867        else
7868          # Not relevant for non-Windows
7869          IS_MAKE_CORRECT_ENV=true
7870        fi
7871        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7872          { $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
7873$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;}
7874        else
7875          FOUND_MAKE=$MAKE_CANDIDATE
7876
7877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7878
7879  # First separate the path from the arguments. This will split at the first
7880  # space.
7881  complete="$FOUND_MAKE"
7882  path="${complete%% *}"
7883  tmp="$complete EOL"
7884  arguments="${tmp#* }"
7885
7886  # Input might be given as Windows format, start by converting to
7887  # unix format.
7888  new_path=`$CYGPATH -u "$path"`
7889
7890  # Now try to locate executable using which
7891  new_path=`$WHICH "$new_path" 2> /dev/null`
7892  if test "x$new_path" = x; then
7893    # Oops. Which didn't find the executable.
7894    # The splitting of arguments from the executable at a space might have been incorrect,
7895    # since paths with space are more likely in Windows. Give it another try with the whole
7896    # argument.
7897    path="$complete"
7898    arguments="EOL"
7899    new_path=`$CYGPATH -u "$path"`
7900    new_path=`$WHICH "$new_path" 2> /dev/null`
7901    if test "x$new_path" = x; then
7902      # It's still not found. Now this is an unrecoverable error.
7903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7905      has_space=`$ECHO "$complete" | $GREP " "`
7906      if test "x$has_space" != x; then
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7909      fi
7910      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7911    fi
7912  fi
7913
7914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7917  # "foo.exe" is OK but "foo" is an error.
7918  #
7919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7920  # It is also a way to make sure we got the proper file name for the real test later on.
7921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7922  if test "x$test_shortpath" = x; then
7923    # Short path failed, file does not exist as specified.
7924    # Try adding .exe or .cmd
7925    if test -f "${new_path}.exe"; then
7926       input_to_shortpath="${new_path}.exe"
7927    elif test -f "${new_path}.cmd"; then
7928       input_to_shortpath="${new_path}.cmd"
7929    else
7930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7931$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7934      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7935    fi
7936  else
7937    input_to_shortpath="$new_path"
7938  fi
7939
7940  # Call helper function which possibly converts this using DOS-style short mode.
7941  # If so, the updated path is stored in $new_path.
7942  new_path="$input_to_shortpath"
7943
7944  input_path="$input_to_shortpath"
7945  # Check if we need to convert this using DOS-style short mode. If the path
7946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7947  # take no chances and rewrite it.
7948  # Note: m4 eats our [], so we need to use [ and ] instead.
7949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7950  if test "x$has_forbidden_chars" != x; then
7951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7955      # Going to short mode and back again did indeed matter. Since short mode is
7956      # case insensitive, let's make it lowercase to improve readability.
7957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7958      # Now convert it back to Unix-stile (cygpath)
7959      input_path=`$CYGPATH -u "$shortmode_path"`
7960      new_path="$input_path"
7961    fi
7962  fi
7963
7964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7965  if test "x$test_cygdrive_prefix" = x; then
7966    # As a simple fix, exclude /usr/bin since it's not a real path.
7967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7969      # a path prefixed by /cygdrive for fixpath to work.
7970      new_path="$CYGWIN_ROOT_PATH$input_path"
7971    fi
7972  fi
7973
7974  # remove trailing .exe if any
7975  new_path="${new_path/%.exe/}"
7976
7977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7978
7979  # First separate the path from the arguments. This will split at the first
7980  # space.
7981  complete="$FOUND_MAKE"
7982  path="${complete%% *}"
7983  tmp="$complete EOL"
7984  arguments="${tmp#* }"
7985
7986  # Input might be given as Windows format, start by converting to
7987  # unix format.
7988  new_path="$path"
7989
7990  windows_path="$new_path"
7991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7992    unix_path=`$CYGPATH -u "$windows_path"`
7993    new_path="$unix_path"
7994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7996    new_path="$unix_path"
7997  fi
7998
7999
8000  # Now try to locate executable using which
8001  new_path=`$WHICH "$new_path" 2> /dev/null`
8002
8003  if test "x$new_path" = x; then
8004    # Oops. Which didn't find the executable.
8005    # The splitting of arguments from the executable at a space might have been incorrect,
8006    # since paths with space are more likely in Windows. Give it another try with the whole
8007    # argument.
8008    path="$complete"
8009    arguments="EOL"
8010    new_path="$path"
8011
8012  windows_path="$new_path"
8013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8014    unix_path=`$CYGPATH -u "$windows_path"`
8015    new_path="$unix_path"
8016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8018    new_path="$unix_path"
8019  fi
8020
8021
8022    new_path=`$WHICH "$new_path" 2> /dev/null`
8023
8024    if test "x$new_path" = x; then
8025      # It's still not found. Now this is an unrecoverable error.
8026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8027$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8028      has_space=`$ECHO "$complete" | $GREP " "`
8029      if test "x$has_space" != x; then
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8032      fi
8033      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8034    fi
8035  fi
8036
8037  # Now new_path has a complete unix path to the binary
8038  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8039    # Keep paths in /bin as-is, but remove trailing .exe if any
8040    new_path="${new_path/%.exe/}"
8041    # Do not save /bin paths to all_fixpath_prefixes!
8042  else
8043    # Not in mixed or Windows style, start by that.
8044    new_path=`cmd //c echo $new_path`
8045
8046  input_path="$new_path"
8047  # Check if we need to convert this using DOS-style short mode. If the path
8048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8049  # take no chances and rewrite it.
8050  # Note: m4 eats our [], so we need to use [ and ] instead.
8051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8052  if test "x$has_forbidden_chars" != x; then
8053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8055  fi
8056
8057    # Output is in $new_path
8058
8059  windows_path="$new_path"
8060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8061    unix_path=`$CYGPATH -u "$windows_path"`
8062    new_path="$unix_path"
8063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8065    new_path="$unix_path"
8066  fi
8067
8068    # remove trailing .exe if any
8069    new_path="${new_path/%.exe/}"
8070
8071    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8072    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8073  fi
8074
8075  else
8076    # We're on a posix platform. Hooray! :)
8077    # First separate the path from the arguments. This will split at the first
8078    # space.
8079    complete="$FOUND_MAKE"
8080    path="${complete%% *}"
8081    tmp="$complete EOL"
8082    arguments="${tmp#* }"
8083
8084    new_path=`$WHICH $path 2> /dev/null`
8085    if test "x$new_path" = x; then
8086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8087      if test "x$is_absolute_path" != x; then
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8089$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8090        new_path="$path"
8091      else
8092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8094        has_space=`$ECHO "$complete" | $GREP " "`
8095        if test "x$has_space" != x; then
8096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8098        fi
8099        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8100      fi
8101    fi
8102  fi
8103
8104  # Now join together the path and the arguments once again
8105  if test "x$arguments" != xEOL; then
8106      new_complete="$new_path ${arguments% *}"
8107  else
8108      new_complete="$new_path"
8109  fi
8110
8111  if test "x$complete" != "x$new_complete"; then
8112    FOUND_MAKE="$new_complete"
8113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8114$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8115  fi
8116
8117        fi
8118      fi
8119    fi
8120  fi
8121
8122    if test "x$FOUND_MAKE" = x; then
8123      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8124    fi
8125  else
8126    # Try our hardest to locate a correct version of GNU make
8127    for ac_prog in gmake
8128do
8129  # Extract the first word of "$ac_prog", so it can be a program name with args.
8130set dummy $ac_prog; ac_word=$2
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8132$as_echo_n "checking for $ac_word... " >&6; }
8133if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8134  $as_echo_n "(cached) " >&6
8135else
8136  case $CHECK_GMAKE in
8137  [\\/]* | ?:[\\/]*)
8138  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8139  ;;
8140  *)
8141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8142for as_dir in $PATH
8143do
8144  IFS=$as_save_IFS
8145  test -z "$as_dir" && as_dir=.
8146    for ac_exec_ext in '' $ac_executable_extensions; do
8147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8148    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8150    break 2
8151  fi
8152done
8153  done
8154IFS=$as_save_IFS
8155
8156  ;;
8157esac
8158fi
8159CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8160if test -n "$CHECK_GMAKE"; then
8161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8162$as_echo "$CHECK_GMAKE" >&6; }
8163else
8164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
8166fi
8167
8168
8169  test -n "$CHECK_GMAKE" && break
8170done
8171
8172
8173  MAKE_CANDIDATE=""$CHECK_GMAKE""
8174  DESCRIPTION="gmake in PATH"
8175  if test "x$MAKE_CANDIDATE" != x; then
8176    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8177$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8178    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8179    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8180    if test "x$IS_GNU_MAKE" = x; then
8181      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8182$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8183    else
8184      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8185      if test "x$IS_MODERN_MAKE" = x; then
8186        { $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
8187$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;}
8188      else
8189        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8190          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8191            MAKE_EXPECTED_ENV='cygwin'
8192          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8193            MAKE_EXPECTED_ENV='msys'
8194          else
8195            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8196          fi
8197          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8198          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8199        else
8200          # Not relevant for non-Windows
8201          IS_MAKE_CORRECT_ENV=true
8202        fi
8203        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8204          { $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
8205$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;}
8206        else
8207          FOUND_MAKE=$MAKE_CANDIDATE
8208
8209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8210
8211  # First separate the path from the arguments. This will split at the first
8212  # space.
8213  complete="$FOUND_MAKE"
8214  path="${complete%% *}"
8215  tmp="$complete EOL"
8216  arguments="${tmp#* }"
8217
8218  # Input might be given as Windows format, start by converting to
8219  # unix format.
8220  new_path=`$CYGPATH -u "$path"`
8221
8222  # Now try to locate executable using which
8223  new_path=`$WHICH "$new_path" 2> /dev/null`
8224  if test "x$new_path" = x; then
8225    # Oops. Which didn't find the executable.
8226    # The splitting of arguments from the executable at a space might have been incorrect,
8227    # since paths with space are more likely in Windows. Give it another try with the whole
8228    # argument.
8229    path="$complete"
8230    arguments="EOL"
8231    new_path=`$CYGPATH -u "$path"`
8232    new_path=`$WHICH "$new_path" 2> /dev/null`
8233    if test "x$new_path" = x; then
8234      # It's still not found. Now this is an unrecoverable error.
8235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8237      has_space=`$ECHO "$complete" | $GREP " "`
8238      if test "x$has_space" != x; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8241      fi
8242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8243    fi
8244  fi
8245
8246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8249  # "foo.exe" is OK but "foo" is an error.
8250  #
8251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8252  # It is also a way to make sure we got the proper file name for the real test later on.
8253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8254  if test "x$test_shortpath" = x; then
8255    # Short path failed, file does not exist as specified.
8256    # Try adding .exe or .cmd
8257    if test -f "${new_path}.exe"; then
8258       input_to_shortpath="${new_path}.exe"
8259    elif test -f "${new_path}.cmd"; then
8260       input_to_shortpath="${new_path}.cmd"
8261    else
8262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8267    fi
8268  else
8269    input_to_shortpath="$new_path"
8270  fi
8271
8272  # Call helper function which possibly converts this using DOS-style short mode.
8273  # If so, the updated path is stored in $new_path.
8274  new_path="$input_to_shortpath"
8275
8276  input_path="$input_to_shortpath"
8277  # Check if we need to convert this using DOS-style short mode. If the path
8278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8279  # take no chances and rewrite it.
8280  # Note: m4 eats our [], so we need to use [ and ] instead.
8281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8282  if test "x$has_forbidden_chars" != x; then
8283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8287      # Going to short mode and back again did indeed matter. Since short mode is
8288      # case insensitive, let's make it lowercase to improve readability.
8289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8290      # Now convert it back to Unix-stile (cygpath)
8291      input_path=`$CYGPATH -u "$shortmode_path"`
8292      new_path="$input_path"
8293    fi
8294  fi
8295
8296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8297  if test "x$test_cygdrive_prefix" = x; then
8298    # As a simple fix, exclude /usr/bin since it's not a real path.
8299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8301      # a path prefixed by /cygdrive for fixpath to work.
8302      new_path="$CYGWIN_ROOT_PATH$input_path"
8303    fi
8304  fi
8305
8306  # remove trailing .exe if any
8307  new_path="${new_path/%.exe/}"
8308
8309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8310
8311  # First separate the path from the arguments. This will split at the first
8312  # space.
8313  complete="$FOUND_MAKE"
8314  path="${complete%% *}"
8315  tmp="$complete EOL"
8316  arguments="${tmp#* }"
8317
8318  # Input might be given as Windows format, start by converting to
8319  # unix format.
8320  new_path="$path"
8321
8322  windows_path="$new_path"
8323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8324    unix_path=`$CYGPATH -u "$windows_path"`
8325    new_path="$unix_path"
8326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8328    new_path="$unix_path"
8329  fi
8330
8331
8332  # Now try to locate executable using which
8333  new_path=`$WHICH "$new_path" 2> /dev/null`
8334
8335  if test "x$new_path" = x; then
8336    # Oops. Which didn't find the executable.
8337    # The splitting of arguments from the executable at a space might have been incorrect,
8338    # since paths with space are more likely in Windows. Give it another try with the whole
8339    # argument.
8340    path="$complete"
8341    arguments="EOL"
8342    new_path="$path"
8343
8344  windows_path="$new_path"
8345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8346    unix_path=`$CYGPATH -u "$windows_path"`
8347    new_path="$unix_path"
8348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8350    new_path="$unix_path"
8351  fi
8352
8353
8354    new_path=`$WHICH "$new_path" 2> /dev/null`
8355
8356    if test "x$new_path" = x; then
8357      # It's still not found. Now this is an unrecoverable error.
8358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8360      has_space=`$ECHO "$complete" | $GREP " "`
8361      if test "x$has_space" != x; then
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8364      fi
8365      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8366    fi
8367  fi
8368
8369  # Now new_path has a complete unix path to the binary
8370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8371    # Keep paths in /bin as-is, but remove trailing .exe if any
8372    new_path="${new_path/%.exe/}"
8373    # Do not save /bin paths to all_fixpath_prefixes!
8374  else
8375    # Not in mixed or Windows style, start by that.
8376    new_path=`cmd //c echo $new_path`
8377
8378  input_path="$new_path"
8379  # Check if we need to convert this using DOS-style short mode. If the path
8380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8381  # take no chances and rewrite it.
8382  # Note: m4 eats our [], so we need to use [ and ] instead.
8383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8384  if test "x$has_forbidden_chars" != x; then
8385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8387  fi
8388
8389    # Output is in $new_path
8390
8391  windows_path="$new_path"
8392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8393    unix_path=`$CYGPATH -u "$windows_path"`
8394    new_path="$unix_path"
8395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8397    new_path="$unix_path"
8398  fi
8399
8400    # remove trailing .exe if any
8401    new_path="${new_path/%.exe/}"
8402
8403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8405  fi
8406
8407  else
8408    # We're on a posix platform. Hooray! :)
8409    # First separate the path from the arguments. This will split at the first
8410    # space.
8411    complete="$FOUND_MAKE"
8412    path="${complete%% *}"
8413    tmp="$complete EOL"
8414    arguments="${tmp#* }"
8415
8416    new_path=`$WHICH $path 2> /dev/null`
8417    if test "x$new_path" = x; then
8418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8419      if test "x$is_absolute_path" != x; then
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8421$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8422        new_path="$path"
8423      else
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8425$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8426        has_space=`$ECHO "$complete" | $GREP " "`
8427        if test "x$has_space" != x; then
8428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8430        fi
8431        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8432      fi
8433    fi
8434  fi
8435
8436  # Now join together the path and the arguments once again
8437  if test "x$arguments" != xEOL; then
8438      new_complete="$new_path ${arguments% *}"
8439  else
8440      new_complete="$new_path"
8441  fi
8442
8443  if test "x$complete" != "x$new_complete"; then
8444    FOUND_MAKE="$new_complete"
8445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8446$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8447  fi
8448
8449        fi
8450      fi
8451    fi
8452  fi
8453
8454
8455    if test "x$FOUND_MAKE" = x; then
8456      for ac_prog in make
8457do
8458  # Extract the first word of "$ac_prog", so it can be a program name with args.
8459set dummy $ac_prog; ac_word=$2
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8461$as_echo_n "checking for $ac_word... " >&6; }
8462if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8463  $as_echo_n "(cached) " >&6
8464else
8465  case $CHECK_MAKE in
8466  [\\/]* | ?:[\\/]*)
8467  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8468  ;;
8469  *)
8470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8471for as_dir in $PATH
8472do
8473  IFS=$as_save_IFS
8474  test -z "$as_dir" && as_dir=.
8475    for ac_exec_ext in '' $ac_executable_extensions; do
8476  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8477    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8479    break 2
8480  fi
8481done
8482  done
8483IFS=$as_save_IFS
8484
8485  ;;
8486esac
8487fi
8488CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8489if test -n "$CHECK_MAKE"; then
8490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8491$as_echo "$CHECK_MAKE" >&6; }
8492else
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8494$as_echo "no" >&6; }
8495fi
8496
8497
8498  test -n "$CHECK_MAKE" && break
8499done
8500
8501
8502  MAKE_CANDIDATE=""$CHECK_MAKE""
8503  DESCRIPTION="make in PATH"
8504  if test "x$MAKE_CANDIDATE" != x; then
8505    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8506$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8507    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8508    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8509    if test "x$IS_GNU_MAKE" = x; then
8510      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8511$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8512    else
8513      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8514      if test "x$IS_MODERN_MAKE" = x; then
8515        { $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
8516$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;}
8517      else
8518        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8519          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8520            MAKE_EXPECTED_ENV='cygwin'
8521          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8522            MAKE_EXPECTED_ENV='msys'
8523          else
8524            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8525          fi
8526          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8527          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8528        else
8529          # Not relevant for non-Windows
8530          IS_MAKE_CORRECT_ENV=true
8531        fi
8532        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8533          { $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
8534$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;}
8535        else
8536          FOUND_MAKE=$MAKE_CANDIDATE
8537
8538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8539
8540  # First separate the path from the arguments. This will split at the first
8541  # space.
8542  complete="$FOUND_MAKE"
8543  path="${complete%% *}"
8544  tmp="$complete EOL"
8545  arguments="${tmp#* }"
8546
8547  # Input might be given as Windows format, start by converting to
8548  # unix format.
8549  new_path=`$CYGPATH -u "$path"`
8550
8551  # Now try to locate executable using which
8552  new_path=`$WHICH "$new_path" 2> /dev/null`
8553  if test "x$new_path" = x; then
8554    # Oops. Which didn't find the executable.
8555    # The splitting of arguments from the executable at a space might have been incorrect,
8556    # since paths with space are more likely in Windows. Give it another try with the whole
8557    # argument.
8558    path="$complete"
8559    arguments="EOL"
8560    new_path=`$CYGPATH -u "$path"`
8561    new_path=`$WHICH "$new_path" 2> /dev/null`
8562    if test "x$new_path" = x; then
8563      # It's still not found. Now this is an unrecoverable error.
8564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8566      has_space=`$ECHO "$complete" | $GREP " "`
8567      if test "x$has_space" != x; then
8568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8570      fi
8571      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8572    fi
8573  fi
8574
8575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8578  # "foo.exe" is OK but "foo" is an error.
8579  #
8580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8581  # It is also a way to make sure we got the proper file name for the real test later on.
8582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8583  if test "x$test_shortpath" = x; then
8584    # Short path failed, file does not exist as specified.
8585    # Try adding .exe or .cmd
8586    if test -f "${new_path}.exe"; then
8587       input_to_shortpath="${new_path}.exe"
8588    elif test -f "${new_path}.cmd"; then
8589       input_to_shortpath="${new_path}.cmd"
8590    else
8591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8596    fi
8597  else
8598    input_to_shortpath="$new_path"
8599  fi
8600
8601  # Call helper function which possibly converts this using DOS-style short mode.
8602  # If so, the updated path is stored in $new_path.
8603  new_path="$input_to_shortpath"
8604
8605  input_path="$input_to_shortpath"
8606  # Check if we need to convert this using DOS-style short mode. If the path
8607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8608  # take no chances and rewrite it.
8609  # Note: m4 eats our [], so we need to use [ and ] instead.
8610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8611  if test "x$has_forbidden_chars" != x; then
8612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8616      # Going to short mode and back again did indeed matter. Since short mode is
8617      # case insensitive, let's make it lowercase to improve readability.
8618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8619      # Now convert it back to Unix-stile (cygpath)
8620      input_path=`$CYGPATH -u "$shortmode_path"`
8621      new_path="$input_path"
8622    fi
8623  fi
8624
8625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8626  if test "x$test_cygdrive_prefix" = x; then
8627    # As a simple fix, exclude /usr/bin since it's not a real path.
8628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8630      # a path prefixed by /cygdrive for fixpath to work.
8631      new_path="$CYGWIN_ROOT_PATH$input_path"
8632    fi
8633  fi
8634
8635  # remove trailing .exe if any
8636  new_path="${new_path/%.exe/}"
8637
8638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8639
8640  # First separate the path from the arguments. This will split at the first
8641  # space.
8642  complete="$FOUND_MAKE"
8643  path="${complete%% *}"
8644  tmp="$complete EOL"
8645  arguments="${tmp#* }"
8646
8647  # Input might be given as Windows format, start by converting to
8648  # unix format.
8649  new_path="$path"
8650
8651  windows_path="$new_path"
8652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8653    unix_path=`$CYGPATH -u "$windows_path"`
8654    new_path="$unix_path"
8655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8657    new_path="$unix_path"
8658  fi
8659
8660
8661  # Now try to locate executable using which
8662  new_path=`$WHICH "$new_path" 2> /dev/null`
8663
8664  if test "x$new_path" = x; then
8665    # Oops. Which didn't find the executable.
8666    # The splitting of arguments from the executable at a space might have been incorrect,
8667    # since paths with space are more likely in Windows. Give it another try with the whole
8668    # argument.
8669    path="$complete"
8670    arguments="EOL"
8671    new_path="$path"
8672
8673  windows_path="$new_path"
8674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8675    unix_path=`$CYGPATH -u "$windows_path"`
8676    new_path="$unix_path"
8677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8679    new_path="$unix_path"
8680  fi
8681
8682
8683    new_path=`$WHICH "$new_path" 2> /dev/null`
8684
8685    if test "x$new_path" = x; then
8686      # It's still not found. Now this is an unrecoverable error.
8687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8689      has_space=`$ECHO "$complete" | $GREP " "`
8690      if test "x$has_space" != x; then
8691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8693      fi
8694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8695    fi
8696  fi
8697
8698  # Now new_path has a complete unix path to the binary
8699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8700    # Keep paths in /bin as-is, but remove trailing .exe if any
8701    new_path="${new_path/%.exe/}"
8702    # Do not save /bin paths to all_fixpath_prefixes!
8703  else
8704    # Not in mixed or Windows style, start by that.
8705    new_path=`cmd //c echo $new_path`
8706
8707  input_path="$new_path"
8708  # Check if we need to convert this using DOS-style short mode. If the path
8709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8710  # take no chances and rewrite it.
8711  # Note: m4 eats our [], so we need to use [ and ] instead.
8712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8713  if test "x$has_forbidden_chars" != x; then
8714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8716  fi
8717
8718    # Output is in $new_path
8719
8720  windows_path="$new_path"
8721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8722    unix_path=`$CYGPATH -u "$windows_path"`
8723    new_path="$unix_path"
8724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8726    new_path="$unix_path"
8727  fi
8728
8729    # remove trailing .exe if any
8730    new_path="${new_path/%.exe/}"
8731
8732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8734  fi
8735
8736  else
8737    # We're on a posix platform. Hooray! :)
8738    # First separate the path from the arguments. This will split at the first
8739    # space.
8740    complete="$FOUND_MAKE"
8741    path="${complete%% *}"
8742    tmp="$complete EOL"
8743    arguments="${tmp#* }"
8744
8745    new_path=`$WHICH $path 2> /dev/null`
8746    if test "x$new_path" = x; then
8747      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8748      if test "x$is_absolute_path" != x; then
8749        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8750$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8751        new_path="$path"
8752      else
8753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8754$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8755        has_space=`$ECHO "$complete" | $GREP " "`
8756        if test "x$has_space" != x; then
8757          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8759        fi
8760        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8761      fi
8762    fi
8763  fi
8764
8765  # Now join together the path and the arguments once again
8766  if test "x$arguments" != xEOL; then
8767      new_complete="$new_path ${arguments% *}"
8768  else
8769      new_complete="$new_path"
8770  fi
8771
8772  if test "x$complete" != "x$new_complete"; then
8773    FOUND_MAKE="$new_complete"
8774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8775$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8776  fi
8777
8778        fi
8779      fi
8780    fi
8781  fi
8782
8783    fi
8784
8785    if test "x$FOUND_MAKE" = x; then
8786      if test "x$TOOLS_DIR" != x; then
8787        # We have a tools-dir, check that as well before giving up.
8788        OLD_PATH=$PATH
8789        PATH=$TOOLS_DIR:$PATH
8790        for ac_prog in gmake
8791do
8792  # Extract the first word of "$ac_prog", so it can be a program name with args.
8793set dummy $ac_prog; ac_word=$2
8794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8795$as_echo_n "checking for $ac_word... " >&6; }
8796if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8797  $as_echo_n "(cached) " >&6
8798else
8799  case $CHECK_TOOLSDIR_GMAKE in
8800  [\\/]* | ?:[\\/]*)
8801  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8802  ;;
8803  *)
8804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8805for as_dir in $PATH
8806do
8807  IFS=$as_save_IFS
8808  test -z "$as_dir" && as_dir=.
8809    for ac_exec_ext in '' $ac_executable_extensions; do
8810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8811    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8813    break 2
8814  fi
8815done
8816  done
8817IFS=$as_save_IFS
8818
8819  ;;
8820esac
8821fi
8822CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8823if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8825$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8826else
8827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8828$as_echo "no" >&6; }
8829fi
8830
8831
8832  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8833done
8834
8835
8836  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8837  DESCRIPTION="gmake in tools-dir"
8838  if test "x$MAKE_CANDIDATE" != x; then
8839    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8840$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8841    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8842    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8843    if test "x$IS_GNU_MAKE" = x; then
8844      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8845$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8846    else
8847      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8848      if test "x$IS_MODERN_MAKE" = x; then
8849        { $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
8850$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;}
8851      else
8852        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8853          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8854            MAKE_EXPECTED_ENV='cygwin'
8855          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8856            MAKE_EXPECTED_ENV='msys'
8857          else
8858            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8859          fi
8860          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8861          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8862        else
8863          # Not relevant for non-Windows
8864          IS_MAKE_CORRECT_ENV=true
8865        fi
8866        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8867          { $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
8868$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;}
8869        else
8870          FOUND_MAKE=$MAKE_CANDIDATE
8871
8872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8873
8874  # First separate the path from the arguments. This will split at the first
8875  # space.
8876  complete="$FOUND_MAKE"
8877  path="${complete%% *}"
8878  tmp="$complete EOL"
8879  arguments="${tmp#* }"
8880
8881  # Input might be given as Windows format, start by converting to
8882  # unix format.
8883  new_path=`$CYGPATH -u "$path"`
8884
8885  # Now try to locate executable using which
8886  new_path=`$WHICH "$new_path" 2> /dev/null`
8887  if test "x$new_path" = x; then
8888    # Oops. Which didn't find the executable.
8889    # The splitting of arguments from the executable at a space might have been incorrect,
8890    # since paths with space are more likely in Windows. Give it another try with the whole
8891    # argument.
8892    path="$complete"
8893    arguments="EOL"
8894    new_path=`$CYGPATH -u "$path"`
8895    new_path=`$WHICH "$new_path" 2> /dev/null`
8896    if test "x$new_path" = x; then
8897      # It's still not found. Now this is an unrecoverable error.
8898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8899$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8900      has_space=`$ECHO "$complete" | $GREP " "`
8901      if test "x$has_space" != x; then
8902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8904      fi
8905      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8906    fi
8907  fi
8908
8909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8912  # "foo.exe" is OK but "foo" is an error.
8913  #
8914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8915  # It is also a way to make sure we got the proper file name for the real test later on.
8916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8917  if test "x$test_shortpath" = x; then
8918    # Short path failed, file does not exist as specified.
8919    # Try adding .exe or .cmd
8920    if test -f "${new_path}.exe"; then
8921       input_to_shortpath="${new_path}.exe"
8922    elif test -f "${new_path}.cmd"; then
8923       input_to_shortpath="${new_path}.cmd"
8924    else
8925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8926$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8927      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8928$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8929      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8930    fi
8931  else
8932    input_to_shortpath="$new_path"
8933  fi
8934
8935  # Call helper function which possibly converts this using DOS-style short mode.
8936  # If so, the updated path is stored in $new_path.
8937  new_path="$input_to_shortpath"
8938
8939  input_path="$input_to_shortpath"
8940  # Check if we need to convert this using DOS-style short mode. If the path
8941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8942  # take no chances and rewrite it.
8943  # Note: m4 eats our [], so we need to use [ and ] instead.
8944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8945  if test "x$has_forbidden_chars" != x; then
8946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8950      # Going to short mode and back again did indeed matter. Since short mode is
8951      # case insensitive, let's make it lowercase to improve readability.
8952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8953      # Now convert it back to Unix-stile (cygpath)
8954      input_path=`$CYGPATH -u "$shortmode_path"`
8955      new_path="$input_path"
8956    fi
8957  fi
8958
8959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8960  if test "x$test_cygdrive_prefix" = x; then
8961    # As a simple fix, exclude /usr/bin since it's not a real path.
8962    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8964      # a path prefixed by /cygdrive for fixpath to work.
8965      new_path="$CYGWIN_ROOT_PATH$input_path"
8966    fi
8967  fi
8968
8969  # remove trailing .exe if any
8970  new_path="${new_path/%.exe/}"
8971
8972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8973
8974  # First separate the path from the arguments. This will split at the first
8975  # space.
8976  complete="$FOUND_MAKE"
8977  path="${complete%% *}"
8978  tmp="$complete EOL"
8979  arguments="${tmp#* }"
8980
8981  # Input might be given as Windows format, start by converting to
8982  # unix format.
8983  new_path="$path"
8984
8985  windows_path="$new_path"
8986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8987    unix_path=`$CYGPATH -u "$windows_path"`
8988    new_path="$unix_path"
8989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8991    new_path="$unix_path"
8992  fi
8993
8994
8995  # Now try to locate executable using which
8996  new_path=`$WHICH "$new_path" 2> /dev/null`
8997
8998  if test "x$new_path" = x; then
8999    # Oops. Which didn't find the executable.
9000    # The splitting of arguments from the executable at a space might have been incorrect,
9001    # since paths with space are more likely in Windows. Give it another try with the whole
9002    # argument.
9003    path="$complete"
9004    arguments="EOL"
9005    new_path="$path"
9006
9007  windows_path="$new_path"
9008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9009    unix_path=`$CYGPATH -u "$windows_path"`
9010    new_path="$unix_path"
9011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9013    new_path="$unix_path"
9014  fi
9015
9016
9017    new_path=`$WHICH "$new_path" 2> /dev/null`
9018
9019    if test "x$new_path" = x; then
9020      # It's still not found. Now this is an unrecoverable error.
9021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9023      has_space=`$ECHO "$complete" | $GREP " "`
9024      if test "x$has_space" != x; then
9025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9027      fi
9028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9029    fi
9030  fi
9031
9032  # Now new_path has a complete unix path to the binary
9033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9034    # Keep paths in /bin as-is, but remove trailing .exe if any
9035    new_path="${new_path/%.exe/}"
9036    # Do not save /bin paths to all_fixpath_prefixes!
9037  else
9038    # Not in mixed or Windows style, start by that.
9039    new_path=`cmd //c echo $new_path`
9040
9041  input_path="$new_path"
9042  # Check if we need to convert this using DOS-style short mode. If the path
9043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9044  # take no chances and rewrite it.
9045  # Note: m4 eats our [], so we need to use [ and ] instead.
9046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9047  if test "x$has_forbidden_chars" != x; then
9048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9050  fi
9051
9052    # Output is in $new_path
9053
9054  windows_path="$new_path"
9055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9056    unix_path=`$CYGPATH -u "$windows_path"`
9057    new_path="$unix_path"
9058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9060    new_path="$unix_path"
9061  fi
9062
9063    # remove trailing .exe if any
9064    new_path="${new_path/%.exe/}"
9065
9066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9068  fi
9069
9070  else
9071    # We're on a posix platform. Hooray! :)
9072    # First separate the path from the arguments. This will split at the first
9073    # space.
9074    complete="$FOUND_MAKE"
9075    path="${complete%% *}"
9076    tmp="$complete EOL"
9077    arguments="${tmp#* }"
9078
9079    new_path=`$WHICH $path 2> /dev/null`
9080    if test "x$new_path" = x; then
9081      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9082      if test "x$is_absolute_path" != x; then
9083        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9084$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9085        new_path="$path"
9086      else
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9089        has_space=`$ECHO "$complete" | $GREP " "`
9090        if test "x$has_space" != x; then
9091          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9092$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9093        fi
9094        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9095      fi
9096    fi
9097  fi
9098
9099  # Now join together the path and the arguments once again
9100  if test "x$arguments" != xEOL; then
9101      new_complete="$new_path ${arguments% *}"
9102  else
9103      new_complete="$new_path"
9104  fi
9105
9106  if test "x$complete" != "x$new_complete"; then
9107    FOUND_MAKE="$new_complete"
9108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9109$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9110  fi
9111
9112        fi
9113      fi
9114    fi
9115  fi
9116
9117        if test "x$FOUND_MAKE" = x; then
9118          for ac_prog in make
9119do
9120  # Extract the first word of "$ac_prog", so it can be a program name with args.
9121set dummy $ac_prog; ac_word=$2
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123$as_echo_n "checking for $ac_word... " >&6; }
9124if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9125  $as_echo_n "(cached) " >&6
9126else
9127  case $CHECK_TOOLSDIR_MAKE in
9128  [\\/]* | ?:[\\/]*)
9129  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9130  ;;
9131  *)
9132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9133for as_dir in $PATH
9134do
9135  IFS=$as_save_IFS
9136  test -z "$as_dir" && as_dir=.
9137    for ac_exec_ext in '' $ac_executable_extensions; do
9138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9139    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9141    break 2
9142  fi
9143done
9144  done
9145IFS=$as_save_IFS
9146
9147  ;;
9148esac
9149fi
9150CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9151if test -n "$CHECK_TOOLSDIR_MAKE"; then
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9153$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9154else
9155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9156$as_echo "no" >&6; }
9157fi
9158
9159
9160  test -n "$CHECK_TOOLSDIR_MAKE" && break
9161done
9162
9163
9164  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9165  DESCRIPTION="make in tools-dir"
9166  if test "x$MAKE_CANDIDATE" != x; then
9167    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9168$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9169    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9170    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9171    if test "x$IS_GNU_MAKE" = x; then
9172      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9173$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9174    else
9175      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9176      if test "x$IS_MODERN_MAKE" = x; then
9177        { $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
9178$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;}
9179      else
9180        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9181          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9182            MAKE_EXPECTED_ENV='cygwin'
9183          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9184            MAKE_EXPECTED_ENV='msys'
9185          else
9186            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9187          fi
9188          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9189          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9190        else
9191          # Not relevant for non-Windows
9192          IS_MAKE_CORRECT_ENV=true
9193        fi
9194        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9195          { $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
9196$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;}
9197        else
9198          FOUND_MAKE=$MAKE_CANDIDATE
9199
9200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9201
9202  # First separate the path from the arguments. This will split at the first
9203  # space.
9204  complete="$FOUND_MAKE"
9205  path="${complete%% *}"
9206  tmp="$complete EOL"
9207  arguments="${tmp#* }"
9208
9209  # Input might be given as Windows format, start by converting to
9210  # unix format.
9211  new_path=`$CYGPATH -u "$path"`
9212
9213  # Now try to locate executable using which
9214  new_path=`$WHICH "$new_path" 2> /dev/null`
9215  if test "x$new_path" = x; then
9216    # Oops. Which didn't find the executable.
9217    # The splitting of arguments from the executable at a space might have been incorrect,
9218    # since paths with space are more likely in Windows. Give it another try with the whole
9219    # argument.
9220    path="$complete"
9221    arguments="EOL"
9222    new_path=`$CYGPATH -u "$path"`
9223    new_path=`$WHICH "$new_path" 2> /dev/null`
9224    if test "x$new_path" = x; then
9225      # It's still not found. Now this is an unrecoverable error.
9226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9228      has_space=`$ECHO "$complete" | $GREP " "`
9229      if test "x$has_space" != x; then
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9232      fi
9233      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9234    fi
9235  fi
9236
9237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9240  # "foo.exe" is OK but "foo" is an error.
9241  #
9242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9243  # It is also a way to make sure we got the proper file name for the real test later on.
9244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9245  if test "x$test_shortpath" = x; then
9246    # Short path failed, file does not exist as specified.
9247    # Try adding .exe or .cmd
9248    if test -f "${new_path}.exe"; then
9249       input_to_shortpath="${new_path}.exe"
9250    elif test -f "${new_path}.cmd"; then
9251       input_to_shortpath="${new_path}.cmd"
9252    else
9253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9257      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9258    fi
9259  else
9260    input_to_shortpath="$new_path"
9261  fi
9262
9263  # Call helper function which possibly converts this using DOS-style short mode.
9264  # If so, the updated path is stored in $new_path.
9265  new_path="$input_to_shortpath"
9266
9267  input_path="$input_to_shortpath"
9268  # Check if we need to convert this using DOS-style short mode. If the path
9269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9270  # take no chances and rewrite it.
9271  # Note: m4 eats our [], so we need to use [ and ] instead.
9272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9273  if test "x$has_forbidden_chars" != x; then
9274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9278      # Going to short mode and back again did indeed matter. Since short mode is
9279      # case insensitive, let's make it lowercase to improve readability.
9280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9281      # Now convert it back to Unix-stile (cygpath)
9282      input_path=`$CYGPATH -u "$shortmode_path"`
9283      new_path="$input_path"
9284    fi
9285  fi
9286
9287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9288  if test "x$test_cygdrive_prefix" = x; then
9289    # As a simple fix, exclude /usr/bin since it's not a real path.
9290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9292      # a path prefixed by /cygdrive for fixpath to work.
9293      new_path="$CYGWIN_ROOT_PATH$input_path"
9294    fi
9295  fi
9296
9297  # remove trailing .exe if any
9298  new_path="${new_path/%.exe/}"
9299
9300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9301
9302  # First separate the path from the arguments. This will split at the first
9303  # space.
9304  complete="$FOUND_MAKE"
9305  path="${complete%% *}"
9306  tmp="$complete EOL"
9307  arguments="${tmp#* }"
9308
9309  # Input might be given as Windows format, start by converting to
9310  # unix format.
9311  new_path="$path"
9312
9313  windows_path="$new_path"
9314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9315    unix_path=`$CYGPATH -u "$windows_path"`
9316    new_path="$unix_path"
9317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9319    new_path="$unix_path"
9320  fi
9321
9322
9323  # Now try to locate executable using which
9324  new_path=`$WHICH "$new_path" 2> /dev/null`
9325
9326  if test "x$new_path" = x; then
9327    # Oops. Which didn't find the executable.
9328    # The splitting of arguments from the executable at a space might have been incorrect,
9329    # since paths with space are more likely in Windows. Give it another try with the whole
9330    # argument.
9331    path="$complete"
9332    arguments="EOL"
9333    new_path="$path"
9334
9335  windows_path="$new_path"
9336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9337    unix_path=`$CYGPATH -u "$windows_path"`
9338    new_path="$unix_path"
9339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9341    new_path="$unix_path"
9342  fi
9343
9344
9345    new_path=`$WHICH "$new_path" 2> /dev/null`
9346
9347    if test "x$new_path" = x; then
9348      # It's still not found. Now this is an unrecoverable error.
9349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9350$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9351      has_space=`$ECHO "$complete" | $GREP " "`
9352      if test "x$has_space" != x; then
9353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9355      fi
9356      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9357    fi
9358  fi
9359
9360  # Now new_path has a complete unix path to the binary
9361  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9362    # Keep paths in /bin as-is, but remove trailing .exe if any
9363    new_path="${new_path/%.exe/}"
9364    # Do not save /bin paths to all_fixpath_prefixes!
9365  else
9366    # Not in mixed or Windows style, start by that.
9367    new_path=`cmd //c echo $new_path`
9368
9369  input_path="$new_path"
9370  # Check if we need to convert this using DOS-style short mode. If the path
9371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9372  # take no chances and rewrite it.
9373  # Note: m4 eats our [], so we need to use [ and ] instead.
9374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9375  if test "x$has_forbidden_chars" != x; then
9376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9378  fi
9379
9380    # Output is in $new_path
9381
9382  windows_path="$new_path"
9383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9384    unix_path=`$CYGPATH -u "$windows_path"`
9385    new_path="$unix_path"
9386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9388    new_path="$unix_path"
9389  fi
9390
9391    # remove trailing .exe if any
9392    new_path="${new_path/%.exe/}"
9393
9394    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9395    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9396  fi
9397
9398  else
9399    # We're on a posix platform. Hooray! :)
9400    # First separate the path from the arguments. This will split at the first
9401    # space.
9402    complete="$FOUND_MAKE"
9403    path="${complete%% *}"
9404    tmp="$complete EOL"
9405    arguments="${tmp#* }"
9406
9407    new_path=`$WHICH $path 2> /dev/null`
9408    if test "x$new_path" = x; then
9409      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9410      if test "x$is_absolute_path" != x; then
9411        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9412$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9413        new_path="$path"
9414      else
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9416$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9417        has_space=`$ECHO "$complete" | $GREP " "`
9418        if test "x$has_space" != x; then
9419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9421        fi
9422        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9423      fi
9424    fi
9425  fi
9426
9427  # Now join together the path and the arguments once again
9428  if test "x$arguments" != xEOL; then
9429      new_complete="$new_path ${arguments% *}"
9430  else
9431      new_complete="$new_path"
9432  fi
9433
9434  if test "x$complete" != "x$new_complete"; then
9435    FOUND_MAKE="$new_complete"
9436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9437$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9438  fi
9439
9440        fi
9441      fi
9442    fi
9443  fi
9444
9445        fi
9446        PATH=$OLD_PATH
9447      fi
9448    fi
9449
9450    if test "x$FOUND_MAKE" = x; then
9451      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
9452    fi
9453  fi
9454
9455  MAKE=$FOUND_MAKE
9456
9457  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9458$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9459
9460
9461
9462    # Test if find supports -delete
9463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9464$as_echo_n "checking if find supports -delete... " >&6; }
9465    FIND_DELETE="-delete"
9466
9467    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9468
9469    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9470
9471    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9472    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9473        # No, it does not.
9474        rm $DELETEDIR/TestIfFindSupportsDelete
9475        FIND_DELETE="-exec rm \{\} \+"
9476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478    else
9479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9480$as_echo "yes" >&6; }
9481    fi
9482    rmdir $DELETEDIR
9483
9484
9485
9486# These tools might not be installed by default,
9487# need hint on how to install them.
9488
9489    for ac_prog in unzip
9490do
9491  # Extract the first word of "$ac_prog", so it can be a program name with args.
9492set dummy $ac_prog; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if test "${ac_cv_path_UNZIP+set}" = set; then :
9496  $as_echo_n "(cached) " >&6
9497else
9498  case $UNZIP in
9499  [\\/]* | ?:[\\/]*)
9500  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9501  ;;
9502  *)
9503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506  IFS=$as_save_IFS
9507  test -z "$as_dir" && as_dir=.
9508    for ac_exec_ext in '' $ac_executable_extensions; do
9509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9510    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512    break 2
9513  fi
9514done
9515  done
9516IFS=$as_save_IFS
9517
9518  ;;
9519esac
9520fi
9521UNZIP=$ac_cv_path_UNZIP
9522if test -n "$UNZIP"; then
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9524$as_echo "$UNZIP" >&6; }
9525else
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531  test -n "$UNZIP" && break
9532done
9533
9534
9535    if test "x$UNZIP" = x; then
9536        if test "xunzip" = x; then
9537          PROG_NAME=unzip
9538        else
9539          PROG_NAME=unzip
9540        fi
9541        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9542$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9543        as_fn_error $? "Cannot continue" "$LINENO" 5
9544    fi
9545
9546
9547
9548    for ac_prog in zip
9549do
9550  # Extract the first word of "$ac_prog", so it can be a program name with args.
9551set dummy $ac_prog; ac_word=$2
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9553$as_echo_n "checking for $ac_word... " >&6; }
9554if test "${ac_cv_path_ZIP+set}" = set; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557  case $ZIP in
9558  [\\/]* | ?:[\\/]*)
9559  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9560  ;;
9561  *)
9562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563for as_dir in $PATH
9564do
9565  IFS=$as_save_IFS
9566  test -z "$as_dir" && as_dir=.
9567    for ac_exec_ext in '' $ac_executable_extensions; do
9568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9569    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571    break 2
9572  fi
9573done
9574  done
9575IFS=$as_save_IFS
9576
9577  ;;
9578esac
9579fi
9580ZIP=$ac_cv_path_ZIP
9581if test -n "$ZIP"; then
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9583$as_echo "$ZIP" >&6; }
9584else
9585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
9587fi
9588
9589
9590  test -n "$ZIP" && break
9591done
9592
9593
9594    if test "x$ZIP" = x; then
9595        if test "xzip" = x; then
9596          PROG_NAME=zip
9597        else
9598          PROG_NAME=zip
9599        fi
9600        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9601$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9602        as_fn_error $? "Cannot continue" "$LINENO" 5
9603    fi
9604
9605
9606
9607# Non-required basic tools
9608
9609# Extract the first word of "ldd", so it can be a program name with args.
9610set dummy ldd; ac_word=$2
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612$as_echo_n "checking for $ac_word... " >&6; }
9613if test "${ac_cv_path_LDD+set}" = set; then :
9614  $as_echo_n "(cached) " >&6
9615else
9616  case $LDD in
9617  [\\/]* | ?:[\\/]*)
9618  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9619  ;;
9620  *)
9621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622for as_dir in $PATH
9623do
9624  IFS=$as_save_IFS
9625  test -z "$as_dir" && as_dir=.
9626    for ac_exec_ext in '' $ac_executable_extensions; do
9627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9628    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9630    break 2
9631  fi
9632done
9633  done
9634IFS=$as_save_IFS
9635
9636  ;;
9637esac
9638fi
9639LDD=$ac_cv_path_LDD
9640if test -n "$LDD"; then
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9642$as_echo "$LDD" >&6; }
9643else
9644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
9646fi
9647
9648
9649if test "x$LDD" = "x"; then
9650    # List shared lib dependencies is used for
9651    # debug output and checking for forbidden dependencies.
9652    # We can build without it.
9653    LDD="true"
9654fi
9655# Extract the first word of "otool", so it can be a program name with args.
9656set dummy otool; ac_word=$2
9657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9658$as_echo_n "checking for $ac_word... " >&6; }
9659if test "${ac_cv_path_OTOOL+set}" = set; then :
9660  $as_echo_n "(cached) " >&6
9661else
9662  case $OTOOL in
9663  [\\/]* | ?:[\\/]*)
9664  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9665  ;;
9666  *)
9667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9668for as_dir in $PATH
9669do
9670  IFS=$as_save_IFS
9671  test -z "$as_dir" && as_dir=.
9672    for ac_exec_ext in '' $ac_executable_extensions; do
9673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9674    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9676    break 2
9677  fi
9678done
9679  done
9680IFS=$as_save_IFS
9681
9682  ;;
9683esac
9684fi
9685OTOOL=$ac_cv_path_OTOOL
9686if test -n "$OTOOL"; then
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9688$as_echo "$OTOOL" >&6; }
9689else
9690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9691$as_echo "no" >&6; }
9692fi
9693
9694
9695if test "x$OTOOL" = "x"; then
9696   OTOOL="true"
9697fi
9698for ac_prog in readelf greadelf
9699do
9700  # Extract the first word of "$ac_prog", so it can be a program name with args.
9701set dummy $ac_prog; ac_word=$2
9702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9703$as_echo_n "checking for $ac_word... " >&6; }
9704if test "${ac_cv_path_READELF+set}" = set; then :
9705  $as_echo_n "(cached) " >&6
9706else
9707  case $READELF in
9708  [\\/]* | ?:[\\/]*)
9709  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9710  ;;
9711  *)
9712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9713for as_dir in $PATH
9714do
9715  IFS=$as_save_IFS
9716  test -z "$as_dir" && as_dir=.
9717    for ac_exec_ext in '' $ac_executable_extensions; do
9718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9719    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9721    break 2
9722  fi
9723done
9724  done
9725IFS=$as_save_IFS
9726
9727  ;;
9728esac
9729fi
9730READELF=$ac_cv_path_READELF
9731if test -n "$READELF"; then
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9733$as_echo "$READELF" >&6; }
9734else
9735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9736$as_echo "no" >&6; }
9737fi
9738
9739
9740  test -n "$READELF" && break
9741done
9742
9743# Extract the first word of "hg", so it can be a program name with args.
9744set dummy hg; ac_word=$2
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746$as_echo_n "checking for $ac_word... " >&6; }
9747if test "${ac_cv_path_HG+set}" = set; then :
9748  $as_echo_n "(cached) " >&6
9749else
9750  case $HG in
9751  [\\/]* | ?:[\\/]*)
9752  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9753  ;;
9754  *)
9755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756for as_dir in $PATH
9757do
9758  IFS=$as_save_IFS
9759  test -z "$as_dir" && as_dir=.
9760    for ac_exec_ext in '' $ac_executable_extensions; do
9761  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9762    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9764    break 2
9765  fi
9766done
9767  done
9768IFS=$as_save_IFS
9769
9770  ;;
9771esac
9772fi
9773HG=$ac_cv_path_HG
9774if test -n "$HG"; then
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9776$as_echo "$HG" >&6; }
9777else
9778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
9780fi
9781
9782
9783# Extract the first word of "stat", so it can be a program name with args.
9784set dummy stat; ac_word=$2
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
9787if test "${ac_cv_path_STAT+set}" = set; then :
9788  $as_echo_n "(cached) " >&6
9789else
9790  case $STAT in
9791  [\\/]* | ?:[\\/]*)
9792  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9793  ;;
9794  *)
9795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9796for as_dir in $PATH
9797do
9798  IFS=$as_save_IFS
9799  test -z "$as_dir" && as_dir=.
9800    for ac_exec_ext in '' $ac_executable_extensions; do
9801  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9802    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9804    break 2
9805  fi
9806done
9807  done
9808IFS=$as_save_IFS
9809
9810  ;;
9811esac
9812fi
9813STAT=$ac_cv_path_STAT
9814if test -n "$STAT"; then
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9816$as_echo "$STAT" >&6; }
9817else
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
9820fi
9821
9822
9823# Extract the first word of "time", so it can be a program name with args.
9824set dummy time; ac_word=$2
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9826$as_echo_n "checking for $ac_word... " >&6; }
9827if test "${ac_cv_path_TIME+set}" = set; then :
9828  $as_echo_n "(cached) " >&6
9829else
9830  case $TIME in
9831  [\\/]* | ?:[\\/]*)
9832  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9833  ;;
9834  *)
9835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9836for as_dir in $PATH
9837do
9838  IFS=$as_save_IFS
9839  test -z "$as_dir" && as_dir=.
9840    for ac_exec_ext in '' $ac_executable_extensions; do
9841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9842    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9844    break 2
9845  fi
9846done
9847  done
9848IFS=$as_save_IFS
9849
9850  ;;
9851esac
9852fi
9853TIME=$ac_cv_path_TIME
9854if test -n "$TIME"; then
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9856$as_echo "$TIME" >&6; }
9857else
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
9860fi
9861
9862
9863
9864if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9865
9866    for ac_prog in comm
9867do
9868  # Extract the first word of "$ac_prog", so it can be a program name with args.
9869set dummy $ac_prog; ac_word=$2
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871$as_echo_n "checking for $ac_word... " >&6; }
9872if test "${ac_cv_path_COMM+set}" = set; then :
9873  $as_echo_n "(cached) " >&6
9874else
9875  case $COMM in
9876  [\\/]* | ?:[\\/]*)
9877  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9878  ;;
9879  *)
9880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9881for as_dir in $PATH
9882do
9883  IFS=$as_save_IFS
9884  test -z "$as_dir" && as_dir=.
9885    for ac_exec_ext in '' $ac_executable_extensions; do
9886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9887    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9889    break 2
9890  fi
9891done
9892  done
9893IFS=$as_save_IFS
9894
9895  ;;
9896esac
9897fi
9898COMM=$ac_cv_path_COMM
9899if test -n "$COMM"; then
9900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
9901$as_echo "$COMM" >&6; }
9902else
9903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905fi
9906
9907
9908  test -n "$COMM" && break
9909done
9910
9911
9912    if test "x$COMM" = x; then
9913        if test "xcomm" = x; then
9914          PROG_NAME=comm
9915        else
9916          PROG_NAME=comm
9917        fi
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9919$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9920        as_fn_error $? "Cannot continue" "$LINENO" 5
9921    fi
9922
9923
9924fi
9925
9926
9927# Check if pkg-config is available.
9928
9929
9930if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9931	if test -n "$ac_tool_prefix"; then
9932  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9933set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9935$as_echo_n "checking for $ac_word... " >&6; }
9936if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9937  $as_echo_n "(cached) " >&6
9938else
9939  case $PKG_CONFIG in
9940  [\\/]* | ?:[\\/]*)
9941  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9942  ;;
9943  *)
9944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945for as_dir in $PATH
9946do
9947  IFS=$as_save_IFS
9948  test -z "$as_dir" && as_dir=.
9949    for ac_exec_ext in '' $ac_executable_extensions; do
9950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9951    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9953    break 2
9954  fi
9955done
9956  done
9957IFS=$as_save_IFS
9958
9959  ;;
9960esac
9961fi
9962PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9963if test -n "$PKG_CONFIG"; then
9964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9965$as_echo "$PKG_CONFIG" >&6; }
9966else
9967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
9969fi
9970
9971
9972fi
9973if test -z "$ac_cv_path_PKG_CONFIG"; then
9974  ac_pt_PKG_CONFIG=$PKG_CONFIG
9975  # Extract the first word of "pkg-config", so it can be a program name with args.
9976set dummy pkg-config; ac_word=$2
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9978$as_echo_n "checking for $ac_word... " >&6; }
9979if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
9980  $as_echo_n "(cached) " >&6
9981else
9982  case $ac_pt_PKG_CONFIG in
9983  [\\/]* | ?:[\\/]*)
9984  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9985  ;;
9986  *)
9987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9988for as_dir in $PATH
9989do
9990  IFS=$as_save_IFS
9991  test -z "$as_dir" && as_dir=.
9992    for ac_exec_ext in '' $ac_executable_extensions; do
9993  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9994    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9996    break 2
9997  fi
9998done
9999  done
10000IFS=$as_save_IFS
10001
10002  ;;
10003esac
10004fi
10005ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10006if test -n "$ac_pt_PKG_CONFIG"; then
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10008$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10009else
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012fi
10013
10014  if test "x$ac_pt_PKG_CONFIG" = x; then
10015    PKG_CONFIG=""
10016  else
10017    case $cross_compiling:$ac_tool_warned in
10018yes:)
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10021ac_tool_warned=yes ;;
10022esac
10023    PKG_CONFIG=$ac_pt_PKG_CONFIG
10024  fi
10025else
10026  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10027fi
10028
10029fi
10030if test -n "$PKG_CONFIG"; then
10031	_pkg_min_version=0.9.0
10032	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10033$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10034	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10035		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10036$as_echo "yes" >&6; }
10037	else
10038		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039$as_echo "no" >&6; }
10040		PKG_CONFIG=""
10041	fi
10042
10043fi
10044
10045# After basic tools have been setup, we can check build os specific details.
10046
10047###############################################################################
10048
10049# Note that this is the build platform OS version!
10050
10051OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10052OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10053OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10054OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10055
10056
10057
10058
10059
10060# Setup builddeps, for automatic downloading of tools we need.
10061# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10062# boot-jdk setup, but we need to have basic tools setup first.
10063
10064
10065# Check whether --with-builddeps-conf was given.
10066if test "${with_builddeps_conf+set}" = set; then :
10067  withval=$with_builddeps_conf;
10068fi
10069
10070
10071
10072# Check whether --with-builddeps-server was given.
10073if test "${with_builddeps_server+set}" = set; then :
10074  withval=$with_builddeps_server;
10075fi
10076
10077
10078
10079# Check whether --with-builddeps-dir was given.
10080if test "${with_builddeps_dir+set}" = set; then :
10081  withval=$with_builddeps_dir;
10082else
10083  with_builddeps_dir=/localhome/builddeps
10084fi
10085
10086
10087
10088# Check whether --with-builddeps-group was given.
10089if test "${with_builddeps_group+set}" = set; then :
10090  withval=$with_builddeps_group;
10091fi
10092
10093
10094
10095
10096    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10097        if test "x$with_builddeps_conf" != x; then
10098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10099$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10100            builddepsfile=$with_builddeps_conf
10101            if test -s $builddepsfile; then
10102                . $builddepsfile
10103                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10104$as_echo "loaded!" >&6; }
10105            else
10106               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10107           fi
10108        else
10109            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10110$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10111            builddepsfile=`mktemp`
10112            touch $builddepsfile
10113            # Put all found confs into a single file.
10114            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10115            # Source the file to acquire the variables
10116            if test -s $builddepsfile; then
10117                . $builddepsfile
10118                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10119$as_echo "found at least one!" >&6; }
10120            else
10121               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10122           fi
10123        fi
10124        # Create build and target names that use _ instead of "-" and ".".
10125        # This is necessary to use them in variable names.
10126        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10127        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10128        # Extract rewrite information for build and target
10129        eval rewritten_build=\${REWRITE_${build_var}}
10130        if test "x$rewritten_build" = x; then
10131            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10132            echo Build stays the same $rewritten_build
10133        else
10134            echo Rewriting build for builddeps into $rewritten_build
10135        fi
10136        eval rewritten_target=\${REWRITE_${target_var}}
10137        if test "x$rewritten_target" = x; then
10138            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10139            echo Target stays the same $rewritten_target
10140        else
10141            echo Rewriting target for builddeps into $rewritten_target
10142        fi
10143        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10144        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10145    fi
10146    for ac_prog in 7z unzip
10147do
10148  # Extract the first word of "$ac_prog", so it can be a program name with args.
10149set dummy $ac_prog; ac_word=$2
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151$as_echo_n "checking for $ac_word... " >&6; }
10152if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10153  $as_echo_n "(cached) " >&6
10154else
10155  if test -n "$BDEPS_UNZIP"; then
10156  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10157else
10158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159for as_dir in $PATH
10160do
10161  IFS=$as_save_IFS
10162  test -z "$as_dir" && as_dir=.
10163    for ac_exec_ext in '' $ac_executable_extensions; do
10164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10165    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167    break 2
10168  fi
10169done
10170  done
10171IFS=$as_save_IFS
10172
10173fi
10174fi
10175BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10176if test -n "$BDEPS_UNZIP"; then
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10178$as_echo "$BDEPS_UNZIP" >&6; }
10179else
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185  test -n "$BDEPS_UNZIP" && break
10186done
10187
10188    if test "x$BDEPS_UNZIP" = x7z; then
10189        BDEPS_UNZIP="7z x"
10190    fi
10191
10192    for ac_prog in wget lftp ftp
10193do
10194  # Extract the first word of "$ac_prog", so it can be a program name with args.
10195set dummy $ac_prog; ac_word=$2
10196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197$as_echo_n "checking for $ac_word... " >&6; }
10198if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10199  $as_echo_n "(cached) " >&6
10200else
10201  if test -n "$BDEPS_FTP"; then
10202  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10203else
10204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10205for as_dir in $PATH
10206do
10207  IFS=$as_save_IFS
10208  test -z "$as_dir" && as_dir=.
10209    for ac_exec_ext in '' $ac_executable_extensions; do
10210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10211    ac_cv_prog_BDEPS_FTP="$ac_prog"
10212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10213    break 2
10214  fi
10215done
10216  done
10217IFS=$as_save_IFS
10218
10219fi
10220fi
10221BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10222if test -n "$BDEPS_FTP"; then
10223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10224$as_echo "$BDEPS_FTP" >&6; }
10225else
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227$as_echo "no" >&6; }
10228fi
10229
10230
10231  test -n "$BDEPS_FTP" && break
10232done
10233
10234
10235
10236###############################################################################
10237#
10238# Determine OpenJDK variants, options and version numbers.
10239#
10240###############################################################################
10241
10242# We need build & target for this.
10243
10244
10245###############################################################################
10246#
10247# Should we build only OpenJDK even if closed sources are present?
10248#
10249# Check whether --enable-openjdk-only was given.
10250if test "${enable_openjdk_only+set}" = set; then :
10251  enableval=$enable_openjdk_only;
10252else
10253  enable_openjdk_only="no"
10254fi
10255
10256
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10258$as_echo_n "checking for presence of closed sources... " >&6; }
10259if test -d "$SRC_ROOT/jdk/src/closed"; then
10260    CLOSED_SOURCE_PRESENT=yes
10261else
10262    CLOSED_SOURCE_PRESENT=no
10263fi
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10265$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10266
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10268$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10269SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10271$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10272
10273if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10274  OPENJDK=true
10275  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10277$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10278  fi
10279else
10280  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10281    OPENJDK=true
10282  else
10283    OPENJDK=false
10284  fi
10285fi
10286
10287if test "x$OPENJDK" = "xtrue"; then
10288    SET_OPENJDK="OPENJDK=true"
10289fi
10290
10291
10292
10293###############################################################################
10294#
10295# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10296# We always build headless support.
10297#
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10299$as_echo_n "checking headful support... " >&6; }
10300# Check whether --enable-headful was given.
10301if test "${enable_headful+set}" = set; then :
10302  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10303else
10304  SUPPORT_HEADFUL=yes
10305fi
10306
10307
10308SUPPORT_HEADLESS=yes
10309BUILD_HEADLESS="BUILD_HEADLESS:=true"
10310
10311if test "x$SUPPORT_HEADFUL" = xyes; then
10312    # We are building both headful and headless.
10313    headful_msg="inlude support for both headful and headless"
10314fi
10315
10316if test "x$SUPPORT_HEADFUL" = xno; then
10317    # Thus we are building headless only.
10318    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10319    headful_msg="headless only"
10320fi
10321
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10323$as_echo "$headful_msg" >&6; }
10324
10325
10326
10327
10328
10329# Control wether Hotspot runs Queens test after build.
10330# Check whether --enable-hotspot-test-in-build was given.
10331if test "${enable_hotspot_test_in_build+set}" = set; then :
10332  enableval=$enable_hotspot_test_in_build;
10333else
10334  enable_hotspot_test_in_build=no
10335fi
10336
10337if test "x$enable_hotspot_test_in_build" = "xyes"; then
10338    TEST_IN_BUILD=true
10339else
10340    TEST_IN_BUILD=false
10341fi
10342
10343
10344###############################################################################
10345#
10346# Choose cacerts source file
10347#
10348
10349# Check whether --with-cacerts-file was given.
10350if test "${with_cacerts_file+set}" = set; then :
10351  withval=$with_cacerts_file;
10352fi
10353
10354if test "x$with_cacerts_file" != x; then
10355    CACERTS_FILE=$with_cacerts_file
10356else
10357    if test "x$OPENJDK" = "xtrue"; then
10358        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10359    else
10360        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10361    fi
10362fi
10363
10364
10365###############################################################################
10366#
10367# Enable or disable unlimited crypto
10368#
10369# Check whether --enable-unlimited-crypto was given.
10370if test "${enable_unlimited_crypto+set}" = set; then :
10371  enableval=$enable_unlimited_crypto;
10372else
10373  enable_unlimited_crypto=no
10374fi
10375
10376if test "x$enable_unlimited_crypto" = "xyes"; then
10377    UNLIMITED_CRYPTO=true
10378else
10379    UNLIMITED_CRYPTO=false
10380fi
10381
10382
10383###############################################################################
10384#
10385# Compress jars
10386#
10387COMPRESS_JARS=false
10388
10389
10390
10391
10392# Source the version numbers
10393. $AUTOCONF_DIR/version.numbers
10394if test "x$OPENJDK" = "xfalse"; then
10395    . $AUTOCONF_DIR/closed.version.numbers
10396fi
10397# Now set the JDK version, milestone, build number etc.
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412COPYRIGHT_YEAR=`date +'%Y'`
10413
10414
10415RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10416
10417
10418if test "x$JDK_UPDATE_VERSION" != x; then
10419    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10420else
10421    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10422fi
10423
10424
10425if test "x$MILESTONE" != x; then
10426    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10427else
10428    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10429fi
10430
10431
10432if test "x$JDK_BUILD_NUMBER" != x; then
10433    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10434else
10435    JDK_BUILD_NUMBER=b00
10436    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10437    # Avoid [:alnum:] since it depends on the locale.
10438    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10439    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10440    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10441fi
10442
10443COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10444
10445
10446
10447###############################################################################
10448#
10449# Setup BootJDK, used to bootstrap the build.
10450#
10451###############################################################################
10452
10453
10454BOOT_JDK_FOUND=no
10455
10456# Check whether --with-boot-jdk was given.
10457if test "${with_boot_jdk+set}" = set; then :
10458  withval=$with_boot_jdk;
10459fi
10460
10461
10462# We look for the Boot JDK through various means, going from more certain to
10463# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10464# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10465# must check if this is indeed valid; otherwise we'll continue looking.
10466
10467# Test: Is bootjdk explicitely set by command line arguments?
10468
10469  if test "x$BOOT_JDK_FOUND" = xno; then
10470    # Now execute the test
10471
10472if test "x$with_boot_jdk" != x; then
10473    BOOT_JDK=$with_boot_jdk
10474    BOOT_JDK_FOUND=maybe
10475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10476$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10477fi
10478
10479
10480    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10481    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10482      # Do we have a bin/java?
10483      if test ! -x "$BOOT_JDK/bin/java"; then
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10486        BOOT_JDK_FOUND=no
10487      else
10488        # Do we have a bin/javac?
10489        if test ! -x "$BOOT_JDK/bin/javac"; then
10490          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10492          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10493$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10494          BOOT_JDK_FOUND=no
10495        else
10496          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10497          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10498            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10500            BOOT_JDK_FOUND=no
10501          else
10502            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10503            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10504
10505            # Extra M4 quote needed to protect [] in grep expression.
10506            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10507            if test "x$FOUND_VERSION_78" = x; then
10508              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10510              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10511$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10512              BOOT_JDK_FOUND=no
10513            else
10514              # We're done! :-)
10515              BOOT_JDK_FOUND=yes
10516
10517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10518
10519  # Input might be given as Windows format, start by converting to
10520  # unix format.
10521  path="$BOOT_JDK"
10522  new_path=`$CYGPATH -u "$path"`
10523
10524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10527  # "foo.exe" is OK but "foo" is an error.
10528  #
10529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10530  # It is also a way to make sure we got the proper file name for the real test later on.
10531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10532  if test "x$test_shortpath" = x; then
10533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10535    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10536  fi
10537
10538  # Call helper function which possibly converts this using DOS-style short mode.
10539  # If so, the updated path is stored in $new_path.
10540
10541  input_path="$new_path"
10542  # Check if we need to convert this using DOS-style short mode. If the path
10543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10544  # take no chances and rewrite it.
10545  # Note: m4 eats our [], so we need to use [ and ] instead.
10546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10547  if test "x$has_forbidden_chars" != x; then
10548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10552      # Going to short mode and back again did indeed matter. Since short mode is
10553      # case insensitive, let's make it lowercase to improve readability.
10554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10555      # Now convert it back to Unix-stile (cygpath)
10556      input_path=`$CYGPATH -u "$shortmode_path"`
10557      new_path="$input_path"
10558    fi
10559  fi
10560
10561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10562  if test "x$test_cygdrive_prefix" = x; then
10563    # As a simple fix, exclude /usr/bin since it's not a real path.
10564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10566      # a path prefixed by /cygdrive for fixpath to work.
10567      new_path="$CYGWIN_ROOT_PATH$input_path"
10568    fi
10569  fi
10570
10571
10572  if test "x$path" != "x$new_path"; then
10573    BOOT_JDK="$new_path"
10574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10576  fi
10577
10578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10579
10580  path="$BOOT_JDK"
10581  has_colon=`$ECHO $path | $GREP ^.:`
10582  new_path="$path"
10583  if test "x$has_colon" = x; then
10584    # Not in mixed or Windows style, start by that.
10585    new_path=`cmd //c echo $path`
10586  fi
10587
10588
10589  input_path="$new_path"
10590  # Check if we need to convert this using DOS-style short mode. If the path
10591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10592  # take no chances and rewrite it.
10593  # Note: m4 eats our [], so we need to use [ and ] instead.
10594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10595  if test "x$has_forbidden_chars" != x; then
10596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10598  fi
10599
10600
10601  windows_path="$new_path"
10602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10603    unix_path=`$CYGPATH -u "$windows_path"`
10604    new_path="$unix_path"
10605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10607    new_path="$unix_path"
10608  fi
10609
10610  if test "x$path" != "x$new_path"; then
10611    BOOT_JDK="$new_path"
10612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10614  fi
10615
10616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10618
10619  else
10620    # We're on a posix platform. Hooray! :)
10621    path="$BOOT_JDK"
10622
10623    if test ! -f "$path" && test ! -d "$path"; then
10624      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10625    fi
10626
10627    has_space=`$ECHO "$path" | $GREP " "`
10628    if test "x$has_space" != x; then
10629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10631      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10632    fi
10633  fi
10634
10635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10636$as_echo_n "checking for Boot JDK... " >&6; }
10637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10638$as_echo "$BOOT_JDK" >&6; }
10639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10640$as_echo_n "checking Boot JDK version... " >&6; }
10641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10643$as_echo "$BOOT_JDK_VERSION" >&6; }
10644            fi # end check jdk version
10645          fi # end check rt.jar
10646        fi # end check javac
10647      fi # end check java
10648    fi # end check boot jdk found
10649  fi
10650
10651if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10652  # Having specified an argument which is incorrect will produce an instant failure;
10653  # we should not go on looking
10654  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10655fi
10656
10657# Test: Is bootjdk available from builddeps?
10658
10659  if test "x$BOOT_JDK_FOUND" = xno; then
10660    # Now execute the test
10661
10662
10663
10664    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10665        # Source the builddeps file again, to make sure it uses the latest variables!
10666        . $builddepsfile
10667        # Look for a target and build machine specific resource!
10668        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10669        if test "x$resource" = x; then
10670            # Ok, lets instead look for a target specific resource
10671            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10672        fi
10673        if test "x$resource" = x; then
10674            # Ok, lets instead look for a build specific resource
10675            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10676        fi
10677        if test "x$resource" = x; then
10678            # Ok, lets instead look for a generic resource
10679            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10680            resource=${builddep_bootjdk}
10681        fi
10682        if test "x$resource" != x; then
10683            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10684$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10685	    # If the resource in the builddeps.conf file is an existing directory,
10686	    # for example /java/linux/cups
10687	    if test -d ${resource}; then
10688	       depdir=${resource}
10689	    else
10690
10691# bootjdk is for example mymodule
10692# $resource is for example libs/general/libmymod_1_2_3.zip
10693# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10694# $with_builddeps_dir is for example /localhome/builddeps
10695# depdir is the name of the variable into which we store the depdir, eg MYMOD
10696# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10697# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10698    filename=`basename $resource`
10699    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10700    filebase=${filename%%.*}
10701    extension=${filename#*.}
10702    installdir=$with_builddeps_dir/$filebase
10703    if test ! -f $installdir/$filename.unpacked; then
10704        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10705$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10706        if test ! -d $installdir; then
10707            mkdir -p $installdir
10708        fi
10709        if test ! -d $installdir; then
10710            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10711        fi
10712        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10713        touch $tmpfile
10714        if test ! -f $tmpfile; then
10715            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10716        fi
10717
10718    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10719    # $tmpfile is the local file name for the downloaded file.
10720    VALID_TOOL=no
10721    if test "x$BDEPS_FTP" = xwget; then
10722       VALID_TOOL=yes
10723       wget -O $tmpfile $with_builddeps_server/$resource
10724    fi
10725    if test "x$BDEPS_FTP" = xlftp; then
10726       VALID_TOOL=yes
10727       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10728    fi
10729    if test "x$BDEPS_FTP" = xftp; then
10730        VALID_TOOL=yes
10731        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10732        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10733        FTPUSERPWD=${FTPSERVER%%@*}
10734        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10735            FTPUSER=${userpwd%%:*}
10736            FTPPWD=${userpwd#*@}
10737            FTPSERVER=${FTPSERVER#*@}
10738        else
10739            FTPUSER=ftp
10740            FTPPWD=ftp
10741        fi
10742        # the "pass" command does not work on some
10743        # ftp clients (read ftp.exe) but if it works,
10744        # passive mode is better!
10745        (\
10746            echo "user $FTPUSER $FTPPWD"        ;\
10747            echo "pass"                         ;\
10748            echo "bin"                          ;\
10749            echo "get $FTPPATH $tmpfile"              ;\
10750        ) | ftp -in $FTPSERVER
10751    fi
10752    if test "x$VALID_TOOL" != xyes; then
10753       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10754    fi
10755
10756        mv $tmpfile $installdir/$filename
10757        if test ! -s $installdir/$filename; then
10758            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10759        fi
10760        case "$extension" in
10761            zip)  echo "Unzipping $installdir/$filename..."
10762               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10763            ;;
10764            tar.gz) echo "Untaring $installdir/$filename..."
10765               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10766            ;;
10767            tgz) echo "Untaring $installdir/$filename..."
10768               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10769            ;;
10770            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10771            ;;
10772        esac
10773    fi
10774    if test -f $installdir/$filename.unpacked; then
10775        depdir=$installdir
10776    fi
10777
10778	    fi
10779            # Source the builddeps file again, because in the previous command, the depdir
10780            # was updated to point at the current build dependency install directory.
10781            . $builddepsfile
10782            # Now extract variables from the builddeps.conf files.
10783            theroot=${builddep_bootjdk_ROOT}
10784            thecflags=${builddep_bootjdk_CFLAGS}
10785            thelibs=${builddep_bootjdk_LIBS}
10786            if test "x$depdir" = x; then
10787                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10788            fi
10789            BOOT_JDK=$depdir
10790            if test "x$theroot" != x; then
10791               BOOT_JDK="$theroot"
10792            fi
10793            if test "x$thecflags" != x; then
10794               BOOT_JDK_CFLAGS="$thecflags"
10795            fi
10796            if test "x$thelibs" != x; then
10797               BOOT_JDK_LIBS="$thelibs"
10798            fi
10799            BOOT_JDK_FOUND=maybe
10800            else BOOT_JDK_FOUND=no
10801
10802        fi
10803        else BOOT_JDK_FOUND=no
10804
10805    fi
10806
10807
10808
10809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10811      # Do we have a bin/java?
10812      if test ! -x "$BOOT_JDK/bin/java"; then
10813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10815        BOOT_JDK_FOUND=no
10816      else
10817        # Do we have a bin/javac?
10818        if test ! -x "$BOOT_JDK/bin/javac"; then
10819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10823          BOOT_JDK_FOUND=no
10824        else
10825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10829            BOOT_JDK_FOUND=no
10830          else
10831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10833
10834            # Extra M4 quote needed to protect [] in grep expression.
10835            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10836            if test "x$FOUND_VERSION_78" = x; then
10837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10840$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10841              BOOT_JDK_FOUND=no
10842            else
10843              # We're done! :-)
10844              BOOT_JDK_FOUND=yes
10845
10846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10847
10848  # Input might be given as Windows format, start by converting to
10849  # unix format.
10850  path="$BOOT_JDK"
10851  new_path=`$CYGPATH -u "$path"`
10852
10853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10856  # "foo.exe" is OK but "foo" is an error.
10857  #
10858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10859  # It is also a way to make sure we got the proper file name for the real test later on.
10860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10861  if test "x$test_shortpath" = x; then
10862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10865  fi
10866
10867  # Call helper function which possibly converts this using DOS-style short mode.
10868  # If so, the updated path is stored in $new_path.
10869
10870  input_path="$new_path"
10871  # Check if we need to convert this using DOS-style short mode. If the path
10872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10873  # take no chances and rewrite it.
10874  # Note: m4 eats our [], so we need to use [ and ] instead.
10875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10876  if test "x$has_forbidden_chars" != x; then
10877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10881      # Going to short mode and back again did indeed matter. Since short mode is
10882      # case insensitive, let's make it lowercase to improve readability.
10883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10884      # Now convert it back to Unix-stile (cygpath)
10885      input_path=`$CYGPATH -u "$shortmode_path"`
10886      new_path="$input_path"
10887    fi
10888  fi
10889
10890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10891  if test "x$test_cygdrive_prefix" = x; then
10892    # As a simple fix, exclude /usr/bin since it's not a real path.
10893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10895      # a path prefixed by /cygdrive for fixpath to work.
10896      new_path="$CYGWIN_ROOT_PATH$input_path"
10897    fi
10898  fi
10899
10900
10901  if test "x$path" != "x$new_path"; then
10902    BOOT_JDK="$new_path"
10903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10905  fi
10906
10907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10908
10909  path="$BOOT_JDK"
10910  has_colon=`$ECHO $path | $GREP ^.:`
10911  new_path="$path"
10912  if test "x$has_colon" = x; then
10913    # Not in mixed or Windows style, start by that.
10914    new_path=`cmd //c echo $path`
10915  fi
10916
10917
10918  input_path="$new_path"
10919  # Check if we need to convert this using DOS-style short mode. If the path
10920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10921  # take no chances and rewrite it.
10922  # Note: m4 eats our [], so we need to use [ and ] instead.
10923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10924  if test "x$has_forbidden_chars" != x; then
10925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10927  fi
10928
10929
10930  windows_path="$new_path"
10931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10932    unix_path=`$CYGPATH -u "$windows_path"`
10933    new_path="$unix_path"
10934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10936    new_path="$unix_path"
10937  fi
10938
10939  if test "x$path" != "x$new_path"; then
10940    BOOT_JDK="$new_path"
10941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10943  fi
10944
10945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10947
10948  else
10949    # We're on a posix platform. Hooray! :)
10950    path="$BOOT_JDK"
10951
10952    if test ! -f "$path" && test ! -d "$path"; then
10953      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10954    fi
10955
10956    has_space=`$ECHO "$path" | $GREP " "`
10957    if test "x$has_space" != x; then
10958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10961    fi
10962  fi
10963
10964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10965$as_echo_n "checking for Boot JDK... " >&6; }
10966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10967$as_echo "$BOOT_JDK" >&6; }
10968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10969$as_echo_n "checking Boot JDK version... " >&6; }
10970              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10972$as_echo "$BOOT_JDK_VERSION" >&6; }
10973            fi # end check jdk version
10974          fi # end check rt.jar
10975        fi # end check javac
10976      fi # end check java
10977    fi # end check boot jdk found
10978  fi
10979
10980
10981# Test: Is $JAVA_HOME set?
10982
10983  if test "x$BOOT_JDK_FOUND" = xno; then
10984    # Now execute the test
10985
10986    if test "x$JAVA_HOME" != x; then
10987        JAVA_HOME_PROCESSED="$JAVA_HOME"
10988
10989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990
10991  # Input might be given as Windows format, start by converting to
10992  # unix format.
10993  path="$JAVA_HOME_PROCESSED"
10994  new_path=`$CYGPATH -u "$path"`
10995
10996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999  # "foo.exe" is OK but "foo" is an error.
11000  #
11001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002  # It is also a way to make sure we got the proper file name for the real test later on.
11003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004  if test "x$test_shortpath" = x; then
11005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11006$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11007    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11008  fi
11009
11010  # Call helper function which possibly converts this using DOS-style short mode.
11011  # If so, the updated path is stored in $new_path.
11012
11013  input_path="$new_path"
11014  # Check if we need to convert this using DOS-style short mode. If the path
11015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016  # take no chances and rewrite it.
11017  # Note: m4 eats our [], so we need to use [ and ] instead.
11018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019  if test "x$has_forbidden_chars" != x; then
11020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024      # Going to short mode and back again did indeed matter. Since short mode is
11025      # case insensitive, let's make it lowercase to improve readability.
11026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027      # Now convert it back to Unix-stile (cygpath)
11028      input_path=`$CYGPATH -u "$shortmode_path"`
11029      new_path="$input_path"
11030    fi
11031  fi
11032
11033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034  if test "x$test_cygdrive_prefix" = x; then
11035    # As a simple fix, exclude /usr/bin since it's not a real path.
11036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038      # a path prefixed by /cygdrive for fixpath to work.
11039      new_path="$CYGWIN_ROOT_PATH$input_path"
11040    fi
11041  fi
11042
11043
11044  if test "x$path" != "x$new_path"; then
11045    JAVA_HOME_PROCESSED="$new_path"
11046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11047$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11048  fi
11049
11050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051
11052  path="$JAVA_HOME_PROCESSED"
11053  has_colon=`$ECHO $path | $GREP ^.:`
11054  new_path="$path"
11055  if test "x$has_colon" = x; then
11056    # Not in mixed or Windows style, start by that.
11057    new_path=`cmd //c echo $path`
11058  fi
11059
11060
11061  input_path="$new_path"
11062  # Check if we need to convert this using DOS-style short mode. If the path
11063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064  # take no chances and rewrite it.
11065  # Note: m4 eats our [], so we need to use [ and ] instead.
11066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067  if test "x$has_forbidden_chars" != x; then
11068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070  fi
11071
11072
11073  windows_path="$new_path"
11074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075    unix_path=`$CYGPATH -u "$windows_path"`
11076    new_path="$unix_path"
11077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079    new_path="$unix_path"
11080  fi
11081
11082  if test "x$path" != "x$new_path"; then
11083    JAVA_HOME_PROCESSED="$new_path"
11084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11085$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11086  fi
11087
11088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090
11091  else
11092    # We're on a posix platform. Hooray! :)
11093    path="$JAVA_HOME_PROCESSED"
11094
11095    if test ! -f "$path" && test ! -d "$path"; then
11096      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11097    fi
11098
11099    has_space=`$ECHO "$path" | $GREP " "`
11100    if test "x$has_space" != x; then
11101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11102$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11103      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11104    fi
11105  fi
11106
11107        if test ! -d "$JAVA_HOME_PROCESSED"; then
11108            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11109$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11110        else
11111          # Aha, the user has set a JAVA_HOME
11112          # let us use that as the Boot JDK.
11113          BOOT_JDK="$JAVA_HOME_PROCESSED"
11114          BOOT_JDK_FOUND=maybe
11115          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11116$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11117        fi
11118    fi
11119
11120
11121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11123      # Do we have a bin/java?
11124      if test ! -x "$BOOT_JDK/bin/java"; then
11125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11127        BOOT_JDK_FOUND=no
11128      else
11129        # Do we have a bin/javac?
11130        if test ! -x "$BOOT_JDK/bin/javac"; then
11131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11135          BOOT_JDK_FOUND=no
11136        else
11137          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11138          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11139            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11141            BOOT_JDK_FOUND=no
11142          else
11143            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11145
11146            # Extra M4 quote needed to protect [] in grep expression.
11147            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11148            if test "x$FOUND_VERSION_78" = x; then
11149              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11151              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11152$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11153              BOOT_JDK_FOUND=no
11154            else
11155              # We're done! :-)
11156              BOOT_JDK_FOUND=yes
11157
11158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11159
11160  # Input might be given as Windows format, start by converting to
11161  # unix format.
11162  path="$BOOT_JDK"
11163  new_path=`$CYGPATH -u "$path"`
11164
11165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11168  # "foo.exe" is OK but "foo" is an error.
11169  #
11170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11171  # It is also a way to make sure we got the proper file name for the real test later on.
11172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11173  if test "x$test_shortpath" = x; then
11174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11176    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11177  fi
11178
11179  # Call helper function which possibly converts this using DOS-style short mode.
11180  # If so, the updated path is stored in $new_path.
11181
11182  input_path="$new_path"
11183  # Check if we need to convert this using DOS-style short mode. If the path
11184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11185  # take no chances and rewrite it.
11186  # Note: m4 eats our [], so we need to use [ and ] instead.
11187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11188  if test "x$has_forbidden_chars" != x; then
11189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11193      # Going to short mode and back again did indeed matter. Since short mode is
11194      # case insensitive, let's make it lowercase to improve readability.
11195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11196      # Now convert it back to Unix-stile (cygpath)
11197      input_path=`$CYGPATH -u "$shortmode_path"`
11198      new_path="$input_path"
11199    fi
11200  fi
11201
11202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11203  if test "x$test_cygdrive_prefix" = x; then
11204    # As a simple fix, exclude /usr/bin since it's not a real path.
11205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11207      # a path prefixed by /cygdrive for fixpath to work.
11208      new_path="$CYGWIN_ROOT_PATH$input_path"
11209    fi
11210  fi
11211
11212
11213  if test "x$path" != "x$new_path"; then
11214    BOOT_JDK="$new_path"
11215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11216$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11217  fi
11218
11219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11220
11221  path="$BOOT_JDK"
11222  has_colon=`$ECHO $path | $GREP ^.:`
11223  new_path="$path"
11224  if test "x$has_colon" = x; then
11225    # Not in mixed or Windows style, start by that.
11226    new_path=`cmd //c echo $path`
11227  fi
11228
11229
11230  input_path="$new_path"
11231  # Check if we need to convert this using DOS-style short mode. If the path
11232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11233  # take no chances and rewrite it.
11234  # Note: m4 eats our [], so we need to use [ and ] instead.
11235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11236  if test "x$has_forbidden_chars" != x; then
11237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11239  fi
11240
11241
11242  windows_path="$new_path"
11243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11244    unix_path=`$CYGPATH -u "$windows_path"`
11245    new_path="$unix_path"
11246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11248    new_path="$unix_path"
11249  fi
11250
11251  if test "x$path" != "x$new_path"; then
11252    BOOT_JDK="$new_path"
11253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11255  fi
11256
11257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11259
11260  else
11261    # We're on a posix platform. Hooray! :)
11262    path="$BOOT_JDK"
11263
11264    if test ! -f "$path" && test ! -d "$path"; then
11265      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11266    fi
11267
11268    has_space=`$ECHO "$path" | $GREP " "`
11269    if test "x$has_space" != x; then
11270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11272      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11273    fi
11274  fi
11275
11276              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11277$as_echo_n "checking for Boot JDK... " >&6; }
11278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11279$as_echo "$BOOT_JDK" >&6; }
11280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11281$as_echo_n "checking Boot JDK version... " >&6; }
11282              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11284$as_echo "$BOOT_JDK_VERSION" >&6; }
11285            fi # end check jdk version
11286          fi # end check rt.jar
11287        fi # end check javac
11288      fi # end check java
11289    fi # end check boot jdk found
11290  fi
11291
11292
11293# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11294
11295  if test "x$BOOT_JDK_FOUND" = xno; then
11296    # Now execute the test
11297
11298    if test -x /usr/libexec/java_home; then
11299        BOOT_JDK=`/usr/libexec/java_home`
11300        BOOT_JDK_FOUND=maybe
11301        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11302$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11303    fi
11304
11305
11306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11308      # Do we have a bin/java?
11309      if test ! -x "$BOOT_JDK/bin/java"; then
11310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11312        BOOT_JDK_FOUND=no
11313      else
11314        # Do we have a bin/javac?
11315        if test ! -x "$BOOT_JDK/bin/javac"; then
11316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11320          BOOT_JDK_FOUND=no
11321        else
11322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11326            BOOT_JDK_FOUND=no
11327          else
11328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11330
11331            # Extra M4 quote needed to protect [] in grep expression.
11332            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11333            if test "x$FOUND_VERSION_78" = x; then
11334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11337$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11338              BOOT_JDK_FOUND=no
11339            else
11340              # We're done! :-)
11341              BOOT_JDK_FOUND=yes
11342
11343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11344
11345  # Input might be given as Windows format, start by converting to
11346  # unix format.
11347  path="$BOOT_JDK"
11348  new_path=`$CYGPATH -u "$path"`
11349
11350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11353  # "foo.exe" is OK but "foo" is an error.
11354  #
11355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11356  # It is also a way to make sure we got the proper file name for the real test later on.
11357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11358  if test "x$test_shortpath" = x; then
11359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11362  fi
11363
11364  # Call helper function which possibly converts this using DOS-style short mode.
11365  # If so, the updated path is stored in $new_path.
11366
11367  input_path="$new_path"
11368  # Check if we need to convert this using DOS-style short mode. If the path
11369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11370  # take no chances and rewrite it.
11371  # Note: m4 eats our [], so we need to use [ and ] instead.
11372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11373  if test "x$has_forbidden_chars" != x; then
11374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11378      # Going to short mode and back again did indeed matter. Since short mode is
11379      # case insensitive, let's make it lowercase to improve readability.
11380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11381      # Now convert it back to Unix-stile (cygpath)
11382      input_path=`$CYGPATH -u "$shortmode_path"`
11383      new_path="$input_path"
11384    fi
11385  fi
11386
11387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11388  if test "x$test_cygdrive_prefix" = x; then
11389    # As a simple fix, exclude /usr/bin since it's not a real path.
11390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11392      # a path prefixed by /cygdrive for fixpath to work.
11393      new_path="$CYGWIN_ROOT_PATH$input_path"
11394    fi
11395  fi
11396
11397
11398  if test "x$path" != "x$new_path"; then
11399    BOOT_JDK="$new_path"
11400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11402  fi
11403
11404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11405
11406  path="$BOOT_JDK"
11407  has_colon=`$ECHO $path | $GREP ^.:`
11408  new_path="$path"
11409  if test "x$has_colon" = x; then
11410    # Not in mixed or Windows style, start by that.
11411    new_path=`cmd //c echo $path`
11412  fi
11413
11414
11415  input_path="$new_path"
11416  # Check if we need to convert this using DOS-style short mode. If the path
11417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11418  # take no chances and rewrite it.
11419  # Note: m4 eats our [], so we need to use [ and ] instead.
11420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11421  if test "x$has_forbidden_chars" != x; then
11422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11424  fi
11425
11426
11427  windows_path="$new_path"
11428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11429    unix_path=`$CYGPATH -u "$windows_path"`
11430    new_path="$unix_path"
11431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11433    new_path="$unix_path"
11434  fi
11435
11436  if test "x$path" != "x$new_path"; then
11437    BOOT_JDK="$new_path"
11438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11440  fi
11441
11442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11444
11445  else
11446    # We're on a posix platform. Hooray! :)
11447    path="$BOOT_JDK"
11448
11449    if test ! -f "$path" && test ! -d "$path"; then
11450      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11451    fi
11452
11453    has_space=`$ECHO "$path" | $GREP " "`
11454    if test "x$has_space" != x; then
11455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11458    fi
11459  fi
11460
11461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11462$as_echo_n "checking for Boot JDK... " >&6; }
11463              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11464$as_echo "$BOOT_JDK" >&6; }
11465              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11466$as_echo_n "checking Boot JDK version... " >&6; }
11467              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11469$as_echo "$BOOT_JDK_VERSION" >&6; }
11470            fi # end check jdk version
11471          fi # end check rt.jar
11472        fi # end check javac
11473      fi # end check java
11474    fi # end check boot jdk found
11475  fi
11476
11477
11478# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11479
11480  if test "x$BOOT_JDK_FOUND" = xno; then
11481    # Now execute the test
11482
11483    # Extract the first word of "javac", so it can be a program name with args.
11484set dummy javac; ac_word=$2
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11486$as_echo_n "checking for $ac_word... " >&6; }
11487if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11488  $as_echo_n "(cached) " >&6
11489else
11490  case $JAVAC_CHECK in
11491  [\\/]* | ?:[\\/]*)
11492  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11493  ;;
11494  *)
11495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11496for as_dir in $PATH
11497do
11498  IFS=$as_save_IFS
11499  test -z "$as_dir" && as_dir=.
11500    for ac_exec_ext in '' $ac_executable_extensions; do
11501  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11502    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11504    break 2
11505  fi
11506done
11507  done
11508IFS=$as_save_IFS
11509
11510  ;;
11511esac
11512fi
11513JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11514if test -n "$JAVAC_CHECK"; then
11515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11516$as_echo "$JAVAC_CHECK" >&6; }
11517else
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11519$as_echo "no" >&6; }
11520fi
11521
11522
11523    # Extract the first word of "java", so it can be a program name with args.
11524set dummy java; ac_word=$2
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11526$as_echo_n "checking for $ac_word... " >&6; }
11527if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11528  $as_echo_n "(cached) " >&6
11529else
11530  case $JAVA_CHECK in
11531  [\\/]* | ?:[\\/]*)
11532  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11533  ;;
11534  *)
11535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11536for as_dir in $PATH
11537do
11538  IFS=$as_save_IFS
11539  test -z "$as_dir" && as_dir=.
11540    for ac_exec_ext in '' $ac_executable_extensions; do
11541  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11542    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11544    break 2
11545  fi
11546done
11547  done
11548IFS=$as_save_IFS
11549
11550  ;;
11551esac
11552fi
11553JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11554if test -n "$JAVA_CHECK"; then
11555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11556$as_echo "$JAVA_CHECK" >&6; }
11557else
11558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
11560fi
11561
11562
11563    BINARY="$JAVAC_CHECK"
11564    if test "x$JAVAC_CHECK" = x; then
11565        BINARY="$JAVA_CHECK"
11566    fi
11567    if test "x$BINARY" != x; then
11568        # So there is a java(c) binary, it might be part of a JDK.
11569        # Lets find the JDK/JRE directory by following symbolic links.
11570        # Linux/GNU systems often have links from /usr/bin/java to
11571        # /etc/alternatives/java to the real JDK binary.
11572
11573    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11574        # Follow a chain of symbolic links. Use readlink
11575        # where it exists, else fall back to horribly
11576        # complicated shell code.
11577        if test "x$READLINK_TESTED" != yes; then
11578            # On MacOSX there is a readlink tool with a different
11579            # purpose than the GNU readlink tool. Check the found readlink.
11580            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11581            if test "x$ISGNU" = x; then
11582                 # A readlink that we do not know how to use.
11583                 # Are there other non-GNU readlinks out there?
11584                 READLINK_TESTED=yes
11585                 READLINK=
11586            fi
11587        fi
11588
11589        if test "x$READLINK" != x; then
11590            BINARY=`$READLINK -f $BINARY`
11591        else
11592            STARTDIR=$PWD
11593            COUNTER=0
11594            sym_link_dir=`$DIRNAME $BINARY`
11595            sym_link_file=`$BASENAME $BINARY`
11596            while test $COUNTER -lt 20; do
11597                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11598                if test "x$ISLINK" == x; then
11599                    # This is not a symbolic link! We are done!
11600                    break
11601                fi
11602                # The link might be relative! We have to use cd to travel safely.
11603                cd $sym_link_dir
11604                # ... and we must get the to the absolute path, not one using symbolic links.
11605                cd `pwd -P`
11606                cd `$DIRNAME $ISLINK`
11607                sym_link_dir=`$THEPWDCMD`
11608                sym_link_file=`$BASENAME $ISLINK`
11609                let COUNTER=COUNTER+1
11610            done
11611            cd $STARTDIR
11612            BINARY=$sym_link_dir/$sym_link_file
11613        fi
11614    fi
11615
11616        BOOT_JDK=`dirname "$BINARY"`
11617        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11618        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11619            # Looks like we found ourselves an JDK
11620            BOOT_JDK_FOUND=maybe
11621            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11622$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11623        fi
11624    fi
11625
11626
11627    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11628    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11629      # Do we have a bin/java?
11630      if test ! -x "$BOOT_JDK/bin/java"; then
11631        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11633        BOOT_JDK_FOUND=no
11634      else
11635        # Do we have a bin/javac?
11636        if test ! -x "$BOOT_JDK/bin/javac"; then
11637          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11639          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11640$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11641          BOOT_JDK_FOUND=no
11642        else
11643          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11644          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11645            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11647            BOOT_JDK_FOUND=no
11648          else
11649            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11650            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11651
11652            # Extra M4 quote needed to protect [] in grep expression.
11653            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11654            if test "x$FOUND_VERSION_78" = x; then
11655              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11657              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11658$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11659              BOOT_JDK_FOUND=no
11660            else
11661              # We're done! :-)
11662              BOOT_JDK_FOUND=yes
11663
11664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11665
11666  # Input might be given as Windows format, start by converting to
11667  # unix format.
11668  path="$BOOT_JDK"
11669  new_path=`$CYGPATH -u "$path"`
11670
11671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11674  # "foo.exe" is OK but "foo" is an error.
11675  #
11676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11677  # It is also a way to make sure we got the proper file name for the real test later on.
11678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11679  if test "x$test_shortpath" = x; then
11680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11682    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11683  fi
11684
11685  # Call helper function which possibly converts this using DOS-style short mode.
11686  # If so, the updated path is stored in $new_path.
11687
11688  input_path="$new_path"
11689  # Check if we need to convert this using DOS-style short mode. If the path
11690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11691  # take no chances and rewrite it.
11692  # Note: m4 eats our [], so we need to use [ and ] instead.
11693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11694  if test "x$has_forbidden_chars" != x; then
11695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11699      # Going to short mode and back again did indeed matter. Since short mode is
11700      # case insensitive, let's make it lowercase to improve readability.
11701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11702      # Now convert it back to Unix-stile (cygpath)
11703      input_path=`$CYGPATH -u "$shortmode_path"`
11704      new_path="$input_path"
11705    fi
11706  fi
11707
11708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11709  if test "x$test_cygdrive_prefix" = x; then
11710    # As a simple fix, exclude /usr/bin since it's not a real path.
11711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11713      # a path prefixed by /cygdrive for fixpath to work.
11714      new_path="$CYGWIN_ROOT_PATH$input_path"
11715    fi
11716  fi
11717
11718
11719  if test "x$path" != "x$new_path"; then
11720    BOOT_JDK="$new_path"
11721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11723  fi
11724
11725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11726
11727  path="$BOOT_JDK"
11728  has_colon=`$ECHO $path | $GREP ^.:`
11729  new_path="$path"
11730  if test "x$has_colon" = x; then
11731    # Not in mixed or Windows style, start by that.
11732    new_path=`cmd //c echo $path`
11733  fi
11734
11735
11736  input_path="$new_path"
11737  # Check if we need to convert this using DOS-style short mode. If the path
11738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11739  # take no chances and rewrite it.
11740  # Note: m4 eats our [], so we need to use [ and ] instead.
11741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11742  if test "x$has_forbidden_chars" != x; then
11743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11745  fi
11746
11747
11748  windows_path="$new_path"
11749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11750    unix_path=`$CYGPATH -u "$windows_path"`
11751    new_path="$unix_path"
11752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11754    new_path="$unix_path"
11755  fi
11756
11757  if test "x$path" != "x$new_path"; then
11758    BOOT_JDK="$new_path"
11759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11761  fi
11762
11763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11765
11766  else
11767    # We're on a posix platform. Hooray! :)
11768    path="$BOOT_JDK"
11769
11770    if test ! -f "$path" && test ! -d "$path"; then
11771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11772    fi
11773
11774    has_space=`$ECHO "$path" | $GREP " "`
11775    if test "x$has_space" != x; then
11776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11779    fi
11780  fi
11781
11782              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11783$as_echo_n "checking for Boot JDK... " >&6; }
11784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11785$as_echo "$BOOT_JDK" >&6; }
11786              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11787$as_echo_n "checking Boot JDK version... " >&6; }
11788              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11790$as_echo "$BOOT_JDK_VERSION" >&6; }
11791            fi # end check jdk version
11792          fi # end check rt.jar
11793        fi # end check javac
11794      fi # end check java
11795    fi # end check boot jdk found
11796  fi
11797
11798
11799# Test: Is there a JDK installed in default, well-known locations?
11800
11801  if test "x$BOOT_JDK_FOUND" = xno; then
11802    # Now execute the test
11803
11804  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11805
11806  if test "x$BOOT_JDK_FOUND" = xno; then
11807    # Now execute the test
11808
11809  if test "x$ProgramW6432" != x; then
11810    VIRTUAL_DIR="$ProgramW6432/Java"
11811
11812  windows_path="$VIRTUAL_DIR"
11813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11814    unix_path=`$CYGPATH -u "$windows_path"`
11815    VIRTUAL_DIR="$unix_path"
11816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11818    VIRTUAL_DIR="$unix_path"
11819  fi
11820
11821
11822  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11823  BOOT_JDK_SUFFIX=""
11824  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11825  if test "x$ALL_JDKS_FOUND" != x; then
11826    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11827
11828  if test "x$BOOT_JDK_FOUND" = xno; then
11829    # Now execute the test
11830
11831        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11832        if test -d "$BOOT_JDK"; then
11833          BOOT_JDK_FOUND=maybe
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11835$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11836        fi
11837
11838
11839    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11840    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11841      # Do we have a bin/java?
11842      if test ! -x "$BOOT_JDK/bin/java"; then
11843        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11845        BOOT_JDK_FOUND=no
11846      else
11847        # Do we have a bin/javac?
11848        if test ! -x "$BOOT_JDK/bin/javac"; then
11849          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11851          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11852$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11853          BOOT_JDK_FOUND=no
11854        else
11855          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11856          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11859            BOOT_JDK_FOUND=no
11860          else
11861            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11863
11864            # Extra M4 quote needed to protect [] in grep expression.
11865            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11866            if test "x$FOUND_VERSION_78" = x; then
11867              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11870$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11871              BOOT_JDK_FOUND=no
11872            else
11873              # We're done! :-)
11874              BOOT_JDK_FOUND=yes
11875
11876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11877
11878  # Input might be given as Windows format, start by converting to
11879  # unix format.
11880  path="$BOOT_JDK"
11881  new_path=`$CYGPATH -u "$path"`
11882
11883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11886  # "foo.exe" is OK but "foo" is an error.
11887  #
11888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11889  # It is also a way to make sure we got the proper file name for the real test later on.
11890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11891  if test "x$test_shortpath" = x; then
11892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11894    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11895  fi
11896
11897  # Call helper function which possibly converts this using DOS-style short mode.
11898  # If so, the updated path is stored in $new_path.
11899
11900  input_path="$new_path"
11901  # Check if we need to convert this using DOS-style short mode. If the path
11902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11903  # take no chances and rewrite it.
11904  # Note: m4 eats our [], so we need to use [ and ] instead.
11905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11906  if test "x$has_forbidden_chars" != x; then
11907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11911      # Going to short mode and back again did indeed matter. Since short mode is
11912      # case insensitive, let's make it lowercase to improve readability.
11913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11914      # Now convert it back to Unix-stile (cygpath)
11915      input_path=`$CYGPATH -u "$shortmode_path"`
11916      new_path="$input_path"
11917    fi
11918  fi
11919
11920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11921  if test "x$test_cygdrive_prefix" = x; then
11922    # As a simple fix, exclude /usr/bin since it's not a real path.
11923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11925      # a path prefixed by /cygdrive for fixpath to work.
11926      new_path="$CYGWIN_ROOT_PATH$input_path"
11927    fi
11928  fi
11929
11930
11931  if test "x$path" != "x$new_path"; then
11932    BOOT_JDK="$new_path"
11933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11935  fi
11936
11937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11938
11939  path="$BOOT_JDK"
11940  has_colon=`$ECHO $path | $GREP ^.:`
11941  new_path="$path"
11942  if test "x$has_colon" = x; then
11943    # Not in mixed or Windows style, start by that.
11944    new_path=`cmd //c echo $path`
11945  fi
11946
11947
11948  input_path="$new_path"
11949  # Check if we need to convert this using DOS-style short mode. If the path
11950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11951  # take no chances and rewrite it.
11952  # Note: m4 eats our [], so we need to use [ and ] instead.
11953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11954  if test "x$has_forbidden_chars" != x; then
11955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11957  fi
11958
11959
11960  windows_path="$new_path"
11961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11962    unix_path=`$CYGPATH -u "$windows_path"`
11963    new_path="$unix_path"
11964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11966    new_path="$unix_path"
11967  fi
11968
11969  if test "x$path" != "x$new_path"; then
11970    BOOT_JDK="$new_path"
11971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11973  fi
11974
11975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11977
11978  else
11979    # We're on a posix platform. Hooray! :)
11980    path="$BOOT_JDK"
11981
11982    if test ! -f "$path" && test ! -d "$path"; then
11983      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11984    fi
11985
11986    has_space=`$ECHO "$path" | $GREP " "`
11987    if test "x$has_space" != x; then
11988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11991    fi
11992  fi
11993
11994              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11995$as_echo_n "checking for Boot JDK... " >&6; }
11996              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11997$as_echo "$BOOT_JDK" >&6; }
11998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11999$as_echo_n "checking Boot JDK version... " >&6; }
12000              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12001              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12002$as_echo "$BOOT_JDK_VERSION" >&6; }
12003            fi # end check jdk version
12004          fi # end check rt.jar
12005        fi # end check javac
12006      fi # end check java
12007    fi # end check boot jdk found
12008  fi
12009
12010    done
12011  fi
12012
12013  fi
12014
12015
12016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12018      # Do we have a bin/java?
12019      if test ! -x "$BOOT_JDK/bin/java"; then
12020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12022        BOOT_JDK_FOUND=no
12023      else
12024        # Do we have a bin/javac?
12025        if test ! -x "$BOOT_JDK/bin/javac"; then
12026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12030          BOOT_JDK_FOUND=no
12031        else
12032          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12033          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12036            BOOT_JDK_FOUND=no
12037          else
12038            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12040
12041            # Extra M4 quote needed to protect [] in grep expression.
12042            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12043            if test "x$FOUND_VERSION_78" = x; then
12044              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12046              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12047$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12048              BOOT_JDK_FOUND=no
12049            else
12050              # We're done! :-)
12051              BOOT_JDK_FOUND=yes
12052
12053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12054
12055  # Input might be given as Windows format, start by converting to
12056  # unix format.
12057  path="$BOOT_JDK"
12058  new_path=`$CYGPATH -u "$path"`
12059
12060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12063  # "foo.exe" is OK but "foo" is an error.
12064  #
12065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12066  # It is also a way to make sure we got the proper file name for the real test later on.
12067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12068  if test "x$test_shortpath" = x; then
12069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12072  fi
12073
12074  # Call helper function which possibly converts this using DOS-style short mode.
12075  # If so, the updated path is stored in $new_path.
12076
12077  input_path="$new_path"
12078  # Check if we need to convert this using DOS-style short mode. If the path
12079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12080  # take no chances and rewrite it.
12081  # Note: m4 eats our [], so we need to use [ and ] instead.
12082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12083  if test "x$has_forbidden_chars" != x; then
12084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12088      # Going to short mode and back again did indeed matter. Since short mode is
12089      # case insensitive, let's make it lowercase to improve readability.
12090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12091      # Now convert it back to Unix-stile (cygpath)
12092      input_path=`$CYGPATH -u "$shortmode_path"`
12093      new_path="$input_path"
12094    fi
12095  fi
12096
12097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12098  if test "x$test_cygdrive_prefix" = x; then
12099    # As a simple fix, exclude /usr/bin since it's not a real path.
12100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12102      # a path prefixed by /cygdrive for fixpath to work.
12103      new_path="$CYGWIN_ROOT_PATH$input_path"
12104    fi
12105  fi
12106
12107
12108  if test "x$path" != "x$new_path"; then
12109    BOOT_JDK="$new_path"
12110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12112  fi
12113
12114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12115
12116  path="$BOOT_JDK"
12117  has_colon=`$ECHO $path | $GREP ^.:`
12118  new_path="$path"
12119  if test "x$has_colon" = x; then
12120    # Not in mixed or Windows style, start by that.
12121    new_path=`cmd //c echo $path`
12122  fi
12123
12124
12125  input_path="$new_path"
12126  # Check if we need to convert this using DOS-style short mode. If the path
12127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12128  # take no chances and rewrite it.
12129  # Note: m4 eats our [], so we need to use [ and ] instead.
12130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12131  if test "x$has_forbidden_chars" != x; then
12132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12134  fi
12135
12136
12137  windows_path="$new_path"
12138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12139    unix_path=`$CYGPATH -u "$windows_path"`
12140    new_path="$unix_path"
12141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12143    new_path="$unix_path"
12144  fi
12145
12146  if test "x$path" != "x$new_path"; then
12147    BOOT_JDK="$new_path"
12148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12150  fi
12151
12152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12154
12155  else
12156    # We're on a posix platform. Hooray! :)
12157    path="$BOOT_JDK"
12158
12159    if test ! -f "$path" && test ! -d "$path"; then
12160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12161    fi
12162
12163    has_space=`$ECHO "$path" | $GREP " "`
12164    if test "x$has_space" != x; then
12165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12167      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12168    fi
12169  fi
12170
12171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12172$as_echo_n "checking for Boot JDK... " >&6; }
12173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12174$as_echo "$BOOT_JDK" >&6; }
12175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12176$as_echo_n "checking Boot JDK version... " >&6; }
12177              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12179$as_echo "$BOOT_JDK_VERSION" >&6; }
12180            fi # end check jdk version
12181          fi # end check rt.jar
12182        fi # end check javac
12183      fi # end check java
12184    fi # end check boot jdk found
12185  fi
12186
12187
12188  if test "x$BOOT_JDK_FOUND" = xno; then
12189    # Now execute the test
12190
12191  if test "x$PROGRAMW6432" != x; then
12192    VIRTUAL_DIR="$PROGRAMW6432/Java"
12193
12194  windows_path="$VIRTUAL_DIR"
12195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12196    unix_path=`$CYGPATH -u "$windows_path"`
12197    VIRTUAL_DIR="$unix_path"
12198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12200    VIRTUAL_DIR="$unix_path"
12201  fi
12202
12203
12204  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12205  BOOT_JDK_SUFFIX=""
12206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12207  if test "x$ALL_JDKS_FOUND" != x; then
12208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12209
12210  if test "x$BOOT_JDK_FOUND" = xno; then
12211    # Now execute the test
12212
12213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12214        if test -d "$BOOT_JDK"; then
12215          BOOT_JDK_FOUND=maybe
12216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12218        fi
12219
12220
12221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12223      # Do we have a bin/java?
12224      if test ! -x "$BOOT_JDK/bin/java"; then
12225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12227        BOOT_JDK_FOUND=no
12228      else
12229        # Do we have a bin/javac?
12230        if test ! -x "$BOOT_JDK/bin/javac"; then
12231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12235          BOOT_JDK_FOUND=no
12236        else
12237          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12238          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12239            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12241            BOOT_JDK_FOUND=no
12242          else
12243            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12245
12246            # Extra M4 quote needed to protect [] in grep expression.
12247            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12248            if test "x$FOUND_VERSION_78" = x; then
12249              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12251              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12252$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12253              BOOT_JDK_FOUND=no
12254            else
12255              # We're done! :-)
12256              BOOT_JDK_FOUND=yes
12257
12258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12259
12260  # Input might be given as Windows format, start by converting to
12261  # unix format.
12262  path="$BOOT_JDK"
12263  new_path=`$CYGPATH -u "$path"`
12264
12265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12268  # "foo.exe" is OK but "foo" is an error.
12269  #
12270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12271  # It is also a way to make sure we got the proper file name for the real test later on.
12272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12273  if test "x$test_shortpath" = x; then
12274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12277  fi
12278
12279  # Call helper function which possibly converts this using DOS-style short mode.
12280  # If so, the updated path is stored in $new_path.
12281
12282  input_path="$new_path"
12283  # Check if we need to convert this using DOS-style short mode. If the path
12284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12285  # take no chances and rewrite it.
12286  # Note: m4 eats our [], so we need to use [ and ] instead.
12287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12288  if test "x$has_forbidden_chars" != x; then
12289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12293      # Going to short mode and back again did indeed matter. Since short mode is
12294      # case insensitive, let's make it lowercase to improve readability.
12295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12296      # Now convert it back to Unix-stile (cygpath)
12297      input_path=`$CYGPATH -u "$shortmode_path"`
12298      new_path="$input_path"
12299    fi
12300  fi
12301
12302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12303  if test "x$test_cygdrive_prefix" = x; then
12304    # As a simple fix, exclude /usr/bin since it's not a real path.
12305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12307      # a path prefixed by /cygdrive for fixpath to work.
12308      new_path="$CYGWIN_ROOT_PATH$input_path"
12309    fi
12310  fi
12311
12312
12313  if test "x$path" != "x$new_path"; then
12314    BOOT_JDK="$new_path"
12315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12317  fi
12318
12319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12320
12321  path="$BOOT_JDK"
12322  has_colon=`$ECHO $path | $GREP ^.:`
12323  new_path="$path"
12324  if test "x$has_colon" = x; then
12325    # Not in mixed or Windows style, start by that.
12326    new_path=`cmd //c echo $path`
12327  fi
12328
12329
12330  input_path="$new_path"
12331  # Check if we need to convert this using DOS-style short mode. If the path
12332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12333  # take no chances and rewrite it.
12334  # Note: m4 eats our [], so we need to use [ and ] instead.
12335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12336  if test "x$has_forbidden_chars" != x; then
12337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12339  fi
12340
12341
12342  windows_path="$new_path"
12343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12344    unix_path=`$CYGPATH -u "$windows_path"`
12345    new_path="$unix_path"
12346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12348    new_path="$unix_path"
12349  fi
12350
12351  if test "x$path" != "x$new_path"; then
12352    BOOT_JDK="$new_path"
12353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12355  fi
12356
12357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12359
12360  else
12361    # We're on a posix platform. Hooray! :)
12362    path="$BOOT_JDK"
12363
12364    if test ! -f "$path" && test ! -d "$path"; then
12365      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12366    fi
12367
12368    has_space=`$ECHO "$path" | $GREP " "`
12369    if test "x$has_space" != x; then
12370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12373    fi
12374  fi
12375
12376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12377$as_echo_n "checking for Boot JDK... " >&6; }
12378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12379$as_echo "$BOOT_JDK" >&6; }
12380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12381$as_echo_n "checking Boot JDK version... " >&6; }
12382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12384$as_echo "$BOOT_JDK_VERSION" >&6; }
12385            fi # end check jdk version
12386          fi # end check rt.jar
12387        fi # end check javac
12388      fi # end check java
12389    fi # end check boot jdk found
12390  fi
12391
12392    done
12393  fi
12394
12395  fi
12396
12397
12398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12400      # Do we have a bin/java?
12401      if test ! -x "$BOOT_JDK/bin/java"; then
12402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12404        BOOT_JDK_FOUND=no
12405      else
12406        # Do we have a bin/javac?
12407        if test ! -x "$BOOT_JDK/bin/javac"; then
12408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12412          BOOT_JDK_FOUND=no
12413        else
12414          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12415          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12418            BOOT_JDK_FOUND=no
12419          else
12420            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12422
12423            # Extra M4 quote needed to protect [] in grep expression.
12424            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12425            if test "x$FOUND_VERSION_78" = x; then
12426              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12428              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12429$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12430              BOOT_JDK_FOUND=no
12431            else
12432              # We're done! :-)
12433              BOOT_JDK_FOUND=yes
12434
12435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12436
12437  # Input might be given as Windows format, start by converting to
12438  # unix format.
12439  path="$BOOT_JDK"
12440  new_path=`$CYGPATH -u "$path"`
12441
12442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12445  # "foo.exe" is OK but "foo" is an error.
12446  #
12447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12448  # It is also a way to make sure we got the proper file name for the real test later on.
12449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12450  if test "x$test_shortpath" = x; then
12451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12454  fi
12455
12456  # Call helper function which possibly converts this using DOS-style short mode.
12457  # If so, the updated path is stored in $new_path.
12458
12459  input_path="$new_path"
12460  # Check if we need to convert this using DOS-style short mode. If the path
12461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12462  # take no chances and rewrite it.
12463  # Note: m4 eats our [], so we need to use [ and ] instead.
12464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12465  if test "x$has_forbidden_chars" != x; then
12466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12470      # Going to short mode and back again did indeed matter. Since short mode is
12471      # case insensitive, let's make it lowercase to improve readability.
12472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12473      # Now convert it back to Unix-stile (cygpath)
12474      input_path=`$CYGPATH -u "$shortmode_path"`
12475      new_path="$input_path"
12476    fi
12477  fi
12478
12479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12480  if test "x$test_cygdrive_prefix" = x; then
12481    # As a simple fix, exclude /usr/bin since it's not a real path.
12482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12484      # a path prefixed by /cygdrive for fixpath to work.
12485      new_path="$CYGWIN_ROOT_PATH$input_path"
12486    fi
12487  fi
12488
12489
12490  if test "x$path" != "x$new_path"; then
12491    BOOT_JDK="$new_path"
12492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12494  fi
12495
12496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12497
12498  path="$BOOT_JDK"
12499  has_colon=`$ECHO $path | $GREP ^.:`
12500  new_path="$path"
12501  if test "x$has_colon" = x; then
12502    # Not in mixed or Windows style, start by that.
12503    new_path=`cmd //c echo $path`
12504  fi
12505
12506
12507  input_path="$new_path"
12508  # Check if we need to convert this using DOS-style short mode. If the path
12509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12510  # take no chances and rewrite it.
12511  # Note: m4 eats our [], so we need to use [ and ] instead.
12512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12513  if test "x$has_forbidden_chars" != x; then
12514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12516  fi
12517
12518
12519  windows_path="$new_path"
12520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12521    unix_path=`$CYGPATH -u "$windows_path"`
12522    new_path="$unix_path"
12523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12525    new_path="$unix_path"
12526  fi
12527
12528  if test "x$path" != "x$new_path"; then
12529    BOOT_JDK="$new_path"
12530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12532  fi
12533
12534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12536
12537  else
12538    # We're on a posix platform. Hooray! :)
12539    path="$BOOT_JDK"
12540
12541    if test ! -f "$path" && test ! -d "$path"; then
12542      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12543    fi
12544
12545    has_space=`$ECHO "$path" | $GREP " "`
12546    if test "x$has_space" != x; then
12547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12549      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12550    fi
12551  fi
12552
12553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12554$as_echo_n "checking for Boot JDK... " >&6; }
12555              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12556$as_echo "$BOOT_JDK" >&6; }
12557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12558$as_echo_n "checking Boot JDK version... " >&6; }
12559              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12560              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12561$as_echo "$BOOT_JDK_VERSION" >&6; }
12562            fi # end check jdk version
12563          fi # end check rt.jar
12564        fi # end check javac
12565      fi # end check java
12566    fi # end check boot jdk found
12567  fi
12568
12569
12570  if test "x$BOOT_JDK_FOUND" = xno; then
12571    # Now execute the test
12572
12573  if test "x$PROGRAMFILES" != x; then
12574    VIRTUAL_DIR="$PROGRAMFILES/Java"
12575
12576  windows_path="$VIRTUAL_DIR"
12577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12578    unix_path=`$CYGPATH -u "$windows_path"`
12579    VIRTUAL_DIR="$unix_path"
12580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12582    VIRTUAL_DIR="$unix_path"
12583  fi
12584
12585
12586  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12587  BOOT_JDK_SUFFIX=""
12588  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12589  if test "x$ALL_JDKS_FOUND" != x; then
12590    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12591
12592  if test "x$BOOT_JDK_FOUND" = xno; then
12593    # Now execute the test
12594
12595        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12596        if test -d "$BOOT_JDK"; then
12597          BOOT_JDK_FOUND=maybe
12598          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12600        fi
12601
12602
12603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12605      # Do we have a bin/java?
12606      if test ! -x "$BOOT_JDK/bin/java"; then
12607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12609        BOOT_JDK_FOUND=no
12610      else
12611        # Do we have a bin/javac?
12612        if test ! -x "$BOOT_JDK/bin/javac"; then
12613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12617          BOOT_JDK_FOUND=no
12618        else
12619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12623            BOOT_JDK_FOUND=no
12624          else
12625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12627
12628            # Extra M4 quote needed to protect [] in grep expression.
12629            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12630            if test "x$FOUND_VERSION_78" = x; then
12631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12634$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12635              BOOT_JDK_FOUND=no
12636            else
12637              # We're done! :-)
12638              BOOT_JDK_FOUND=yes
12639
12640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12641
12642  # Input might be given as Windows format, start by converting to
12643  # unix format.
12644  path="$BOOT_JDK"
12645  new_path=`$CYGPATH -u "$path"`
12646
12647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12650  # "foo.exe" is OK but "foo" is an error.
12651  #
12652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12653  # It is also a way to make sure we got the proper file name for the real test later on.
12654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12655  if test "x$test_shortpath" = x; then
12656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12659  fi
12660
12661  # Call helper function which possibly converts this using DOS-style short mode.
12662  # If so, the updated path is stored in $new_path.
12663
12664  input_path="$new_path"
12665  # Check if we need to convert this using DOS-style short mode. If the path
12666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12667  # take no chances and rewrite it.
12668  # Note: m4 eats our [], so we need to use [ and ] instead.
12669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12670  if test "x$has_forbidden_chars" != x; then
12671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12675      # Going to short mode and back again did indeed matter. Since short mode is
12676      # case insensitive, let's make it lowercase to improve readability.
12677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12678      # Now convert it back to Unix-stile (cygpath)
12679      input_path=`$CYGPATH -u "$shortmode_path"`
12680      new_path="$input_path"
12681    fi
12682  fi
12683
12684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12685  if test "x$test_cygdrive_prefix" = x; then
12686    # As a simple fix, exclude /usr/bin since it's not a real path.
12687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12689      # a path prefixed by /cygdrive for fixpath to work.
12690      new_path="$CYGWIN_ROOT_PATH$input_path"
12691    fi
12692  fi
12693
12694
12695  if test "x$path" != "x$new_path"; then
12696    BOOT_JDK="$new_path"
12697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12699  fi
12700
12701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12702
12703  path="$BOOT_JDK"
12704  has_colon=`$ECHO $path | $GREP ^.:`
12705  new_path="$path"
12706  if test "x$has_colon" = x; then
12707    # Not in mixed or Windows style, start by that.
12708    new_path=`cmd //c echo $path`
12709  fi
12710
12711
12712  input_path="$new_path"
12713  # Check if we need to convert this using DOS-style short mode. If the path
12714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12715  # take no chances and rewrite it.
12716  # Note: m4 eats our [], so we need to use [ and ] instead.
12717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12718  if test "x$has_forbidden_chars" != x; then
12719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12721  fi
12722
12723
12724  windows_path="$new_path"
12725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12726    unix_path=`$CYGPATH -u "$windows_path"`
12727    new_path="$unix_path"
12728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12730    new_path="$unix_path"
12731  fi
12732
12733  if test "x$path" != "x$new_path"; then
12734    BOOT_JDK="$new_path"
12735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12737  fi
12738
12739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12741
12742  else
12743    # We're on a posix platform. Hooray! :)
12744    path="$BOOT_JDK"
12745
12746    if test ! -f "$path" && test ! -d "$path"; then
12747      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12748    fi
12749
12750    has_space=`$ECHO "$path" | $GREP " "`
12751    if test "x$has_space" != x; then
12752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12754      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12755    fi
12756  fi
12757
12758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12759$as_echo_n "checking for Boot JDK... " >&6; }
12760              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12761$as_echo "$BOOT_JDK" >&6; }
12762              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12763$as_echo_n "checking Boot JDK version... " >&6; }
12764              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12766$as_echo "$BOOT_JDK_VERSION" >&6; }
12767            fi # end check jdk version
12768          fi # end check rt.jar
12769        fi # end check javac
12770      fi # end check java
12771    fi # end check boot jdk found
12772  fi
12773
12774    done
12775  fi
12776
12777  fi
12778
12779
12780    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12781    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12782      # Do we have a bin/java?
12783      if test ! -x "$BOOT_JDK/bin/java"; then
12784        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12786        BOOT_JDK_FOUND=no
12787      else
12788        # Do we have a bin/javac?
12789        if test ! -x "$BOOT_JDK/bin/javac"; then
12790          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12792          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12793$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12794          BOOT_JDK_FOUND=no
12795        else
12796          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12797          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12798            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12800            BOOT_JDK_FOUND=no
12801          else
12802            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12803            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12804
12805            # Extra M4 quote needed to protect [] in grep expression.
12806            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12807            if test "x$FOUND_VERSION_78" = x; then
12808              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12810              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12811$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12812              BOOT_JDK_FOUND=no
12813            else
12814              # We're done! :-)
12815              BOOT_JDK_FOUND=yes
12816
12817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12818
12819  # Input might be given as Windows format, start by converting to
12820  # unix format.
12821  path="$BOOT_JDK"
12822  new_path=`$CYGPATH -u "$path"`
12823
12824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12827  # "foo.exe" is OK but "foo" is an error.
12828  #
12829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12830  # It is also a way to make sure we got the proper file name for the real test later on.
12831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12832  if test "x$test_shortpath" = x; then
12833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12836  fi
12837
12838  # Call helper function which possibly converts this using DOS-style short mode.
12839  # If so, the updated path is stored in $new_path.
12840
12841  input_path="$new_path"
12842  # Check if we need to convert this using DOS-style short mode. If the path
12843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12844  # take no chances and rewrite it.
12845  # Note: m4 eats our [], so we need to use [ and ] instead.
12846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12847  if test "x$has_forbidden_chars" != x; then
12848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12852      # Going to short mode and back again did indeed matter. Since short mode is
12853      # case insensitive, let's make it lowercase to improve readability.
12854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12855      # Now convert it back to Unix-stile (cygpath)
12856      input_path=`$CYGPATH -u "$shortmode_path"`
12857      new_path="$input_path"
12858    fi
12859  fi
12860
12861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12862  if test "x$test_cygdrive_prefix" = x; then
12863    # As a simple fix, exclude /usr/bin since it's not a real path.
12864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12866      # a path prefixed by /cygdrive for fixpath to work.
12867      new_path="$CYGWIN_ROOT_PATH$input_path"
12868    fi
12869  fi
12870
12871
12872  if test "x$path" != "x$new_path"; then
12873    BOOT_JDK="$new_path"
12874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12876  fi
12877
12878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12879
12880  path="$BOOT_JDK"
12881  has_colon=`$ECHO $path | $GREP ^.:`
12882  new_path="$path"
12883  if test "x$has_colon" = x; then
12884    # Not in mixed or Windows style, start by that.
12885    new_path=`cmd //c echo $path`
12886  fi
12887
12888
12889  input_path="$new_path"
12890  # Check if we need to convert this using DOS-style short mode. If the path
12891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12892  # take no chances and rewrite it.
12893  # Note: m4 eats our [], so we need to use [ and ] instead.
12894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12895  if test "x$has_forbidden_chars" != x; then
12896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12898  fi
12899
12900
12901  windows_path="$new_path"
12902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12903    unix_path=`$CYGPATH -u "$windows_path"`
12904    new_path="$unix_path"
12905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12907    new_path="$unix_path"
12908  fi
12909
12910  if test "x$path" != "x$new_path"; then
12911    BOOT_JDK="$new_path"
12912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12914  fi
12915
12916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12918
12919  else
12920    # We're on a posix platform. Hooray! :)
12921    path="$BOOT_JDK"
12922
12923    if test ! -f "$path" && test ! -d "$path"; then
12924      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12925    fi
12926
12927    has_space=`$ECHO "$path" | $GREP " "`
12928    if test "x$has_space" != x; then
12929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12932    fi
12933  fi
12934
12935              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12936$as_echo_n "checking for Boot JDK... " >&6; }
12937              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12938$as_echo "$BOOT_JDK" >&6; }
12939              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12940$as_echo_n "checking Boot JDK version... " >&6; }
12941              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12943$as_echo "$BOOT_JDK_VERSION" >&6; }
12944            fi # end check jdk version
12945          fi # end check rt.jar
12946        fi # end check javac
12947      fi # end check java
12948    fi # end check boot jdk found
12949  fi
12950
12951
12952  if test "x$BOOT_JDK_FOUND" = xno; then
12953    # Now execute the test
12954
12955  if test "x$ProgramFiles" != x; then
12956    VIRTUAL_DIR="$ProgramFiles/Java"
12957
12958  windows_path="$VIRTUAL_DIR"
12959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12960    unix_path=`$CYGPATH -u "$windows_path"`
12961    VIRTUAL_DIR="$unix_path"
12962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12964    VIRTUAL_DIR="$unix_path"
12965  fi
12966
12967
12968  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12969  BOOT_JDK_SUFFIX=""
12970  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12971  if test "x$ALL_JDKS_FOUND" != x; then
12972    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12973
12974  if test "x$BOOT_JDK_FOUND" = xno; then
12975    # Now execute the test
12976
12977        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12978        if test -d "$BOOT_JDK"; then
12979          BOOT_JDK_FOUND=maybe
12980          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12981$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12982        fi
12983
12984
12985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12987      # Do we have a bin/java?
12988      if test ! -x "$BOOT_JDK/bin/java"; then
12989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12991        BOOT_JDK_FOUND=no
12992      else
12993        # Do we have a bin/javac?
12994        if test ! -x "$BOOT_JDK/bin/javac"; then
12995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12999          BOOT_JDK_FOUND=no
13000        else
13001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13005            BOOT_JDK_FOUND=no
13006          else
13007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13009
13010            # Extra M4 quote needed to protect [] in grep expression.
13011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13012            if test "x$FOUND_VERSION_78" = x; then
13013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13017              BOOT_JDK_FOUND=no
13018            else
13019              # We're done! :-)
13020              BOOT_JDK_FOUND=yes
13021
13022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13023
13024  # Input might be given as Windows format, start by converting to
13025  # unix format.
13026  path="$BOOT_JDK"
13027  new_path=`$CYGPATH -u "$path"`
13028
13029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13032  # "foo.exe" is OK but "foo" is an error.
13033  #
13034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13035  # It is also a way to make sure we got the proper file name for the real test later on.
13036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13037  if test "x$test_shortpath" = x; then
13038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13041  fi
13042
13043  # Call helper function which possibly converts this using DOS-style short mode.
13044  # If so, the updated path is stored in $new_path.
13045
13046  input_path="$new_path"
13047  # Check if we need to convert this using DOS-style short mode. If the path
13048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13049  # take no chances and rewrite it.
13050  # Note: m4 eats our [], so we need to use [ and ] instead.
13051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13052  if test "x$has_forbidden_chars" != x; then
13053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13057      # Going to short mode and back again did indeed matter. Since short mode is
13058      # case insensitive, let's make it lowercase to improve readability.
13059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060      # Now convert it back to Unix-stile (cygpath)
13061      input_path=`$CYGPATH -u "$shortmode_path"`
13062      new_path="$input_path"
13063    fi
13064  fi
13065
13066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13067  if test "x$test_cygdrive_prefix" = x; then
13068    # As a simple fix, exclude /usr/bin since it's not a real path.
13069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13071      # a path prefixed by /cygdrive for fixpath to work.
13072      new_path="$CYGWIN_ROOT_PATH$input_path"
13073    fi
13074  fi
13075
13076
13077  if test "x$path" != "x$new_path"; then
13078    BOOT_JDK="$new_path"
13079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13081  fi
13082
13083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13084
13085  path="$BOOT_JDK"
13086  has_colon=`$ECHO $path | $GREP ^.:`
13087  new_path="$path"
13088  if test "x$has_colon" = x; then
13089    # Not in mixed or Windows style, start by that.
13090    new_path=`cmd //c echo $path`
13091  fi
13092
13093
13094  input_path="$new_path"
13095  # Check if we need to convert this using DOS-style short mode. If the path
13096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13097  # take no chances and rewrite it.
13098  # Note: m4 eats our [], so we need to use [ and ] instead.
13099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13100  if test "x$has_forbidden_chars" != x; then
13101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13103  fi
13104
13105
13106  windows_path="$new_path"
13107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13108    unix_path=`$CYGPATH -u "$windows_path"`
13109    new_path="$unix_path"
13110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13112    new_path="$unix_path"
13113  fi
13114
13115  if test "x$path" != "x$new_path"; then
13116    BOOT_JDK="$new_path"
13117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13119  fi
13120
13121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13123
13124  else
13125    # We're on a posix platform. Hooray! :)
13126    path="$BOOT_JDK"
13127
13128    if test ! -f "$path" && test ! -d "$path"; then
13129      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13130    fi
13131
13132    has_space=`$ECHO "$path" | $GREP " "`
13133    if test "x$has_space" != x; then
13134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13137    fi
13138  fi
13139
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13141$as_echo_n "checking for Boot JDK... " >&6; }
13142              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13143$as_echo "$BOOT_JDK" >&6; }
13144              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13145$as_echo_n "checking Boot JDK version... " >&6; }
13146              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13147              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13148$as_echo "$BOOT_JDK_VERSION" >&6; }
13149            fi # end check jdk version
13150          fi # end check rt.jar
13151        fi # end check javac
13152      fi # end check java
13153    fi # end check boot jdk found
13154  fi
13155
13156    done
13157  fi
13158
13159  fi
13160
13161
13162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13164      # Do we have a bin/java?
13165      if test ! -x "$BOOT_JDK/bin/java"; then
13166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13168        BOOT_JDK_FOUND=no
13169      else
13170        # Do we have a bin/javac?
13171        if test ! -x "$BOOT_JDK/bin/javac"; then
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13176          BOOT_JDK_FOUND=no
13177        else
13178          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13179          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13180            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13182            BOOT_JDK_FOUND=no
13183          else
13184            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13185            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13186
13187            # Extra M4 quote needed to protect [] in grep expression.
13188            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13189            if test "x$FOUND_VERSION_78" = x; then
13190              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13192              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13193$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13194              BOOT_JDK_FOUND=no
13195            else
13196              # We're done! :-)
13197              BOOT_JDK_FOUND=yes
13198
13199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13200
13201  # Input might be given as Windows format, start by converting to
13202  # unix format.
13203  path="$BOOT_JDK"
13204  new_path=`$CYGPATH -u "$path"`
13205
13206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13209  # "foo.exe" is OK but "foo" is an error.
13210  #
13211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13212  # It is also a way to make sure we got the proper file name for the real test later on.
13213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13214  if test "x$test_shortpath" = x; then
13215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13218  fi
13219
13220  # Call helper function which possibly converts this using DOS-style short mode.
13221  # If so, the updated path is stored in $new_path.
13222
13223  input_path="$new_path"
13224  # Check if we need to convert this using DOS-style short mode. If the path
13225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13226  # take no chances and rewrite it.
13227  # Note: m4 eats our [], so we need to use [ and ] instead.
13228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13229  if test "x$has_forbidden_chars" != x; then
13230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13234      # Going to short mode and back again did indeed matter. Since short mode is
13235      # case insensitive, let's make it lowercase to improve readability.
13236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13237      # Now convert it back to Unix-stile (cygpath)
13238      input_path=`$CYGPATH -u "$shortmode_path"`
13239      new_path="$input_path"
13240    fi
13241  fi
13242
13243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13244  if test "x$test_cygdrive_prefix" = x; then
13245    # As a simple fix, exclude /usr/bin since it's not a real path.
13246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13248      # a path prefixed by /cygdrive for fixpath to work.
13249      new_path="$CYGWIN_ROOT_PATH$input_path"
13250    fi
13251  fi
13252
13253
13254  if test "x$path" != "x$new_path"; then
13255    BOOT_JDK="$new_path"
13256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13258  fi
13259
13260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13261
13262  path="$BOOT_JDK"
13263  has_colon=`$ECHO $path | $GREP ^.:`
13264  new_path="$path"
13265  if test "x$has_colon" = x; then
13266    # Not in mixed or Windows style, start by that.
13267    new_path=`cmd //c echo $path`
13268  fi
13269
13270
13271  input_path="$new_path"
13272  # Check if we need to convert this using DOS-style short mode. If the path
13273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13274  # take no chances and rewrite it.
13275  # Note: m4 eats our [], so we need to use [ and ] instead.
13276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13277  if test "x$has_forbidden_chars" != x; then
13278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13280  fi
13281
13282
13283  windows_path="$new_path"
13284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13285    unix_path=`$CYGPATH -u "$windows_path"`
13286    new_path="$unix_path"
13287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13289    new_path="$unix_path"
13290  fi
13291
13292  if test "x$path" != "x$new_path"; then
13293    BOOT_JDK="$new_path"
13294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13296  fi
13297
13298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13300
13301  else
13302    # We're on a posix platform. Hooray! :)
13303    path="$BOOT_JDK"
13304
13305    if test ! -f "$path" && test ! -d "$path"; then
13306      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13307    fi
13308
13309    has_space=`$ECHO "$path" | $GREP " "`
13310    if test "x$has_space" != x; then
13311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13314    fi
13315  fi
13316
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13318$as_echo_n "checking for Boot JDK... " >&6; }
13319              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13320$as_echo "$BOOT_JDK" >&6; }
13321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13322$as_echo_n "checking Boot JDK version... " >&6; }
13323              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13324              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13325$as_echo "$BOOT_JDK_VERSION" >&6; }
13326            fi # end check jdk version
13327          fi # end check rt.jar
13328        fi # end check javac
13329      fi # end check java
13330    fi # end check boot jdk found
13331  fi
13332
13333
13334  if test "x$BOOT_JDK_FOUND" = xno; then
13335    # Now execute the test
13336
13337  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13338  BOOT_JDK_SUFFIX=""
13339  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13340  if test "x$ALL_JDKS_FOUND" != x; then
13341    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13342
13343  if test "x$BOOT_JDK_FOUND" = xno; then
13344    # Now execute the test
13345
13346        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13347        if test -d "$BOOT_JDK"; then
13348          BOOT_JDK_FOUND=maybe
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13350$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13351        fi
13352
13353
13354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13356      # Do we have a bin/java?
13357      if test ! -x "$BOOT_JDK/bin/java"; then
13358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13360        BOOT_JDK_FOUND=no
13361      else
13362        # Do we have a bin/javac?
13363        if test ! -x "$BOOT_JDK/bin/javac"; then
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13368          BOOT_JDK_FOUND=no
13369        else
13370          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13371          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13372            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13374            BOOT_JDK_FOUND=no
13375          else
13376            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13377            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13378
13379            # Extra M4 quote needed to protect [] in grep expression.
13380            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13381            if test "x$FOUND_VERSION_78" = x; then
13382              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13384              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13385$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13386              BOOT_JDK_FOUND=no
13387            else
13388              # We're done! :-)
13389              BOOT_JDK_FOUND=yes
13390
13391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13392
13393  # Input might be given as Windows format, start by converting to
13394  # unix format.
13395  path="$BOOT_JDK"
13396  new_path=`$CYGPATH -u "$path"`
13397
13398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13401  # "foo.exe" is OK but "foo" is an error.
13402  #
13403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13404  # It is also a way to make sure we got the proper file name for the real test later on.
13405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13406  if test "x$test_shortpath" = x; then
13407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13410  fi
13411
13412  # Call helper function which possibly converts this using DOS-style short mode.
13413  # If so, the updated path is stored in $new_path.
13414
13415  input_path="$new_path"
13416  # Check if we need to convert this using DOS-style short mode. If the path
13417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13418  # take no chances and rewrite it.
13419  # Note: m4 eats our [], so we need to use [ and ] instead.
13420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13421  if test "x$has_forbidden_chars" != x; then
13422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13426      # Going to short mode and back again did indeed matter. Since short mode is
13427      # case insensitive, let's make it lowercase to improve readability.
13428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13429      # Now convert it back to Unix-stile (cygpath)
13430      input_path=`$CYGPATH -u "$shortmode_path"`
13431      new_path="$input_path"
13432    fi
13433  fi
13434
13435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13436  if test "x$test_cygdrive_prefix" = x; then
13437    # As a simple fix, exclude /usr/bin since it's not a real path.
13438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13440      # a path prefixed by /cygdrive for fixpath to work.
13441      new_path="$CYGWIN_ROOT_PATH$input_path"
13442    fi
13443  fi
13444
13445
13446  if test "x$path" != "x$new_path"; then
13447    BOOT_JDK="$new_path"
13448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13450  fi
13451
13452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13453
13454  path="$BOOT_JDK"
13455  has_colon=`$ECHO $path | $GREP ^.:`
13456  new_path="$path"
13457  if test "x$has_colon" = x; then
13458    # Not in mixed or Windows style, start by that.
13459    new_path=`cmd //c echo $path`
13460  fi
13461
13462
13463  input_path="$new_path"
13464  # Check if we need to convert this using DOS-style short mode. If the path
13465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13466  # take no chances and rewrite it.
13467  # Note: m4 eats our [], so we need to use [ and ] instead.
13468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13469  if test "x$has_forbidden_chars" != x; then
13470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13472  fi
13473
13474
13475  windows_path="$new_path"
13476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13477    unix_path=`$CYGPATH -u "$windows_path"`
13478    new_path="$unix_path"
13479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13481    new_path="$unix_path"
13482  fi
13483
13484  if test "x$path" != "x$new_path"; then
13485    BOOT_JDK="$new_path"
13486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13488  fi
13489
13490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13492
13493  else
13494    # We're on a posix platform. Hooray! :)
13495    path="$BOOT_JDK"
13496
13497    if test ! -f "$path" && test ! -d "$path"; then
13498      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13499    fi
13500
13501    has_space=`$ECHO "$path" | $GREP " "`
13502    if test "x$has_space" != x; then
13503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13506    fi
13507  fi
13508
13509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13510$as_echo_n "checking for Boot JDK... " >&6; }
13511              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13512$as_echo "$BOOT_JDK" >&6; }
13513              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13514$as_echo_n "checking Boot JDK version... " >&6; }
13515              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13516              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13517$as_echo "$BOOT_JDK_VERSION" >&6; }
13518            fi # end check jdk version
13519          fi # end check rt.jar
13520        fi # end check javac
13521      fi # end check java
13522    fi # end check boot jdk found
13523  fi
13524
13525    done
13526  fi
13527
13528
13529    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13530    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13531      # Do we have a bin/java?
13532      if test ! -x "$BOOT_JDK/bin/java"; then
13533        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13535        BOOT_JDK_FOUND=no
13536      else
13537        # Do we have a bin/javac?
13538        if test ! -x "$BOOT_JDK/bin/javac"; then
13539          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13541          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13542$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13543          BOOT_JDK_FOUND=no
13544        else
13545          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13546          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13549            BOOT_JDK_FOUND=no
13550          else
13551            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13552            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13553
13554            # Extra M4 quote needed to protect [] in grep expression.
13555            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13556            if test "x$FOUND_VERSION_78" = x; then
13557              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13559              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13560$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13561              BOOT_JDK_FOUND=no
13562            else
13563              # We're done! :-)
13564              BOOT_JDK_FOUND=yes
13565
13566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13567
13568  # Input might be given as Windows format, start by converting to
13569  # unix format.
13570  path="$BOOT_JDK"
13571  new_path=`$CYGPATH -u "$path"`
13572
13573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13576  # "foo.exe" is OK but "foo" is an error.
13577  #
13578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13579  # It is also a way to make sure we got the proper file name for the real test later on.
13580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13581  if test "x$test_shortpath" = x; then
13582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13585  fi
13586
13587  # Call helper function which possibly converts this using DOS-style short mode.
13588  # If so, the updated path is stored in $new_path.
13589
13590  input_path="$new_path"
13591  # Check if we need to convert this using DOS-style short mode. If the path
13592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13593  # take no chances and rewrite it.
13594  # Note: m4 eats our [], so we need to use [ and ] instead.
13595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13596  if test "x$has_forbidden_chars" != x; then
13597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13601      # Going to short mode and back again did indeed matter. Since short mode is
13602      # case insensitive, let's make it lowercase to improve readability.
13603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13604      # Now convert it back to Unix-stile (cygpath)
13605      input_path=`$CYGPATH -u "$shortmode_path"`
13606      new_path="$input_path"
13607    fi
13608  fi
13609
13610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13611  if test "x$test_cygdrive_prefix" = x; then
13612    # As a simple fix, exclude /usr/bin since it's not a real path.
13613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13615      # a path prefixed by /cygdrive for fixpath to work.
13616      new_path="$CYGWIN_ROOT_PATH$input_path"
13617    fi
13618  fi
13619
13620
13621  if test "x$path" != "x$new_path"; then
13622    BOOT_JDK="$new_path"
13623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13625  fi
13626
13627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13628
13629  path="$BOOT_JDK"
13630  has_colon=`$ECHO $path | $GREP ^.:`
13631  new_path="$path"
13632  if test "x$has_colon" = x; then
13633    # Not in mixed or Windows style, start by that.
13634    new_path=`cmd //c echo $path`
13635  fi
13636
13637
13638  input_path="$new_path"
13639  # Check if we need to convert this using DOS-style short mode. If the path
13640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13641  # take no chances and rewrite it.
13642  # Note: m4 eats our [], so we need to use [ and ] instead.
13643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13644  if test "x$has_forbidden_chars" != x; then
13645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13647  fi
13648
13649
13650  windows_path="$new_path"
13651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13652    unix_path=`$CYGPATH -u "$windows_path"`
13653    new_path="$unix_path"
13654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13656    new_path="$unix_path"
13657  fi
13658
13659  if test "x$path" != "x$new_path"; then
13660    BOOT_JDK="$new_path"
13661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663  fi
13664
13665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13667
13668  else
13669    # We're on a posix platform. Hooray! :)
13670    path="$BOOT_JDK"
13671
13672    if test ! -f "$path" && test ! -d "$path"; then
13673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13674    fi
13675
13676    has_space=`$ECHO "$path" | $GREP " "`
13677    if test "x$has_space" != x; then
13678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13681    fi
13682  fi
13683
13684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13685$as_echo_n "checking for Boot JDK... " >&6; }
13686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13687$as_echo "$BOOT_JDK" >&6; }
13688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13689$as_echo_n "checking Boot JDK version... " >&6; }
13690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13692$as_echo "$BOOT_JDK_VERSION" >&6; }
13693            fi # end check jdk version
13694          fi # end check rt.jar
13695        fi # end check javac
13696      fi # end check java
13697    fi # end check boot jdk found
13698  fi
13699
13700  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13701
13702  if test "x$BOOT_JDK_FOUND" = xno; then
13703    # Now execute the test
13704
13705  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13706  BOOT_JDK_SUFFIX="/Contents/Home"
13707  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13708  if test "x$ALL_JDKS_FOUND" != x; then
13709    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13710
13711  if test "x$BOOT_JDK_FOUND" = xno; then
13712    # Now execute the test
13713
13714        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13715        if test -d "$BOOT_JDK"; then
13716          BOOT_JDK_FOUND=maybe
13717          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13718$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13719        fi
13720
13721
13722    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13723    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13724      # Do we have a bin/java?
13725      if test ! -x "$BOOT_JDK/bin/java"; then
13726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13728        BOOT_JDK_FOUND=no
13729      else
13730        # Do we have a bin/javac?
13731        if test ! -x "$BOOT_JDK/bin/javac"; then
13732          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13734          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13735$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13736          BOOT_JDK_FOUND=no
13737        else
13738          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13739          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13742            BOOT_JDK_FOUND=no
13743          else
13744            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13746
13747            # Extra M4 quote needed to protect [] in grep expression.
13748            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13749            if test "x$FOUND_VERSION_78" = x; then
13750              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13752              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13753$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13754              BOOT_JDK_FOUND=no
13755            else
13756              # We're done! :-)
13757              BOOT_JDK_FOUND=yes
13758
13759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13760
13761  # Input might be given as Windows format, start by converting to
13762  # unix format.
13763  path="$BOOT_JDK"
13764  new_path=`$CYGPATH -u "$path"`
13765
13766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13769  # "foo.exe" is OK but "foo" is an error.
13770  #
13771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13772  # It is also a way to make sure we got the proper file name for the real test later on.
13773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13774  if test "x$test_shortpath" = x; then
13775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13777    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13778  fi
13779
13780  # Call helper function which possibly converts this using DOS-style short mode.
13781  # If so, the updated path is stored in $new_path.
13782
13783  input_path="$new_path"
13784  # Check if we need to convert this using DOS-style short mode. If the path
13785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13786  # take no chances and rewrite it.
13787  # Note: m4 eats our [], so we need to use [ and ] instead.
13788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13789  if test "x$has_forbidden_chars" != x; then
13790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13794      # Going to short mode and back again did indeed matter. Since short mode is
13795      # case insensitive, let's make it lowercase to improve readability.
13796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13797      # Now convert it back to Unix-stile (cygpath)
13798      input_path=`$CYGPATH -u "$shortmode_path"`
13799      new_path="$input_path"
13800    fi
13801  fi
13802
13803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13804  if test "x$test_cygdrive_prefix" = x; then
13805    # As a simple fix, exclude /usr/bin since it's not a real path.
13806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13808      # a path prefixed by /cygdrive for fixpath to work.
13809      new_path="$CYGWIN_ROOT_PATH$input_path"
13810    fi
13811  fi
13812
13813
13814  if test "x$path" != "x$new_path"; then
13815    BOOT_JDK="$new_path"
13816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13818  fi
13819
13820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13821
13822  path="$BOOT_JDK"
13823  has_colon=`$ECHO $path | $GREP ^.:`
13824  new_path="$path"
13825  if test "x$has_colon" = x; then
13826    # Not in mixed or Windows style, start by that.
13827    new_path=`cmd //c echo $path`
13828  fi
13829
13830
13831  input_path="$new_path"
13832  # Check if we need to convert this using DOS-style short mode. If the path
13833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13834  # take no chances and rewrite it.
13835  # Note: m4 eats our [], so we need to use [ and ] instead.
13836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13837  if test "x$has_forbidden_chars" != x; then
13838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13840  fi
13841
13842
13843  windows_path="$new_path"
13844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13845    unix_path=`$CYGPATH -u "$windows_path"`
13846    new_path="$unix_path"
13847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13849    new_path="$unix_path"
13850  fi
13851
13852  if test "x$path" != "x$new_path"; then
13853    BOOT_JDK="$new_path"
13854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13856  fi
13857
13858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13860
13861  else
13862    # We're on a posix platform. Hooray! :)
13863    path="$BOOT_JDK"
13864
13865    if test ! -f "$path" && test ! -d "$path"; then
13866      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13867    fi
13868
13869    has_space=`$ECHO "$path" | $GREP " "`
13870    if test "x$has_space" != x; then
13871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13872$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13873      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13874    fi
13875  fi
13876
13877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13878$as_echo_n "checking for Boot JDK... " >&6; }
13879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13880$as_echo "$BOOT_JDK" >&6; }
13881              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13882$as_echo_n "checking Boot JDK version... " >&6; }
13883              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13884              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13885$as_echo "$BOOT_JDK_VERSION" >&6; }
13886            fi # end check jdk version
13887          fi # end check rt.jar
13888        fi # end check javac
13889      fi # end check java
13890    fi # end check boot jdk found
13891  fi
13892
13893    done
13894  fi
13895
13896
13897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13899      # Do we have a bin/java?
13900      if test ! -x "$BOOT_JDK/bin/java"; then
13901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13903        BOOT_JDK_FOUND=no
13904      else
13905        # Do we have a bin/javac?
13906        if test ! -x "$BOOT_JDK/bin/javac"; then
13907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13911          BOOT_JDK_FOUND=no
13912        else
13913          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13914          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13917            BOOT_JDK_FOUND=no
13918          else
13919            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13921
13922            # Extra M4 quote needed to protect [] in grep expression.
13923            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13924            if test "x$FOUND_VERSION_78" = x; then
13925              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13928$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13929              BOOT_JDK_FOUND=no
13930            else
13931              # We're done! :-)
13932              BOOT_JDK_FOUND=yes
13933
13934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13935
13936  # Input might be given as Windows format, start by converting to
13937  # unix format.
13938  path="$BOOT_JDK"
13939  new_path=`$CYGPATH -u "$path"`
13940
13941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13944  # "foo.exe" is OK but "foo" is an error.
13945  #
13946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13947  # It is also a way to make sure we got the proper file name for the real test later on.
13948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13949  if test "x$test_shortpath" = x; then
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13953  fi
13954
13955  # Call helper function which possibly converts this using DOS-style short mode.
13956  # If so, the updated path is stored in $new_path.
13957
13958  input_path="$new_path"
13959  # Check if we need to convert this using DOS-style short mode. If the path
13960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13961  # take no chances and rewrite it.
13962  # Note: m4 eats our [], so we need to use [ and ] instead.
13963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13964  if test "x$has_forbidden_chars" != x; then
13965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13969      # Going to short mode and back again did indeed matter. Since short mode is
13970      # case insensitive, let's make it lowercase to improve readability.
13971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13972      # Now convert it back to Unix-stile (cygpath)
13973      input_path=`$CYGPATH -u "$shortmode_path"`
13974      new_path="$input_path"
13975    fi
13976  fi
13977
13978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13979  if test "x$test_cygdrive_prefix" = x; then
13980    # As a simple fix, exclude /usr/bin since it's not a real path.
13981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13983      # a path prefixed by /cygdrive for fixpath to work.
13984      new_path="$CYGWIN_ROOT_PATH$input_path"
13985    fi
13986  fi
13987
13988
13989  if test "x$path" != "x$new_path"; then
13990    BOOT_JDK="$new_path"
13991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13993  fi
13994
13995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13996
13997  path="$BOOT_JDK"
13998  has_colon=`$ECHO $path | $GREP ^.:`
13999  new_path="$path"
14000  if test "x$has_colon" = x; then
14001    # Not in mixed or Windows style, start by that.
14002    new_path=`cmd //c echo $path`
14003  fi
14004
14005
14006  input_path="$new_path"
14007  # Check if we need to convert this using DOS-style short mode. If the path
14008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14009  # take no chances and rewrite it.
14010  # Note: m4 eats our [], so we need to use [ and ] instead.
14011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14012  if test "x$has_forbidden_chars" != x; then
14013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14015  fi
14016
14017
14018  windows_path="$new_path"
14019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14020    unix_path=`$CYGPATH -u "$windows_path"`
14021    new_path="$unix_path"
14022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14024    new_path="$unix_path"
14025  fi
14026
14027  if test "x$path" != "x$new_path"; then
14028    BOOT_JDK="$new_path"
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14031  fi
14032
14033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14035
14036  else
14037    # We're on a posix platform. Hooray! :)
14038    path="$BOOT_JDK"
14039
14040    if test ! -f "$path" && test ! -d "$path"; then
14041      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14042    fi
14043
14044    has_space=`$ECHO "$path" | $GREP " "`
14045    if test "x$has_space" != x; then
14046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14048      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14049    fi
14050  fi
14051
14052              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14053$as_echo_n "checking for Boot JDK... " >&6; }
14054              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14055$as_echo "$BOOT_JDK" >&6; }
14056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14057$as_echo_n "checking Boot JDK version... " >&6; }
14058              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14059              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14060$as_echo "$BOOT_JDK_VERSION" >&6; }
14061            fi # end check jdk version
14062          fi # end check rt.jar
14063        fi # end check javac
14064      fi # end check java
14065    fi # end check boot jdk found
14066  fi
14067
14068
14069  if test "x$BOOT_JDK_FOUND" = xno; then
14070    # Now execute the test
14071
14072  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14073  BOOT_JDK_SUFFIX="/Contents/Home"
14074  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14075  if test "x$ALL_JDKS_FOUND" != x; then
14076    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14077
14078  if test "x$BOOT_JDK_FOUND" = xno; then
14079    # Now execute the test
14080
14081        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14082        if test -d "$BOOT_JDK"; then
14083          BOOT_JDK_FOUND=maybe
14084          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14085$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14086        fi
14087
14088
14089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14091      # Do we have a bin/java?
14092      if test ! -x "$BOOT_JDK/bin/java"; then
14093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14095        BOOT_JDK_FOUND=no
14096      else
14097        # Do we have a bin/javac?
14098        if test ! -x "$BOOT_JDK/bin/javac"; then
14099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14103          BOOT_JDK_FOUND=no
14104        else
14105          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14106          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14109            BOOT_JDK_FOUND=no
14110          else
14111            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14113
14114            # Extra M4 quote needed to protect [] in grep expression.
14115            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14116            if test "x$FOUND_VERSION_78" = x; then
14117              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14119              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14120$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14121              BOOT_JDK_FOUND=no
14122            else
14123              # We're done! :-)
14124              BOOT_JDK_FOUND=yes
14125
14126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14127
14128  # Input might be given as Windows format, start by converting to
14129  # unix format.
14130  path="$BOOT_JDK"
14131  new_path=`$CYGPATH -u "$path"`
14132
14133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14136  # "foo.exe" is OK but "foo" is an error.
14137  #
14138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14139  # It is also a way to make sure we got the proper file name for the real test later on.
14140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14141  if test "x$test_shortpath" = x; then
14142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14145  fi
14146
14147  # Call helper function which possibly converts this using DOS-style short mode.
14148  # If so, the updated path is stored in $new_path.
14149
14150  input_path="$new_path"
14151  # Check if we need to convert this using DOS-style short mode. If the path
14152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14153  # take no chances and rewrite it.
14154  # Note: m4 eats our [], so we need to use [ and ] instead.
14155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14156  if test "x$has_forbidden_chars" != x; then
14157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14161      # Going to short mode and back again did indeed matter. Since short mode is
14162      # case insensitive, let's make it lowercase to improve readability.
14163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14164      # Now convert it back to Unix-stile (cygpath)
14165      input_path=`$CYGPATH -u "$shortmode_path"`
14166      new_path="$input_path"
14167    fi
14168  fi
14169
14170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14171  if test "x$test_cygdrive_prefix" = x; then
14172    # As a simple fix, exclude /usr/bin since it's not a real path.
14173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14175      # a path prefixed by /cygdrive for fixpath to work.
14176      new_path="$CYGWIN_ROOT_PATH$input_path"
14177    fi
14178  fi
14179
14180
14181  if test "x$path" != "x$new_path"; then
14182    BOOT_JDK="$new_path"
14183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14185  fi
14186
14187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14188
14189  path="$BOOT_JDK"
14190  has_colon=`$ECHO $path | $GREP ^.:`
14191  new_path="$path"
14192  if test "x$has_colon" = x; then
14193    # Not in mixed or Windows style, start by that.
14194    new_path=`cmd //c echo $path`
14195  fi
14196
14197
14198  input_path="$new_path"
14199  # Check if we need to convert this using DOS-style short mode. If the path
14200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14201  # take no chances and rewrite it.
14202  # Note: m4 eats our [], so we need to use [ and ] instead.
14203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14204  if test "x$has_forbidden_chars" != x; then
14205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14207  fi
14208
14209
14210  windows_path="$new_path"
14211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14212    unix_path=`$CYGPATH -u "$windows_path"`
14213    new_path="$unix_path"
14214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14216    new_path="$unix_path"
14217  fi
14218
14219  if test "x$path" != "x$new_path"; then
14220    BOOT_JDK="$new_path"
14221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14223  fi
14224
14225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14227
14228  else
14229    # We're on a posix platform. Hooray! :)
14230    path="$BOOT_JDK"
14231
14232    if test ! -f "$path" && test ! -d "$path"; then
14233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14234    fi
14235
14236    has_space=`$ECHO "$path" | $GREP " "`
14237    if test "x$has_space" != x; then
14238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14241    fi
14242  fi
14243
14244              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14245$as_echo_n "checking for Boot JDK... " >&6; }
14246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14247$as_echo "$BOOT_JDK" >&6; }
14248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14249$as_echo_n "checking Boot JDK version... " >&6; }
14250              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14251              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14252$as_echo "$BOOT_JDK_VERSION" >&6; }
14253            fi # end check jdk version
14254          fi # end check rt.jar
14255        fi # end check javac
14256      fi # end check java
14257    fi # end check boot jdk found
14258  fi
14259
14260    done
14261  fi
14262
14263
14264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14266      # Do we have a bin/java?
14267      if test ! -x "$BOOT_JDK/bin/java"; then
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14270        BOOT_JDK_FOUND=no
14271      else
14272        # Do we have a bin/javac?
14273        if test ! -x "$BOOT_JDK/bin/javac"; then
14274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14278          BOOT_JDK_FOUND=no
14279        else
14280          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14281          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14284            BOOT_JDK_FOUND=no
14285          else
14286            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14287            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14288
14289            # Extra M4 quote needed to protect [] in grep expression.
14290            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14291            if test "x$FOUND_VERSION_78" = x; then
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14294              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14295$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14296              BOOT_JDK_FOUND=no
14297            else
14298              # We're done! :-)
14299              BOOT_JDK_FOUND=yes
14300
14301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14302
14303  # Input might be given as Windows format, start by converting to
14304  # unix format.
14305  path="$BOOT_JDK"
14306  new_path=`$CYGPATH -u "$path"`
14307
14308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14311  # "foo.exe" is OK but "foo" is an error.
14312  #
14313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14314  # It is also a way to make sure we got the proper file name for the real test later on.
14315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14316  if test "x$test_shortpath" = x; then
14317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14320  fi
14321
14322  # Call helper function which possibly converts this using DOS-style short mode.
14323  # If so, the updated path is stored in $new_path.
14324
14325  input_path="$new_path"
14326  # Check if we need to convert this using DOS-style short mode. If the path
14327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14328  # take no chances and rewrite it.
14329  # Note: m4 eats our [], so we need to use [ and ] instead.
14330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14331  if test "x$has_forbidden_chars" != x; then
14332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14336      # Going to short mode and back again did indeed matter. Since short mode is
14337      # case insensitive, let's make it lowercase to improve readability.
14338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14339      # Now convert it back to Unix-stile (cygpath)
14340      input_path=`$CYGPATH -u "$shortmode_path"`
14341      new_path="$input_path"
14342    fi
14343  fi
14344
14345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14346  if test "x$test_cygdrive_prefix" = x; then
14347    # As a simple fix, exclude /usr/bin since it's not a real path.
14348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14350      # a path prefixed by /cygdrive for fixpath to work.
14351      new_path="$CYGWIN_ROOT_PATH$input_path"
14352    fi
14353  fi
14354
14355
14356  if test "x$path" != "x$new_path"; then
14357    BOOT_JDK="$new_path"
14358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14360  fi
14361
14362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14363
14364  path="$BOOT_JDK"
14365  has_colon=`$ECHO $path | $GREP ^.:`
14366  new_path="$path"
14367  if test "x$has_colon" = x; then
14368    # Not in mixed or Windows style, start by that.
14369    new_path=`cmd //c echo $path`
14370  fi
14371
14372
14373  input_path="$new_path"
14374  # Check if we need to convert this using DOS-style short mode. If the path
14375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14376  # take no chances and rewrite it.
14377  # Note: m4 eats our [], so we need to use [ and ] instead.
14378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14379  if test "x$has_forbidden_chars" != x; then
14380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14382  fi
14383
14384
14385  windows_path="$new_path"
14386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14387    unix_path=`$CYGPATH -u "$windows_path"`
14388    new_path="$unix_path"
14389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14391    new_path="$unix_path"
14392  fi
14393
14394  if test "x$path" != "x$new_path"; then
14395    BOOT_JDK="$new_path"
14396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14398  fi
14399
14400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14402
14403  else
14404    # We're on a posix platform. Hooray! :)
14405    path="$BOOT_JDK"
14406
14407    if test ! -f "$path" && test ! -d "$path"; then
14408      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14409    fi
14410
14411    has_space=`$ECHO "$path" | $GREP " "`
14412    if test "x$has_space" != x; then
14413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14416    fi
14417  fi
14418
14419              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14420$as_echo_n "checking for Boot JDK... " >&6; }
14421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14422$as_echo "$BOOT_JDK" >&6; }
14423              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14424$as_echo_n "checking Boot JDK version... " >&6; }
14425              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14426              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14427$as_echo "$BOOT_JDK_VERSION" >&6; }
14428            fi # end check jdk version
14429          fi # end check rt.jar
14430        fi # end check javac
14431      fi # end check java
14432    fi # end check boot jdk found
14433  fi
14434
14435  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14436
14437  if test "x$BOOT_JDK_FOUND" = xno; then
14438    # Now execute the test
14439
14440  BOOT_JDK_PREFIX="/usr/lib/jvm"
14441  BOOT_JDK_SUFFIX=""
14442  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14443  if test "x$ALL_JDKS_FOUND" != x; then
14444    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14445
14446  if test "x$BOOT_JDK_FOUND" = xno; then
14447    # Now execute the test
14448
14449        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14450        if test -d "$BOOT_JDK"; then
14451          BOOT_JDK_FOUND=maybe
14452          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14453$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14454        fi
14455
14456
14457    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14458    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14459      # Do we have a bin/java?
14460      if test ! -x "$BOOT_JDK/bin/java"; then
14461        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14463        BOOT_JDK_FOUND=no
14464      else
14465        # Do we have a bin/javac?
14466        if test ! -x "$BOOT_JDK/bin/javac"; then
14467          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14469          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14470$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14471          BOOT_JDK_FOUND=no
14472        else
14473          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14474          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14475            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14477            BOOT_JDK_FOUND=no
14478          else
14479            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14481
14482            # Extra M4 quote needed to protect [] in grep expression.
14483            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14484            if test "x$FOUND_VERSION_78" = x; then
14485              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14487              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14488$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14489              BOOT_JDK_FOUND=no
14490            else
14491              # We're done! :-)
14492              BOOT_JDK_FOUND=yes
14493
14494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14495
14496  # Input might be given as Windows format, start by converting to
14497  # unix format.
14498  path="$BOOT_JDK"
14499  new_path=`$CYGPATH -u "$path"`
14500
14501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14504  # "foo.exe" is OK but "foo" is an error.
14505  #
14506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14507  # It is also a way to make sure we got the proper file name for the real test later on.
14508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14509  if test "x$test_shortpath" = x; then
14510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14512    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14513  fi
14514
14515  # Call helper function which possibly converts this using DOS-style short mode.
14516  # If so, the updated path is stored in $new_path.
14517
14518  input_path="$new_path"
14519  # Check if we need to convert this using DOS-style short mode. If the path
14520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14521  # take no chances and rewrite it.
14522  # Note: m4 eats our [], so we need to use [ and ] instead.
14523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14524  if test "x$has_forbidden_chars" != x; then
14525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14529      # Going to short mode and back again did indeed matter. Since short mode is
14530      # case insensitive, let's make it lowercase to improve readability.
14531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14532      # Now convert it back to Unix-stile (cygpath)
14533      input_path=`$CYGPATH -u "$shortmode_path"`
14534      new_path="$input_path"
14535    fi
14536  fi
14537
14538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14539  if test "x$test_cygdrive_prefix" = x; then
14540    # As a simple fix, exclude /usr/bin since it's not a real path.
14541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14543      # a path prefixed by /cygdrive for fixpath to work.
14544      new_path="$CYGWIN_ROOT_PATH$input_path"
14545    fi
14546  fi
14547
14548
14549  if test "x$path" != "x$new_path"; then
14550    BOOT_JDK="$new_path"
14551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14553  fi
14554
14555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14556
14557  path="$BOOT_JDK"
14558  has_colon=`$ECHO $path | $GREP ^.:`
14559  new_path="$path"
14560  if test "x$has_colon" = x; then
14561    # Not in mixed or Windows style, start by that.
14562    new_path=`cmd //c echo $path`
14563  fi
14564
14565
14566  input_path="$new_path"
14567  # Check if we need to convert this using DOS-style short mode. If the path
14568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14569  # take no chances and rewrite it.
14570  # Note: m4 eats our [], so we need to use [ and ] instead.
14571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14572  if test "x$has_forbidden_chars" != x; then
14573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14575  fi
14576
14577
14578  windows_path="$new_path"
14579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14580    unix_path=`$CYGPATH -u "$windows_path"`
14581    new_path="$unix_path"
14582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14584    new_path="$unix_path"
14585  fi
14586
14587  if test "x$path" != "x$new_path"; then
14588    BOOT_JDK="$new_path"
14589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14591  fi
14592
14593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14595
14596  else
14597    # We're on a posix platform. Hooray! :)
14598    path="$BOOT_JDK"
14599
14600    if test ! -f "$path" && test ! -d "$path"; then
14601      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14602    fi
14603
14604    has_space=`$ECHO "$path" | $GREP " "`
14605    if test "x$has_space" != x; then
14606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14608      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14609    fi
14610  fi
14611
14612              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14613$as_echo_n "checking for Boot JDK... " >&6; }
14614              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14615$as_echo "$BOOT_JDK" >&6; }
14616              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14617$as_echo_n "checking Boot JDK version... " >&6; }
14618              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14619              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14620$as_echo "$BOOT_JDK_VERSION" >&6; }
14621            fi # end check jdk version
14622          fi # end check rt.jar
14623        fi # end check javac
14624      fi # end check java
14625    fi # end check boot jdk found
14626  fi
14627
14628    done
14629  fi
14630
14631
14632    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14633    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14634      # Do we have a bin/java?
14635      if test ! -x "$BOOT_JDK/bin/java"; then
14636        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14638        BOOT_JDK_FOUND=no
14639      else
14640        # Do we have a bin/javac?
14641        if test ! -x "$BOOT_JDK/bin/javac"; then
14642          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14644          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14645$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14646          BOOT_JDK_FOUND=no
14647        else
14648          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14649          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14652            BOOT_JDK_FOUND=no
14653          else
14654            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14656
14657            # Extra M4 quote needed to protect [] in grep expression.
14658            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14659            if test "x$FOUND_VERSION_78" = x; then
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14663$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14664              BOOT_JDK_FOUND=no
14665            else
14666              # We're done! :-)
14667              BOOT_JDK_FOUND=yes
14668
14669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14670
14671  # Input might be given as Windows format, start by converting to
14672  # unix format.
14673  path="$BOOT_JDK"
14674  new_path=`$CYGPATH -u "$path"`
14675
14676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14679  # "foo.exe" is OK but "foo" is an error.
14680  #
14681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14682  # It is also a way to make sure we got the proper file name for the real test later on.
14683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14684  if test "x$test_shortpath" = x; then
14685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14688  fi
14689
14690  # Call helper function which possibly converts this using DOS-style short mode.
14691  # If so, the updated path is stored in $new_path.
14692
14693  input_path="$new_path"
14694  # Check if we need to convert this using DOS-style short mode. If the path
14695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14696  # take no chances and rewrite it.
14697  # Note: m4 eats our [], so we need to use [ and ] instead.
14698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14699  if test "x$has_forbidden_chars" != x; then
14700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14704      # Going to short mode and back again did indeed matter. Since short mode is
14705      # case insensitive, let's make it lowercase to improve readability.
14706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14707      # Now convert it back to Unix-stile (cygpath)
14708      input_path=`$CYGPATH -u "$shortmode_path"`
14709      new_path="$input_path"
14710    fi
14711  fi
14712
14713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14714  if test "x$test_cygdrive_prefix" = x; then
14715    # As a simple fix, exclude /usr/bin since it's not a real path.
14716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14718      # a path prefixed by /cygdrive for fixpath to work.
14719      new_path="$CYGWIN_ROOT_PATH$input_path"
14720    fi
14721  fi
14722
14723
14724  if test "x$path" != "x$new_path"; then
14725    BOOT_JDK="$new_path"
14726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14728  fi
14729
14730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14731
14732  path="$BOOT_JDK"
14733  has_colon=`$ECHO $path | $GREP ^.:`
14734  new_path="$path"
14735  if test "x$has_colon" = x; then
14736    # Not in mixed or Windows style, start by that.
14737    new_path=`cmd //c echo $path`
14738  fi
14739
14740
14741  input_path="$new_path"
14742  # Check if we need to convert this using DOS-style short mode. If the path
14743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14744  # take no chances and rewrite it.
14745  # Note: m4 eats our [], so we need to use [ and ] instead.
14746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14747  if test "x$has_forbidden_chars" != x; then
14748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14750  fi
14751
14752
14753  windows_path="$new_path"
14754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14755    unix_path=`$CYGPATH -u "$windows_path"`
14756    new_path="$unix_path"
14757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14759    new_path="$unix_path"
14760  fi
14761
14762  if test "x$path" != "x$new_path"; then
14763    BOOT_JDK="$new_path"
14764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14766  fi
14767
14768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14770
14771  else
14772    # We're on a posix platform. Hooray! :)
14773    path="$BOOT_JDK"
14774
14775    if test ! -f "$path" && test ! -d "$path"; then
14776      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14777    fi
14778
14779    has_space=`$ECHO "$path" | $GREP " "`
14780    if test "x$has_space" != x; then
14781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14783      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14784    fi
14785  fi
14786
14787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14788$as_echo_n "checking for Boot JDK... " >&6; }
14789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14790$as_echo "$BOOT_JDK" >&6; }
14791              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14792$as_echo_n "checking Boot JDK version... " >&6; }
14793              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14795$as_echo "$BOOT_JDK_VERSION" >&6; }
14796            fi # end check jdk version
14797          fi # end check rt.jar
14798        fi # end check javac
14799      fi # end check java
14800    fi # end check boot jdk found
14801  fi
14802
14803  fi
14804
14805
14806    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14807    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14808      # Do we have a bin/java?
14809      if test ! -x "$BOOT_JDK/bin/java"; then
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14812        BOOT_JDK_FOUND=no
14813      else
14814        # Do we have a bin/javac?
14815        if test ! -x "$BOOT_JDK/bin/javac"; then
14816          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14818          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14819$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14820          BOOT_JDK_FOUND=no
14821        else
14822          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14823          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14824            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14826            BOOT_JDK_FOUND=no
14827          else
14828            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14829            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14830
14831            # Extra M4 quote needed to protect [] in grep expression.
14832            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14833            if test "x$FOUND_VERSION_78" = x; then
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14837$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14838              BOOT_JDK_FOUND=no
14839            else
14840              # We're done! :-)
14841              BOOT_JDK_FOUND=yes
14842
14843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14844
14845  # Input might be given as Windows format, start by converting to
14846  # unix format.
14847  path="$BOOT_JDK"
14848  new_path=`$CYGPATH -u "$path"`
14849
14850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14853  # "foo.exe" is OK but "foo" is an error.
14854  #
14855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14856  # It is also a way to make sure we got the proper file name for the real test later on.
14857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14858  if test "x$test_shortpath" = x; then
14859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14861    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14862  fi
14863
14864  # Call helper function which possibly converts this using DOS-style short mode.
14865  # If so, the updated path is stored in $new_path.
14866
14867  input_path="$new_path"
14868  # Check if we need to convert this using DOS-style short mode. If the path
14869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870  # take no chances and rewrite it.
14871  # Note: m4 eats our [], so we need to use [ and ] instead.
14872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14873  if test "x$has_forbidden_chars" != x; then
14874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14878      # Going to short mode and back again did indeed matter. Since short mode is
14879      # case insensitive, let's make it lowercase to improve readability.
14880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881      # Now convert it back to Unix-stile (cygpath)
14882      input_path=`$CYGPATH -u "$shortmode_path"`
14883      new_path="$input_path"
14884    fi
14885  fi
14886
14887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14888  if test "x$test_cygdrive_prefix" = x; then
14889    # As a simple fix, exclude /usr/bin since it's not a real path.
14890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14892      # a path prefixed by /cygdrive for fixpath to work.
14893      new_path="$CYGWIN_ROOT_PATH$input_path"
14894    fi
14895  fi
14896
14897
14898  if test "x$path" != "x$new_path"; then
14899    BOOT_JDK="$new_path"
14900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14902  fi
14903
14904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14905
14906  path="$BOOT_JDK"
14907  has_colon=`$ECHO $path | $GREP ^.:`
14908  new_path="$path"
14909  if test "x$has_colon" = x; then
14910    # Not in mixed or Windows style, start by that.
14911    new_path=`cmd //c echo $path`
14912  fi
14913
14914
14915  input_path="$new_path"
14916  # Check if we need to convert this using DOS-style short mode. If the path
14917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14918  # take no chances and rewrite it.
14919  # Note: m4 eats our [], so we need to use [ and ] instead.
14920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14921  if test "x$has_forbidden_chars" != x; then
14922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14924  fi
14925
14926
14927  windows_path="$new_path"
14928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14929    unix_path=`$CYGPATH -u "$windows_path"`
14930    new_path="$unix_path"
14931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14933    new_path="$unix_path"
14934  fi
14935
14936  if test "x$path" != "x$new_path"; then
14937    BOOT_JDK="$new_path"
14938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14940  fi
14941
14942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14944
14945  else
14946    # We're on a posix platform. Hooray! :)
14947    path="$BOOT_JDK"
14948
14949    if test ! -f "$path" && test ! -d "$path"; then
14950      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14951    fi
14952
14953    has_space=`$ECHO "$path" | $GREP " "`
14954    if test "x$has_space" != x; then
14955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14958    fi
14959  fi
14960
14961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14962$as_echo_n "checking for Boot JDK... " >&6; }
14963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14964$as_echo "$BOOT_JDK" >&6; }
14965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14966$as_echo_n "checking Boot JDK version... " >&6; }
14967              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14968              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14969$as_echo "$BOOT_JDK_VERSION" >&6; }
14970            fi # end check jdk version
14971          fi # end check rt.jar
14972        fi # end check javac
14973      fi # end check java
14974    fi # end check boot jdk found
14975  fi
14976
14977
14978# If we haven't found anything yet, we've truly lost. Give up.
14979if test "x$BOOT_JDK_FOUND" = xno; then
14980
14981    # Print a helpful message on how to acquire the necessary build dependency.
14982    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
14983    MISSING_DEPENDENCY=openjdk
14984    PKGHANDLER_COMMAND=
14985
14986    case $PKGHANDLER in
14987	apt-get)
14988                apt_help     $MISSING_DEPENDENCY ;;
14989    yum)
14990                yum_help     $MISSING_DEPENDENCY ;;
14991	port)
14992                port_help    $MISSING_DEPENDENCY ;;
14993	pkgutil)
14994                pkgutil_help $MISSING_DEPENDENCY ;;
14995	pkgadd)
14996                pkgadd_help  $MISSING_DEPENDENCY ;;
14997    * )
14998      break ;;
14999    esac
15000
15001    if test "x$PKGHANDLER_COMMAND" != x; then
15002        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15003    fi
15004
15005  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15006$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15007  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15008$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15009  as_fn_error $? "Cannot continue" "$LINENO" 5
15010fi
15011
15012# Setup proper paths for what we found
15013BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15014if test ! -f "$BOOT_RTJAR"; then
15015    # On MacOSX it is called classes.jar
15016    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15017    if test -f "$BOOT_RTJAR"; then
15018      # Remove the ..
15019      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15020    fi
15021fi
15022BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15023BOOT_JDK="$BOOT_JDK"
15024
15025
15026
15027
15028# Setup tools from the Boot JDK.
15029
15030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15031$as_echo_n "checking for java in Boot JDK... " >&6; }
15032  JAVA=$BOOT_JDK/bin/java
15033  if test ! -x $JAVA; then
15034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15035$as_echo "not found" >&6; }
15036      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15037$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15038      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15039  fi
15040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15041$as_echo "ok" >&6; }
15042
15043
15044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15045$as_echo_n "checking for javac in Boot JDK... " >&6; }
15046  JAVAC=$BOOT_JDK/bin/javac
15047  if test ! -x $JAVAC; then
15048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15049$as_echo "not found" >&6; }
15050      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15051$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15052      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15053  fi
15054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15055$as_echo "ok" >&6; }
15056
15057
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15059$as_echo_n "checking for javah in Boot JDK... " >&6; }
15060  JAVAH=$BOOT_JDK/bin/javah
15061  if test ! -x $JAVAH; then
15062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15063$as_echo "not found" >&6; }
15064      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15065$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15066      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15067  fi
15068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15069$as_echo "ok" >&6; }
15070
15071
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15073$as_echo_n "checking for javap in Boot JDK... " >&6; }
15074  JAVAP=$BOOT_JDK/bin/javap
15075  if test ! -x $JAVAP; then
15076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15077$as_echo "not found" >&6; }
15078      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15079$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15080      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15081  fi
15082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15083$as_echo "ok" >&6; }
15084
15085
15086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15087$as_echo_n "checking for jar in Boot JDK... " >&6; }
15088  JAR=$BOOT_JDK/bin/jar
15089  if test ! -x $JAR; then
15090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15091$as_echo "not found" >&6; }
15092      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15093$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15094      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15095  fi
15096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15097$as_echo "ok" >&6; }
15098
15099
15100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15101$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15102  RMIC=$BOOT_JDK/bin/rmic
15103  if test ! -x $RMIC; then
15104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15105$as_echo "not found" >&6; }
15106      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15107$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15108      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15109  fi
15110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15111$as_echo "ok" >&6; }
15112
15113
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15115$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15116  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15117  if test ! -x $NATIVE2ASCII; then
15118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15119$as_echo "not found" >&6; }
15120      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15121$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15122      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15123  fi
15124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15125$as_echo "ok" >&6; }
15126
15127
15128# Finally, set some other options...
15129
15130# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15131BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15132
15133
15134
15135
15136##############################################################################
15137#
15138# Specify options for anything that is run with the Boot JDK.
15139#
15140
15141# Check whether --with-boot-jdk-jvmargs was given.
15142if test "${with_boot_jdk_jvmargs+set}" = set; then :
15143  withval=$with_boot_jdk_jvmargs;
15144fi
15145
15146
15147if test "x$with_boot_jdk_jvmargs" = x; then
15148    # Not all JVM:s accept the same arguments on the command line.
15149    # OpenJDK specific increase in thread stack for JDK build,
15150    # well more specifically, when running javac.
15151    if test "x$BUILD_NUM_BITS" = x32; then
15152       STACK_SIZE=768
15153    else
15154       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15155       # since 64-bit pointers are pushed on the stach. Apparently, we need
15156       # to increase the stack space when javacing the JDK....
15157       STACK_SIZE=1536
15158    fi
15159
15160    # Minimum amount of heap memory.
15161
15162    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15163    # If so, then append -Xms64M to boot_jdk_jvmargs
15164    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15165    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15166    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15167        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15168    fi
15169
15170    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15171        # Why does macosx need more heap? Its the huge JDK batch.
15172
15173    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15174    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15175    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15176    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15177    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15178        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15179    fi
15180
15181    else
15182
15183    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15184    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15185    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15186    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15187    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15188        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15189    fi
15190
15191    fi
15192    # When is adding -client something that speeds up the JVM?
15193    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15194
15195    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15196    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15197    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15198    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15199    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15200        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15201    fi
15202
15203
15204    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15205    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15206    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15207    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15208    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15209        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15210    fi
15211
15212
15213    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15214    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15215    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15216    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15217    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15218        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15219    fi
15220
15221    # Disable special log output when a debug build is used as Boot JDK...
15222
15223    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15224    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15225    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15226    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15227    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15228        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15229    fi
15230
15231fi
15232
15233BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15234
15235
15236
15237###############################################################################
15238#
15239# Configure the sources to use. We can add or override individual directories.
15240#
15241###############################################################################
15242
15243
15244
15245# Where are the sources. Any of these can be overridden
15246# using --with-override-corba and the likes.
15247LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15248CORBA_TOPDIR="$SRC_ROOT/corba"
15249JAXP_TOPDIR="$SRC_ROOT/jaxp"
15250JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15251HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15252JDK_TOPDIR="$SRC_ROOT/jdk"
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262###############################################################################
15263#
15264# Pickup additional source for a component from outside of the source root
15265# or override source for a component.
15266#
15267
15268# Check whether --with-add-source-root was given.
15269if test "${with_add_source_root+set}" = set; then :
15270  withval=$with_add_source_root;
15271fi
15272
15273
15274
15275# Check whether --with-override-source-root was given.
15276if test "${with_override_source_root+set}" = set; then :
15277  withval=$with_override_source_root;
15278fi
15279
15280
15281
15282# Check whether --with-adds-and-overrides was given.
15283if test "${with_adds_and_overrides+set}" = set; then :
15284  withval=$with_adds_and_overrides;
15285fi
15286
15287
15288if test "x$with_adds_and_overrides" != x; then
15289    with_add_source_root="$with_adds_and_overrides/adds"
15290    with_override_source_root="$with_adds_and_overrides/overrides"
15291fi
15292
15293if test "x$with_add_source_root" != x; then
15294    if ! test -d $with_add_source_root; then
15295       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15296    fi
15297    CURDIR="$PWD"
15298    cd "$with_add_source_root"
15299    ADD_SRC_ROOT="`pwd`"
15300    cd "$CURDIR"
15301    # Verify that the addon source root does not have any root makefiles.
15302    # If it does, then it is usually an error, prevent this.
15303    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15304       test -f $with_add_source_root/langtools/make/Makefile; then
15305        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
15306    fi
15307    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15308       test -f $with_add_source_root/corba/make/Makefile; then
15309        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
15310    fi
15311    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15312       test -f $with_add_source_root/jaxp/make/Makefile; then
15313        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
15314    fi
15315    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15316       test -f $with_add_source_root/jaxws/make/Makefile; then
15317        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
15318    fi
15319    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15320       test -f $with_add_source_root/hotspot/make/Makefile; then
15321        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
15322    fi
15323    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15324       test -f $with_add_source_root/jdk/make/Makefile; then
15325        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
15326    fi
15327fi
15328
15329
15330if test "x$with_override_source_root" != x; then
15331    if ! test -d $with_override_source_root; then
15332       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15333    fi
15334    CURDIR="$PWD"
15335    cd "$with_override_source_root"
15336    OVERRIDE_SRC_ROOT="`pwd`"
15337    cd "$CURDIR"
15338    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15339       test -f $with_override_source_root/langtools/make/Makefile; then
15340        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
15341    fi
15342    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15343       test -f $with_override_source_root/corba/make/Makefile; then
15344        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
15345    fi
15346    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15347       test -f $with_override_source_root/jaxp/make/Makefile; then
15348        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
15349    fi
15350    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15351       test -f $with_override_source_root/jaxws/make/Makefile; then
15352        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
15353    fi
15354    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15355       test -f $with_override_source_root/hotspot/make/Makefile; then
15356        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
15357    fi
15358    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15359       test -f $with_override_source_root/jdk/make/Makefile; then
15360        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
15361    fi
15362fi
15363
15364
15365###############################################################################
15366#
15367# Override a repo completely, this is used for example when you have 3 small
15368# development sandboxes of the langtools sources and want to avoid having 3 full
15369# OpenJDK sources checked out on disk.
15370#
15371# Assuming that the 3 langtools sandboxes are located here:
15372# /home/fredrik/sandbox1/langtools
15373# /home/fredrik/sandbox2/langtools
15374# /home/fredrik/sandbox3/langtools
15375#
15376# From the source root you create build subdirs manually:
15377#     mkdir -p build1 build2 build3
15378# in each build directory run:
15379#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15380#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15381#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15382#
15383
15384
15385# Check whether --with-override-langtools was given.
15386if test "${with_override_langtools+set}" = set; then :
15387  withval=$with_override_langtools;
15388fi
15389
15390
15391
15392# Check whether --with-override-corba was given.
15393if test "${with_override_corba+set}" = set; then :
15394  withval=$with_override_corba;
15395fi
15396
15397
15398
15399# Check whether --with-override-jaxp was given.
15400if test "${with_override_jaxp+set}" = set; then :
15401  withval=$with_override_jaxp;
15402fi
15403
15404
15405
15406# Check whether --with-override-jaxws was given.
15407if test "${with_override_jaxws+set}" = set; then :
15408  withval=$with_override_jaxws;
15409fi
15410
15411
15412
15413# Check whether --with-override-hotspot was given.
15414if test "${with_override_hotspot+set}" = set; then :
15415  withval=$with_override_hotspot;
15416fi
15417
15418
15419
15420# Check whether --with-override-jdk was given.
15421if test "${with_override_jdk+set}" = set; then :
15422  withval=$with_override_jdk;
15423fi
15424
15425
15426if test "x$with_override_langtools" != x; then
15427    CURDIR="$PWD"
15428    cd "$with_override_langtools"
15429    LANGTOOLS_TOPDIR="`pwd`"
15430    cd "$CURDIR"
15431    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15432        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15433    fi
15434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15435$as_echo_n "checking if langtools should be overridden... " >&6; }
15436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15437$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15438fi
15439if test "x$with_override_corba" != x; then
15440    CURDIR="$PWD"
15441    cd "$with_override_corba"
15442    CORBA_TOPDIR="`pwd`"
15443    cd "$CURDIR"
15444    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15445        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15446    fi
15447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15448$as_echo_n "checking if corba should be overridden... " >&6; }
15449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15450$as_echo "yes with $CORBA_TOPDIR" >&6; }
15451fi
15452if test "x$with_override_jaxp" != x; then
15453    CURDIR="$PWD"
15454    cd "$with_override_jaxp"
15455    JAXP_TOPDIR="`pwd`"
15456    cd "$CURDIR"
15457    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15458        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15459    fi
15460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15461$as_echo_n "checking if jaxp should be overridden... " >&6; }
15462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15463$as_echo "yes with $JAXP_TOPDIR" >&6; }
15464fi
15465if test "x$with_override_jaxws" != x; then
15466    CURDIR="$PWD"
15467    cd "$with_override_jaxws"
15468    JAXWS_TOPDIR="`pwd`"
15469    cd "$CURDIR"
15470    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15471        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15472    fi
15473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15474$as_echo_n "checking if jaxws should be overridden... " >&6; }
15475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15476$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15477fi
15478if test "x$with_override_hotspot" != x; then
15479    CURDIR="$PWD"
15480    cd "$with_override_hotspot"
15481    HOTSPOT_TOPDIR="`pwd`"
15482    cd "$CURDIR"
15483    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15484       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15485        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15486    fi
15487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15488$as_echo_n "checking if hotspot should be overridden... " >&6; }
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15490$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15491fi
15492if test "x$with_override_jdk" != x; then
15493    CURDIR="$PWD"
15494    cd "$with_override_jdk"
15495    JDK_TOPDIR="`pwd`"
15496    cd "$CURDIR"
15497    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15498        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15499    fi
15500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15501$as_echo_n "checking if JDK should be overridden... " >&6; }
15502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15503$as_echo "yes with $JDK_TOPDIR" >&6; }
15504fi
15505
15506
15507
15508BUILD_OUTPUT="$OUTPUT_ROOT"
15509
15510
15511JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15512
15513
15514###############################################################################
15515#
15516# Setup the toolchain (compilers etc), i.e. the tools that need to be
15517# cross-compilation aware.
15518#
15519###############################################################################
15520
15521
15522###############################################################################
15523#
15524# Configure the development tool paths and potential sysroot.
15525#
15526ac_ext=cpp
15527ac_cpp='$CXXCPP $CPPFLAGS'
15528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15531
15532
15533# The option used to specify the target .o,.a or .so file.
15534# When compiling, how to specify the to be created object file.
15535CC_OUT_OPTION='-o$(SPACE)'
15536# When linking, how to specify the to be created executable.
15537EXE_OUT_OPTION='-o$(SPACE)'
15538# When linking, how to specify the to be created dynamically linkable library.
15539LD_OUT_OPTION='-o$(SPACE)'
15540# When archiving, how to specify the to be create static archive for object files.
15541AR_OUT_OPTION='rcs$(SPACE)'
15542
15543
15544
15545
15546
15547# Locate the actual tools
15548
15549if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15550
15551  # Store path to cygwin link.exe to help excluding it when searching for
15552  # VS linker. This must be done before changing the PATH when looking for VS.
15553  # Extract the first word of "link", so it can be a program name with args.
15554set dummy link; ac_word=$2
15555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15556$as_echo_n "checking for $ac_word... " >&6; }
15557if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15558  $as_echo_n "(cached) " >&6
15559else
15560  case $CYGWIN_LINK in
15561  [\\/]* | ?:[\\/]*)
15562  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15563  ;;
15564  *)
15565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15566for as_dir in $PATH
15567do
15568  IFS=$as_save_IFS
15569  test -z "$as_dir" && as_dir=.
15570    for ac_exec_ext in '' $ac_executable_extensions; do
15571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15572    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15574    break 2
15575  fi
15576done
15577  done
15578IFS=$as_save_IFS
15579
15580  ;;
15581esac
15582fi
15583CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15584if test -n "$CYGWIN_LINK"; then
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15586$as_echo "$CYGWIN_LINK" >&6; }
15587else
15588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15589$as_echo "no" >&6; }
15590fi
15591
15592
15593  if test "x$CYGWIN_LINK" != x; then
15594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15595$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15596    "$CYGWIN_LINK" --version > /dev/null
15597    if test $? -eq 0 ; then
15598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15599$as_echo "yes" >&6; }
15600    else
15601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15602$as_echo "no" >&6; }
15603      # This might be the VS linker. Don't exclude it later on.
15604      CYGWIN_LINK=""
15605    fi
15606  fi
15607
15608  # First-hand choice is to locate and run the vsvars bat file.
15609
15610  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15611    VCVARSFILE="vc/bin/vcvars32.bat"
15612  else
15613    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15614  fi
15615
15616  VS_ENV_CMD=""
15617  VS_ENV_ARGS=""
15618  if test "x$with_toolsdir" != x; then
15619
15620  if test "x$VS_ENV_CMD" = x; then
15621    VS100BASE="$with_toolsdir/../.."
15622    METHOD="--with-tools-dir"
15623
15624  windows_path="$VS100BASE"
15625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15626    unix_path=`$CYGPATH -u "$windows_path"`
15627    VS100BASE="$unix_path"
15628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15630    VS100BASE="$unix_path"
15631  fi
15632
15633    if test -d "$VS100BASE"; then
15634      if test -f "$VS100BASE/$VCVARSFILE"; then
15635        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15636$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15637        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15638      else
15639        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15640$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15642$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15643      fi
15644    fi
15645  fi
15646
15647  fi
15648
15649  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15650    # Having specified an argument which is incorrect will produce an instant failure;
15651    # we should not go on looking
15652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15653$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15654    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15655$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15656    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15657  fi
15658
15659  if test "x$ProgramW6432" != x; then
15660
15661  if test "x$VS_ENV_CMD" = x; then
15662    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15663    METHOD="well-known name"
15664
15665  windows_path="$WIN_SDK_BASE"
15666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15667    unix_path=`$CYGPATH -u "$windows_path"`
15668    WIN_SDK_BASE="$unix_path"
15669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15671    WIN_SDK_BASE="$unix_path"
15672  fi
15673
15674    if test -d "$WIN_SDK_BASE"; then
15675      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15677$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15678        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15679        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15680          VS_ENV_ARGS="/x86"
15681        else
15682          VS_ENV_ARGS="/x64"
15683        fi
15684      else
15685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15686$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15687        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15688$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15689      fi
15690    fi
15691  fi
15692
15693  fi
15694  if test "x$PROGRAMW6432" != x; then
15695
15696  if test "x$VS_ENV_CMD" = x; then
15697    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15698    METHOD="well-known name"
15699
15700  windows_path="$WIN_SDK_BASE"
15701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15702    unix_path=`$CYGPATH -u "$windows_path"`
15703    WIN_SDK_BASE="$unix_path"
15704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15706    WIN_SDK_BASE="$unix_path"
15707  fi
15708
15709    if test -d "$WIN_SDK_BASE"; then
15710      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15712$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15713        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15714        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15715          VS_ENV_ARGS="/x86"
15716        else
15717          VS_ENV_ARGS="/x64"
15718        fi
15719      else
15720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15721$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15723$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15724      fi
15725    fi
15726  fi
15727
15728  fi
15729  if test "x$PROGRAMFILES" != x; then
15730
15731  if test "x$VS_ENV_CMD" = x; then
15732    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15733    METHOD="well-known name"
15734
15735  windows_path="$WIN_SDK_BASE"
15736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15737    unix_path=`$CYGPATH -u "$windows_path"`
15738    WIN_SDK_BASE="$unix_path"
15739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15741    WIN_SDK_BASE="$unix_path"
15742  fi
15743
15744    if test -d "$WIN_SDK_BASE"; then
15745      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15747$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15748        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15749        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15750          VS_ENV_ARGS="/x86"
15751        else
15752          VS_ENV_ARGS="/x64"
15753        fi
15754      else
15755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15756$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15758$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15759      fi
15760    fi
15761  fi
15762
15763  fi
15764
15765  if test "x$VS_ENV_CMD" = x; then
15766    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15767    METHOD="well-known name"
15768
15769  windows_path="$WIN_SDK_BASE"
15770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15771    unix_path=`$CYGPATH -u "$windows_path"`
15772    WIN_SDK_BASE="$unix_path"
15773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15775    WIN_SDK_BASE="$unix_path"
15776  fi
15777
15778    if test -d "$WIN_SDK_BASE"; then
15779      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15780        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15781$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15782        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15783        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15784          VS_ENV_ARGS="/x86"
15785        else
15786          VS_ENV_ARGS="/x64"
15787        fi
15788      else
15789        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15790$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15791        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15792$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15793      fi
15794    fi
15795  fi
15796
15797
15798  if test "x$VS_ENV_CMD" = x; then
15799    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15800    METHOD="well-known name"
15801
15802  windows_path="$WIN_SDK_BASE"
15803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15804    unix_path=`$CYGPATH -u "$windows_path"`
15805    WIN_SDK_BASE="$unix_path"
15806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15808    WIN_SDK_BASE="$unix_path"
15809  fi
15810
15811    if test -d "$WIN_SDK_BASE"; then
15812      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15814$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15815        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15816        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15817          VS_ENV_ARGS="/x86"
15818        else
15819          VS_ENV_ARGS="/x64"
15820        fi
15821      else
15822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15823$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15825$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15826      fi
15827    fi
15828  fi
15829
15830
15831  if test "x$VS100COMNTOOLS" != x; then
15832
15833  if test "x$VS_ENV_CMD" = x; then
15834    VS100BASE="$VS100COMNTOOLS/../.."
15835    METHOD="VS100COMNTOOLS variable"
15836
15837  windows_path="$VS100BASE"
15838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15839    unix_path=`$CYGPATH -u "$windows_path"`
15840    VS100BASE="$unix_path"
15841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15843    VS100BASE="$unix_path"
15844  fi
15845
15846    if test -d "$VS100BASE"; then
15847      if test -f "$VS100BASE/$VCVARSFILE"; then
15848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15849$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15850        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15851      else
15852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15853$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15856      fi
15857    fi
15858  fi
15859
15860  fi
15861  if test "x$PROGRAMFILES" != x; then
15862
15863  if test "x$VS_ENV_CMD" = x; then
15864    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15865    METHOD="well-known name"
15866
15867  windows_path="$VS100BASE"
15868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15869    unix_path=`$CYGPATH -u "$windows_path"`
15870    VS100BASE="$unix_path"
15871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15873    VS100BASE="$unix_path"
15874  fi
15875
15876    if test -d "$VS100BASE"; then
15877      if test -f "$VS100BASE/$VCVARSFILE"; then
15878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15879$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15880        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15881      else
15882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15885$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15886      fi
15887    fi
15888  fi
15889
15890  fi
15891
15892  if test "x$VS_ENV_CMD" = x; then
15893    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15894    METHOD="well-known name"
15895
15896  windows_path="$VS100BASE"
15897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15898    unix_path=`$CYGPATH -u "$windows_path"`
15899    VS100BASE="$unix_path"
15900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15902    VS100BASE="$unix_path"
15903  fi
15904
15905    if test -d "$VS100BASE"; then
15906      if test -f "$VS100BASE/$VCVARSFILE"; then
15907        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15908$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15909        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15910      else
15911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15912$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15914$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15915      fi
15916    fi
15917  fi
15918
15919
15920  if test "x$VS_ENV_CMD" = x; then
15921    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15922    METHOD="well-known name"
15923
15924  windows_path="$VS100BASE"
15925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15926    unix_path=`$CYGPATH -u "$windows_path"`
15927    VS100BASE="$unix_path"
15928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15930    VS100BASE="$unix_path"
15931  fi
15932
15933    if test -d "$VS100BASE"; then
15934      if test -f "$VS100BASE/$VCVARSFILE"; then
15935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15936$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15937        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15938      else
15939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15940$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15942$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15943      fi
15944    fi
15945  fi
15946
15947
15948  if test "x$VS_ENV_CMD" != x; then
15949    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
15950
15951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15952
15953  # First separate the path from the arguments. This will split at the first
15954  # space.
15955  complete="$VS_ENV_CMD"
15956  path="${complete%% *}"
15957  tmp="$complete EOL"
15958  arguments="${tmp#* }"
15959
15960  # Input might be given as Windows format, start by converting to
15961  # unix format.
15962  new_path=`$CYGPATH -u "$path"`
15963
15964  # Now try to locate executable using which
15965  new_path=`$WHICH "$new_path" 2> /dev/null`
15966  if test "x$new_path" = x; then
15967    # Oops. Which didn't find the executable.
15968    # The splitting of arguments from the executable at a space might have been incorrect,
15969    # since paths with space are more likely in Windows. Give it another try with the whole
15970    # argument.
15971    path="$complete"
15972    arguments="EOL"
15973    new_path=`$CYGPATH -u "$path"`
15974    new_path=`$WHICH "$new_path" 2> /dev/null`
15975    if test "x$new_path" = x; then
15976      # It's still not found. Now this is an unrecoverable error.
15977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
15978$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
15979      has_space=`$ECHO "$complete" | $GREP " "`
15980      if test "x$has_space" != x; then
15981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15983      fi
15984      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
15985    fi
15986  fi
15987
15988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15991  # "foo.exe" is OK but "foo" is an error.
15992  #
15993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15994  # It is also a way to make sure we got the proper file name for the real test later on.
15995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15996  if test "x$test_shortpath" = x; then
15997    # Short path failed, file does not exist as specified.
15998    # Try adding .exe or .cmd
15999    if test -f "${new_path}.exe"; then
16000       input_to_shortpath="${new_path}.exe"
16001    elif test -f "${new_path}.cmd"; then
16002       input_to_shortpath="${new_path}.cmd"
16003    else
16004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16005$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16008      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16009    fi
16010  else
16011    input_to_shortpath="$new_path"
16012  fi
16013
16014  # Call helper function which possibly converts this using DOS-style short mode.
16015  # If so, the updated path is stored in $new_path.
16016  new_path="$input_to_shortpath"
16017
16018  input_path="$input_to_shortpath"
16019  # Check if we need to convert this using DOS-style short mode. If the path
16020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16021  # take no chances and rewrite it.
16022  # Note: m4 eats our [], so we need to use [ and ] instead.
16023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16024  if test "x$has_forbidden_chars" != x; then
16025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16029      # Going to short mode and back again did indeed matter. Since short mode is
16030      # case insensitive, let's make it lowercase to improve readability.
16031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16032      # Now convert it back to Unix-stile (cygpath)
16033      input_path=`$CYGPATH -u "$shortmode_path"`
16034      new_path="$input_path"
16035    fi
16036  fi
16037
16038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16039  if test "x$test_cygdrive_prefix" = x; then
16040    # As a simple fix, exclude /usr/bin since it's not a real path.
16041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16043      # a path prefixed by /cygdrive for fixpath to work.
16044      new_path="$CYGWIN_ROOT_PATH$input_path"
16045    fi
16046  fi
16047
16048  # remove trailing .exe if any
16049  new_path="${new_path/%.exe/}"
16050
16051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16052
16053  # First separate the path from the arguments. This will split at the first
16054  # space.
16055  complete="$VS_ENV_CMD"
16056  path="${complete%% *}"
16057  tmp="$complete EOL"
16058  arguments="${tmp#* }"
16059
16060  # Input might be given as Windows format, start by converting to
16061  # unix format.
16062  new_path="$path"
16063
16064  windows_path="$new_path"
16065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16066    unix_path=`$CYGPATH -u "$windows_path"`
16067    new_path="$unix_path"
16068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16070    new_path="$unix_path"
16071  fi
16072
16073
16074  # Now try to locate executable using which
16075  new_path=`$WHICH "$new_path" 2> /dev/null`
16076
16077  if test "x$new_path" = x; then
16078    # Oops. Which didn't find the executable.
16079    # The splitting of arguments from the executable at a space might have been incorrect,
16080    # since paths with space are more likely in Windows. Give it another try with the whole
16081    # argument.
16082    path="$complete"
16083    arguments="EOL"
16084    new_path="$path"
16085
16086  windows_path="$new_path"
16087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16088    unix_path=`$CYGPATH -u "$windows_path"`
16089    new_path="$unix_path"
16090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16092    new_path="$unix_path"
16093  fi
16094
16095
16096    new_path=`$WHICH "$new_path" 2> /dev/null`
16097
16098    if test "x$new_path" = x; then
16099      # It's still not found. Now this is an unrecoverable error.
16100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16101$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16102      has_space=`$ECHO "$complete" | $GREP " "`
16103      if test "x$has_space" != x; then
16104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16106      fi
16107      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16108    fi
16109  fi
16110
16111  # Now new_path has a complete unix path to the binary
16112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16113    # Keep paths in /bin as-is, but remove trailing .exe if any
16114    new_path="${new_path/%.exe/}"
16115    # Do not save /bin paths to all_fixpath_prefixes!
16116  else
16117    # Not in mixed or Windows style, start by that.
16118    new_path=`cmd //c echo $new_path`
16119
16120  input_path="$new_path"
16121  # Check if we need to convert this using DOS-style short mode. If the path
16122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16123  # take no chances and rewrite it.
16124  # Note: m4 eats our [], so we need to use [ and ] instead.
16125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16126  if test "x$has_forbidden_chars" != x; then
16127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16129  fi
16130
16131    # Output is in $new_path
16132
16133  windows_path="$new_path"
16134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16135    unix_path=`$CYGPATH -u "$windows_path"`
16136    new_path="$unix_path"
16137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16139    new_path="$unix_path"
16140  fi
16141
16142    # remove trailing .exe if any
16143    new_path="${new_path/%.exe/}"
16144
16145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16147  fi
16148
16149  else
16150    # We're on a posix platform. Hooray! :)
16151    # First separate the path from the arguments. This will split at the first
16152    # space.
16153    complete="$VS_ENV_CMD"
16154    path="${complete%% *}"
16155    tmp="$complete EOL"
16156    arguments="${tmp#* }"
16157
16158    new_path=`$WHICH $path 2> /dev/null`
16159    if test "x$new_path" = x; then
16160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16161      if test "x$is_absolute_path" != x; then
16162        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16163$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16164        new_path="$path"
16165      else
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16167$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16168        has_space=`$ECHO "$complete" | $GREP " "`
16169        if test "x$has_space" != x; then
16170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16172        fi
16173        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16174      fi
16175    fi
16176  fi
16177
16178  # Now join together the path and the arguments once again
16179  if test "x$arguments" != xEOL; then
16180      new_complete="$new_path ${arguments% *}"
16181  else
16182      new_complete="$new_path"
16183  fi
16184
16185  if test "x$complete" != "x$new_complete"; then
16186    VS_ENV_CMD="$new_complete"
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16188$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16189  fi
16190
16191
16192    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16194$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16195    cd $OUTPUT_ROOT
16196    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16197    # to autoconf standards.
16198
16199    #----
16200
16201    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16202    # but calculate the difference in Cygwin environment before/after running it and then
16203    # apply the diff.
16204
16205    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16206      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16207      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16208      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16209    else
16210      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16211      _dosbash=`cmd //c echo \`which bash\``
16212    fi
16213
16214    # generate the set of exported vars before/after the vs10 setup
16215    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16216    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16217    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16218    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16219
16220    # Now execute the newly created bat file.
16221    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16222    cmd /c localdevenvtmp.bat | cat
16223
16224    # apply the diff (less some non-vs10 vars named by "!")
16225    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16226    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16227    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16228
16229    # cleanup
16230    $RM localdevenvtmp*
16231    #----
16232    cd $CURDIR
16233    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16235$as_echo "no" >&6; }
16236      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16237$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16238      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16239$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16240      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16241$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16242      as_fn_error $? "Cannot continue" "$LINENO" 5
16243    fi
16244
16245    # Now set all paths and other env variables. This will allow the rest of
16246    # the configure script to find and run the compiler in the proper way.
16247    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16248$as_echo "$as_me: Setting extracted environment variables" >&6;}
16249    . $OUTPUT_ROOT/localdevenv.sh
16250  else
16251    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16252    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16253$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16254  fi
16255
16256  # At this point, we should have corrent variables in the environment, or we can't continue.
16257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16258$as_echo_n "checking for Visual Studio variables... " >&6; }
16259
16260  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16261    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16263$as_echo "present but broken" >&6; }
16264      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16265    else
16266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16267$as_echo "ok" >&6; }
16268      VS_INCLUDE="$INCLUDE"
16269      VS_LIB="$LIB"
16270      VS_PATH="$PATH"
16271
16272
16273
16274    fi
16275  else
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16277$as_echo "not found" >&6; }
16278
16279    if test "x$VS_ENV_CMD" = x; then
16280      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16281$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16282      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16283$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16284    else
16285      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16286$as_echo "$as_me: Running the extraction script failed." >&6;}
16287    fi
16288    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16289$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16290    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16291$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16292    as_fn_error $? "Cannot continue" "$LINENO" 5
16293  fi
16294
16295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16296$as_echo_n "checking for msvcr100.dll... " >&6; }
16297
16298# Check whether --with-msvcr-dll was given.
16299if test "${with_msvcr_dll+set}" = set; then :
16300  withval=$with_msvcr_dll;
16301fi
16302
16303  if test "x$with_msvcr_dll" != x; then
16304    MSVCR_DLL="$with_msvcr_dll"
16305  else
16306    if test "x$VCINSTALLDIR" != x; then
16307      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16308        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16309      else
16310        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16311        if test "x$MSVCR_DLL" = x; then
16312          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16313        fi
16314      fi
16315      if test "x$MSVCR_DLL" != x; then
16316        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16317$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16318      else
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16320$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16321      fi
16322    fi
16323    if test "x$MSVCR_DLL" = x; then
16324      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16325        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16326$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16327        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16328      fi
16329    fi
16330  fi
16331  if test "x$MSVCR_DLL" = x; then
16332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16333$as_echo "no" >&6; }
16334    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16335  fi
16336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16337$as_echo "$MSVCR_DLL" >&6; }
16338
16339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340
16341  # Input might be given as Windows format, start by converting to
16342  # unix format.
16343  path="$MSVCR_DLL"
16344  new_path=`$CYGPATH -u "$path"`
16345
16346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16349  # "foo.exe" is OK but "foo" is an error.
16350  #
16351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16352  # It is also a way to make sure we got the proper file name for the real test later on.
16353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16354  if test "x$test_shortpath" = x; then
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16356$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16357    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16358  fi
16359
16360  # Call helper function which possibly converts this using DOS-style short mode.
16361  # If so, the updated path is stored in $new_path.
16362
16363  input_path="$new_path"
16364  # Check if we need to convert this using DOS-style short mode. If the path
16365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16366  # take no chances and rewrite it.
16367  # Note: m4 eats our [], so we need to use [ and ] instead.
16368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16369  if test "x$has_forbidden_chars" != x; then
16370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16374      # Going to short mode and back again did indeed matter. Since short mode is
16375      # case insensitive, let's make it lowercase to improve readability.
16376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16377      # Now convert it back to Unix-stile (cygpath)
16378      input_path=`$CYGPATH -u "$shortmode_path"`
16379      new_path="$input_path"
16380    fi
16381  fi
16382
16383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16384  if test "x$test_cygdrive_prefix" = x; then
16385    # As a simple fix, exclude /usr/bin since it's not a real path.
16386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16388      # a path prefixed by /cygdrive for fixpath to work.
16389      new_path="$CYGWIN_ROOT_PATH$input_path"
16390    fi
16391  fi
16392
16393
16394  if test "x$path" != "x$new_path"; then
16395    MSVCR_DLL="$new_path"
16396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16397$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16398  fi
16399
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401
16402  path="$MSVCR_DLL"
16403  has_colon=`$ECHO $path | $GREP ^.:`
16404  new_path="$path"
16405  if test "x$has_colon" = x; then
16406    # Not in mixed or Windows style, start by that.
16407    new_path=`cmd //c echo $path`
16408  fi
16409
16410
16411  input_path="$new_path"
16412  # Check if we need to convert this using DOS-style short mode. If the path
16413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16414  # take no chances and rewrite it.
16415  # Note: m4 eats our [], so we need to use [ and ] instead.
16416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16417  if test "x$has_forbidden_chars" != x; then
16418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16420  fi
16421
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432  if test "x$path" != "x$new_path"; then
16433    MSVCR_DLL="$new_path"
16434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16435$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16436  fi
16437
16438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16440
16441  else
16442    # We're on a posix platform. Hooray! :)
16443    path="$MSVCR_DLL"
16444
16445    if test ! -f "$path" && test ! -d "$path"; then
16446      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16447    fi
16448
16449    has_space=`$ECHO "$path" | $GREP " "`
16450    if test "x$has_space" != x; then
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16452$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16453      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16454    fi
16455  fi
16456
16457
16458fi
16459
16460
16461
16462# If --build AND --host is set, then the configure script will find any
16463# cross compilation tools in the PATH. Cross compilation tools
16464# follows the cross compilation standard where they are prefixed with ${host}.
16465# For example the binary i686-sun-solaris2.10-gcc
16466# will cross compile for i686-sun-solaris2.10
16467# If neither of build and host is not set, then build=host and the
16468# default compiler found in the path will be used.
16469# Setting only --host, does not seem to be really supported.
16470# Please set both --build and --host if you want to cross compile.
16471
16472if test "x$COMPILE_TYPE" = "xcross"; then
16473    # Now we to find a C/C++ compiler that can build executables for the build
16474    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16475    # once. Also, we need to do this before adding a tools dir to the path,
16476    # otherwise we might pick up cross-compilers which don't use standard naming.
16477    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16478    # to wait until they are properly discovered.
16479    for ac_prog in cl cc gcc
16480do
16481  # Extract the first word of "$ac_prog", so it can be a program name with args.
16482set dummy $ac_prog; ac_word=$2
16483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16484$as_echo_n "checking for $ac_word... " >&6; }
16485if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16486  $as_echo_n "(cached) " >&6
16487else
16488  case $BUILD_CC in
16489  [\\/]* | ?:[\\/]*)
16490  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16491  ;;
16492  *)
16493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16494for as_dir in $PATH
16495do
16496  IFS=$as_save_IFS
16497  test -z "$as_dir" && as_dir=.
16498    for ac_exec_ext in '' $ac_executable_extensions; do
16499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16500    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16502    break 2
16503  fi
16504done
16505  done
16506IFS=$as_save_IFS
16507
16508  ;;
16509esac
16510fi
16511BUILD_CC=$ac_cv_path_BUILD_CC
16512if test -n "$BUILD_CC"; then
16513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16514$as_echo "$BUILD_CC" >&6; }
16515else
16516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517$as_echo "no" >&6; }
16518fi
16519
16520
16521  test -n "$BUILD_CC" && break
16522done
16523
16524
16525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16526
16527  # First separate the path from the arguments. This will split at the first
16528  # space.
16529  complete="$BUILD_CC"
16530  path="${complete%% *}"
16531  tmp="$complete EOL"
16532  arguments="${tmp#* }"
16533
16534  # Input might be given as Windows format, start by converting to
16535  # unix format.
16536  new_path=`$CYGPATH -u "$path"`
16537
16538  # Now try to locate executable using which
16539  new_path=`$WHICH "$new_path" 2> /dev/null`
16540  if test "x$new_path" = x; then
16541    # Oops. Which didn't find the executable.
16542    # The splitting of arguments from the executable at a space might have been incorrect,
16543    # since paths with space are more likely in Windows. Give it another try with the whole
16544    # argument.
16545    path="$complete"
16546    arguments="EOL"
16547    new_path=`$CYGPATH -u "$path"`
16548    new_path=`$WHICH "$new_path" 2> /dev/null`
16549    if test "x$new_path" = x; then
16550      # It's still not found. Now this is an unrecoverable error.
16551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16552$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16553      has_space=`$ECHO "$complete" | $GREP " "`
16554      if test "x$has_space" != x; then
16555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16557      fi
16558      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16559    fi
16560  fi
16561
16562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16565  # "foo.exe" is OK but "foo" is an error.
16566  #
16567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16568  # It is also a way to make sure we got the proper file name for the real test later on.
16569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16570  if test "x$test_shortpath" = x; then
16571    # Short path failed, file does not exist as specified.
16572    # Try adding .exe or .cmd
16573    if test -f "${new_path}.exe"; then
16574       input_to_shortpath="${new_path}.exe"
16575    elif test -f "${new_path}.cmd"; then
16576       input_to_shortpath="${new_path}.cmd"
16577    else
16578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16579$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16580      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16582      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16583    fi
16584  else
16585    input_to_shortpath="$new_path"
16586  fi
16587
16588  # Call helper function which possibly converts this using DOS-style short mode.
16589  # If so, the updated path is stored in $new_path.
16590  new_path="$input_to_shortpath"
16591
16592  input_path="$input_to_shortpath"
16593  # Check if we need to convert this using DOS-style short mode. If the path
16594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16595  # take no chances and rewrite it.
16596  # Note: m4 eats our [], so we need to use [ and ] instead.
16597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16598  if test "x$has_forbidden_chars" != x; then
16599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16603      # Going to short mode and back again did indeed matter. Since short mode is
16604      # case insensitive, let's make it lowercase to improve readability.
16605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16606      # Now convert it back to Unix-stile (cygpath)
16607      input_path=`$CYGPATH -u "$shortmode_path"`
16608      new_path="$input_path"
16609    fi
16610  fi
16611
16612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16613  if test "x$test_cygdrive_prefix" = x; then
16614    # As a simple fix, exclude /usr/bin since it's not a real path.
16615    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16617      # a path prefixed by /cygdrive for fixpath to work.
16618      new_path="$CYGWIN_ROOT_PATH$input_path"
16619    fi
16620  fi
16621
16622  # remove trailing .exe if any
16623  new_path="${new_path/%.exe/}"
16624
16625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16626
16627  # First separate the path from the arguments. This will split at the first
16628  # space.
16629  complete="$BUILD_CC"
16630  path="${complete%% *}"
16631  tmp="$complete EOL"
16632  arguments="${tmp#* }"
16633
16634  # Input might be given as Windows format, start by converting to
16635  # unix format.
16636  new_path="$path"
16637
16638  windows_path="$new_path"
16639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16640    unix_path=`$CYGPATH -u "$windows_path"`
16641    new_path="$unix_path"
16642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16644    new_path="$unix_path"
16645  fi
16646
16647
16648  # Now try to locate executable using which
16649  new_path=`$WHICH "$new_path" 2> /dev/null`
16650
16651  if test "x$new_path" = x; then
16652    # Oops. Which didn't find the executable.
16653    # The splitting of arguments from the executable at a space might have been incorrect,
16654    # since paths with space are more likely in Windows. Give it another try with the whole
16655    # argument.
16656    path="$complete"
16657    arguments="EOL"
16658    new_path="$path"
16659
16660  windows_path="$new_path"
16661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16662    unix_path=`$CYGPATH -u "$windows_path"`
16663    new_path="$unix_path"
16664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16666    new_path="$unix_path"
16667  fi
16668
16669
16670    new_path=`$WHICH "$new_path" 2> /dev/null`
16671
16672    if test "x$new_path" = x; then
16673      # It's still not found. Now this is an unrecoverable error.
16674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16675$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16676      has_space=`$ECHO "$complete" | $GREP " "`
16677      if test "x$has_space" != x; then
16678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16680      fi
16681      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16682    fi
16683  fi
16684
16685  # Now new_path has a complete unix path to the binary
16686  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16687    # Keep paths in /bin as-is, but remove trailing .exe if any
16688    new_path="${new_path/%.exe/}"
16689    # Do not save /bin paths to all_fixpath_prefixes!
16690  else
16691    # Not in mixed or Windows style, start by that.
16692    new_path=`cmd //c echo $new_path`
16693
16694  input_path="$new_path"
16695  # Check if we need to convert this using DOS-style short mode. If the path
16696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16697  # take no chances and rewrite it.
16698  # Note: m4 eats our [], so we need to use [ and ] instead.
16699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16700  if test "x$has_forbidden_chars" != x; then
16701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16703  fi
16704
16705    # Output is in $new_path
16706
16707  windows_path="$new_path"
16708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16709    unix_path=`$CYGPATH -u "$windows_path"`
16710    new_path="$unix_path"
16711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16713    new_path="$unix_path"
16714  fi
16715
16716    # remove trailing .exe if any
16717    new_path="${new_path/%.exe/}"
16718
16719    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16720    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16721  fi
16722
16723  else
16724    # We're on a posix platform. Hooray! :)
16725    # First separate the path from the arguments. This will split at the first
16726    # space.
16727    complete="$BUILD_CC"
16728    path="${complete%% *}"
16729    tmp="$complete EOL"
16730    arguments="${tmp#* }"
16731
16732    new_path=`$WHICH $path 2> /dev/null`
16733    if test "x$new_path" = x; then
16734      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16735      if test "x$is_absolute_path" != x; then
16736        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16737$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16738        new_path="$path"
16739      else
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16741$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16742        has_space=`$ECHO "$complete" | $GREP " "`
16743        if test "x$has_space" != x; then
16744          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16745$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16746        fi
16747        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16748      fi
16749    fi
16750  fi
16751
16752  # Now join together the path and the arguments once again
16753  if test "x$arguments" != xEOL; then
16754      new_complete="$new_path ${arguments% *}"
16755  else
16756      new_complete="$new_path"
16757  fi
16758
16759  if test "x$complete" != "x$new_complete"; then
16760    BUILD_CC="$new_complete"
16761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16762$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16763  fi
16764
16765    for ac_prog in cl CC g++
16766do
16767  # Extract the first word of "$ac_prog", so it can be a program name with args.
16768set dummy $ac_prog; ac_word=$2
16769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16770$as_echo_n "checking for $ac_word... " >&6; }
16771if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16772  $as_echo_n "(cached) " >&6
16773else
16774  case $BUILD_CXX in
16775  [\\/]* | ?:[\\/]*)
16776  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16777  ;;
16778  *)
16779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16780for as_dir in $PATH
16781do
16782  IFS=$as_save_IFS
16783  test -z "$as_dir" && as_dir=.
16784    for ac_exec_ext in '' $ac_executable_extensions; do
16785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16786    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16788    break 2
16789  fi
16790done
16791  done
16792IFS=$as_save_IFS
16793
16794  ;;
16795esac
16796fi
16797BUILD_CXX=$ac_cv_path_BUILD_CXX
16798if test -n "$BUILD_CXX"; then
16799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16800$as_echo "$BUILD_CXX" >&6; }
16801else
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16803$as_echo "no" >&6; }
16804fi
16805
16806
16807  test -n "$BUILD_CXX" && break
16808done
16809
16810
16811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16812
16813  # First separate the path from the arguments. This will split at the first
16814  # space.
16815  complete="$BUILD_CXX"
16816  path="${complete%% *}"
16817  tmp="$complete EOL"
16818  arguments="${tmp#* }"
16819
16820  # Input might be given as Windows format, start by converting to
16821  # unix format.
16822  new_path=`$CYGPATH -u "$path"`
16823
16824  # Now try to locate executable using which
16825  new_path=`$WHICH "$new_path" 2> /dev/null`
16826  if test "x$new_path" = x; then
16827    # Oops. Which didn't find the executable.
16828    # The splitting of arguments from the executable at a space might have been incorrect,
16829    # since paths with space are more likely in Windows. Give it another try with the whole
16830    # argument.
16831    path="$complete"
16832    arguments="EOL"
16833    new_path=`$CYGPATH -u "$path"`
16834    new_path=`$WHICH "$new_path" 2> /dev/null`
16835    if test "x$new_path" = x; then
16836      # It's still not found. Now this is an unrecoverable error.
16837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16838$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16839      has_space=`$ECHO "$complete" | $GREP " "`
16840      if test "x$has_space" != x; then
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16843      fi
16844      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16845    fi
16846  fi
16847
16848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16851  # "foo.exe" is OK but "foo" is an error.
16852  #
16853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16854  # It is also a way to make sure we got the proper file name for the real test later on.
16855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16856  if test "x$test_shortpath" = x; then
16857    # Short path failed, file does not exist as specified.
16858    # Try adding .exe or .cmd
16859    if test -f "${new_path}.exe"; then
16860       input_to_shortpath="${new_path}.exe"
16861    elif test -f "${new_path}.cmd"; then
16862       input_to_shortpath="${new_path}.cmd"
16863    else
16864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16865$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16868      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16869    fi
16870  else
16871    input_to_shortpath="$new_path"
16872  fi
16873
16874  # Call helper function which possibly converts this using DOS-style short mode.
16875  # If so, the updated path is stored in $new_path.
16876  new_path="$input_to_shortpath"
16877
16878  input_path="$input_to_shortpath"
16879  # Check if we need to convert this using DOS-style short mode. If the path
16880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16881  # take no chances and rewrite it.
16882  # Note: m4 eats our [], so we need to use [ and ] instead.
16883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16884  if test "x$has_forbidden_chars" != x; then
16885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16889      # Going to short mode and back again did indeed matter. Since short mode is
16890      # case insensitive, let's make it lowercase to improve readability.
16891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16892      # Now convert it back to Unix-stile (cygpath)
16893      input_path=`$CYGPATH -u "$shortmode_path"`
16894      new_path="$input_path"
16895    fi
16896  fi
16897
16898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16899  if test "x$test_cygdrive_prefix" = x; then
16900    # As a simple fix, exclude /usr/bin since it's not a real path.
16901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16903      # a path prefixed by /cygdrive for fixpath to work.
16904      new_path="$CYGWIN_ROOT_PATH$input_path"
16905    fi
16906  fi
16907
16908  # remove trailing .exe if any
16909  new_path="${new_path/%.exe/}"
16910
16911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16912
16913  # First separate the path from the arguments. This will split at the first
16914  # space.
16915  complete="$BUILD_CXX"
16916  path="${complete%% *}"
16917  tmp="$complete EOL"
16918  arguments="${tmp#* }"
16919
16920  # Input might be given as Windows format, start by converting to
16921  # unix format.
16922  new_path="$path"
16923
16924  windows_path="$new_path"
16925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16926    unix_path=`$CYGPATH -u "$windows_path"`
16927    new_path="$unix_path"
16928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16930    new_path="$unix_path"
16931  fi
16932
16933
16934  # Now try to locate executable using which
16935  new_path=`$WHICH "$new_path" 2> /dev/null`
16936
16937  if test "x$new_path" = x; then
16938    # Oops. Which didn't find the executable.
16939    # The splitting of arguments from the executable at a space might have been incorrect,
16940    # since paths with space are more likely in Windows. Give it another try with the whole
16941    # argument.
16942    path="$complete"
16943    arguments="EOL"
16944    new_path="$path"
16945
16946  windows_path="$new_path"
16947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16948    unix_path=`$CYGPATH -u "$windows_path"`
16949    new_path="$unix_path"
16950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16952    new_path="$unix_path"
16953  fi
16954
16955
16956    new_path=`$WHICH "$new_path" 2> /dev/null`
16957
16958    if test "x$new_path" = x; then
16959      # It's still not found. Now this is an unrecoverable error.
16960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16961$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16962      has_space=`$ECHO "$complete" | $GREP " "`
16963      if test "x$has_space" != x; then
16964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16966      fi
16967      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
16968    fi
16969  fi
16970
16971  # Now new_path has a complete unix path to the binary
16972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16973    # Keep paths in /bin as-is, but remove trailing .exe if any
16974    new_path="${new_path/%.exe/}"
16975    # Do not save /bin paths to all_fixpath_prefixes!
16976  else
16977    # Not in mixed or Windows style, start by that.
16978    new_path=`cmd //c echo $new_path`
16979
16980  input_path="$new_path"
16981  # Check if we need to convert this using DOS-style short mode. If the path
16982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16983  # take no chances and rewrite it.
16984  # Note: m4 eats our [], so we need to use [ and ] instead.
16985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16986  if test "x$has_forbidden_chars" != x; then
16987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16989  fi
16990
16991    # Output is in $new_path
16992
16993  windows_path="$new_path"
16994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16995    unix_path=`$CYGPATH -u "$windows_path"`
16996    new_path="$unix_path"
16997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16999    new_path="$unix_path"
17000  fi
17001
17002    # remove trailing .exe if any
17003    new_path="${new_path/%.exe/}"
17004
17005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17007  fi
17008
17009  else
17010    # We're on a posix platform. Hooray! :)
17011    # First separate the path from the arguments. This will split at the first
17012    # space.
17013    complete="$BUILD_CXX"
17014    path="${complete%% *}"
17015    tmp="$complete EOL"
17016    arguments="${tmp#* }"
17017
17018    new_path=`$WHICH $path 2> /dev/null`
17019    if test "x$new_path" = x; then
17020      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17021      if test "x$is_absolute_path" != x; then
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17023$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17024        new_path="$path"
17025      else
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17027$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17028        has_space=`$ECHO "$complete" | $GREP " "`
17029        if test "x$has_space" != x; then
17030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17032        fi
17033        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17034      fi
17035    fi
17036  fi
17037
17038  # Now join together the path and the arguments once again
17039  if test "x$arguments" != xEOL; then
17040      new_complete="$new_path ${arguments% *}"
17041  else
17042      new_complete="$new_path"
17043  fi
17044
17045  if test "x$complete" != "x$new_complete"; then
17046    BUILD_CXX="$new_complete"
17047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17048$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17049  fi
17050
17051    # Extract the first word of "ld", so it can be a program name with args.
17052set dummy ld; ac_word=$2
17053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17054$as_echo_n "checking for $ac_word... " >&6; }
17055if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17056  $as_echo_n "(cached) " >&6
17057else
17058  case $BUILD_LD in
17059  [\\/]* | ?:[\\/]*)
17060  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17061  ;;
17062  *)
17063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17064for as_dir in $PATH
17065do
17066  IFS=$as_save_IFS
17067  test -z "$as_dir" && as_dir=.
17068    for ac_exec_ext in '' $ac_executable_extensions; do
17069  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17070    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17072    break 2
17073  fi
17074done
17075  done
17076IFS=$as_save_IFS
17077
17078  ;;
17079esac
17080fi
17081BUILD_LD=$ac_cv_path_BUILD_LD
17082if test -n "$BUILD_LD"; then
17083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17084$as_echo "$BUILD_LD" >&6; }
17085else
17086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17087$as_echo "no" >&6; }
17088fi
17089
17090
17091
17092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17093
17094  # First separate the path from the arguments. This will split at the first
17095  # space.
17096  complete="$BUILD_LD"
17097  path="${complete%% *}"
17098  tmp="$complete EOL"
17099  arguments="${tmp#* }"
17100
17101  # Input might be given as Windows format, start by converting to
17102  # unix format.
17103  new_path=`$CYGPATH -u "$path"`
17104
17105  # Now try to locate executable using which
17106  new_path=`$WHICH "$new_path" 2> /dev/null`
17107  if test "x$new_path" = x; then
17108    # Oops. Which didn't find the executable.
17109    # The splitting of arguments from the executable at a space might have been incorrect,
17110    # since paths with space are more likely in Windows. Give it another try with the whole
17111    # argument.
17112    path="$complete"
17113    arguments="EOL"
17114    new_path=`$CYGPATH -u "$path"`
17115    new_path=`$WHICH "$new_path" 2> /dev/null`
17116    if test "x$new_path" = x; then
17117      # It's still not found. Now this is an unrecoverable error.
17118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17119$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17120      has_space=`$ECHO "$complete" | $GREP " "`
17121      if test "x$has_space" != x; then
17122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17124      fi
17125      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17126    fi
17127  fi
17128
17129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17132  # "foo.exe" is OK but "foo" is an error.
17133  #
17134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17135  # It is also a way to make sure we got the proper file name for the real test later on.
17136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17137  if test "x$test_shortpath" = x; then
17138    # Short path failed, file does not exist as specified.
17139    # Try adding .exe or .cmd
17140    if test -f "${new_path}.exe"; then
17141       input_to_shortpath="${new_path}.exe"
17142    elif test -f "${new_path}.cmd"; then
17143       input_to_shortpath="${new_path}.cmd"
17144    else
17145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17146$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17149      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17150    fi
17151  else
17152    input_to_shortpath="$new_path"
17153  fi
17154
17155  # Call helper function which possibly converts this using DOS-style short mode.
17156  # If so, the updated path is stored in $new_path.
17157  new_path="$input_to_shortpath"
17158
17159  input_path="$input_to_shortpath"
17160  # Check if we need to convert this using DOS-style short mode. If the path
17161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17162  # take no chances and rewrite it.
17163  # Note: m4 eats our [], so we need to use [ and ] instead.
17164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17165  if test "x$has_forbidden_chars" != x; then
17166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17170      # Going to short mode and back again did indeed matter. Since short mode is
17171      # case insensitive, let's make it lowercase to improve readability.
17172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17173      # Now convert it back to Unix-stile (cygpath)
17174      input_path=`$CYGPATH -u "$shortmode_path"`
17175      new_path="$input_path"
17176    fi
17177  fi
17178
17179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17180  if test "x$test_cygdrive_prefix" = x; then
17181    # As a simple fix, exclude /usr/bin since it's not a real path.
17182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17184      # a path prefixed by /cygdrive for fixpath to work.
17185      new_path="$CYGWIN_ROOT_PATH$input_path"
17186    fi
17187  fi
17188
17189  # remove trailing .exe if any
17190  new_path="${new_path/%.exe/}"
17191
17192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17193
17194  # First separate the path from the arguments. This will split at the first
17195  # space.
17196  complete="$BUILD_LD"
17197  path="${complete%% *}"
17198  tmp="$complete EOL"
17199  arguments="${tmp#* }"
17200
17201  # Input might be given as Windows format, start by converting to
17202  # unix format.
17203  new_path="$path"
17204
17205  windows_path="$new_path"
17206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17207    unix_path=`$CYGPATH -u "$windows_path"`
17208    new_path="$unix_path"
17209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17211    new_path="$unix_path"
17212  fi
17213
17214
17215  # Now try to locate executable using which
17216  new_path=`$WHICH "$new_path" 2> /dev/null`
17217
17218  if test "x$new_path" = x; then
17219    # Oops. Which didn't find the executable.
17220    # The splitting of arguments from the executable at a space might have been incorrect,
17221    # since paths with space are more likely in Windows. Give it another try with the whole
17222    # argument.
17223    path="$complete"
17224    arguments="EOL"
17225    new_path="$path"
17226
17227  windows_path="$new_path"
17228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229    unix_path=`$CYGPATH -u "$windows_path"`
17230    new_path="$unix_path"
17231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17233    new_path="$unix_path"
17234  fi
17235
17236
17237    new_path=`$WHICH "$new_path" 2> /dev/null`
17238
17239    if test "x$new_path" = x; then
17240      # It's still not found. Now this is an unrecoverable error.
17241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17242$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17243      has_space=`$ECHO "$complete" | $GREP " "`
17244      if test "x$has_space" != x; then
17245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17247      fi
17248      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17249    fi
17250  fi
17251
17252  # Now new_path has a complete unix path to the binary
17253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17254    # Keep paths in /bin as-is, but remove trailing .exe if any
17255    new_path="${new_path/%.exe/}"
17256    # Do not save /bin paths to all_fixpath_prefixes!
17257  else
17258    # Not in mixed or Windows style, start by that.
17259    new_path=`cmd //c echo $new_path`
17260
17261  input_path="$new_path"
17262  # Check if we need to convert this using DOS-style short mode. If the path
17263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17264  # take no chances and rewrite it.
17265  # Note: m4 eats our [], so we need to use [ and ] instead.
17266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17267  if test "x$has_forbidden_chars" != x; then
17268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17270  fi
17271
17272    # Output is in $new_path
17273
17274  windows_path="$new_path"
17275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17276    unix_path=`$CYGPATH -u "$windows_path"`
17277    new_path="$unix_path"
17278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17280    new_path="$unix_path"
17281  fi
17282
17283    # remove trailing .exe if any
17284    new_path="${new_path/%.exe/}"
17285
17286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17288  fi
17289
17290  else
17291    # We're on a posix platform. Hooray! :)
17292    # First separate the path from the arguments. This will split at the first
17293    # space.
17294    complete="$BUILD_LD"
17295    path="${complete%% *}"
17296    tmp="$complete EOL"
17297    arguments="${tmp#* }"
17298
17299    new_path=`$WHICH $path 2> /dev/null`
17300    if test "x$new_path" = x; then
17301      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17302      if test "x$is_absolute_path" != x; then
17303        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17304$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17305        new_path="$path"
17306      else
17307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17308$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17309        has_space=`$ECHO "$complete" | $GREP " "`
17310        if test "x$has_space" != x; then
17311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17313        fi
17314        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17315      fi
17316    fi
17317  fi
17318
17319  # Now join together the path and the arguments once again
17320  if test "x$arguments" != xEOL; then
17321      new_complete="$new_path ${arguments% *}"
17322  else
17323      new_complete="$new_path"
17324  fi
17325
17326  if test "x$complete" != "x$new_complete"; then
17327    BUILD_LD="$new_complete"
17328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17329$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17330  fi
17331
17332fi
17333
17334
17335
17336
17337# If a devkit is found on the builddeps server, then prepend its path to the
17338# PATH variable. If there are cross compilers available in the devkit, these
17339# will be found by AC_PROG_CC et al.
17340DEVKIT=
17341
17342
17343    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17344        # Source the builddeps file again, to make sure it uses the latest variables!
17345        . $builddepsfile
17346        # Look for a target and build machine specific resource!
17347        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17348        if test "x$resource" = x; then
17349            # Ok, lets instead look for a target specific resource
17350            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17351        fi
17352        if test "x$resource" = x; then
17353            # Ok, lets instead look for a build specific resource
17354            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17355        fi
17356        if test "x$resource" = x; then
17357            # Ok, lets instead look for a generic resource
17358            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17359            resource=${builddep_devkit}
17360        fi
17361        if test "x$resource" != x; then
17362            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17363$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17364	    # If the resource in the builddeps.conf file is an existing directory,
17365	    # for example /java/linux/cups
17366	    if test -d ${resource}; then
17367	       depdir=${resource}
17368	    else
17369
17370# devkit is for example mymodule
17371# $resource is for example libs/general/libmymod_1_2_3.zip
17372# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17373# $with_builddeps_dir is for example /localhome/builddeps
17374# depdir is the name of the variable into which we store the depdir, eg MYMOD
17375# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17376# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17377    filename=`basename $resource`
17378    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17379    filebase=${filename%%.*}
17380    extension=${filename#*.}
17381    installdir=$with_builddeps_dir/$filebase
17382    if test ! -f $installdir/$filename.unpacked; then
17383        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17384$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17385        if test ! -d $installdir; then
17386            mkdir -p $installdir
17387        fi
17388        if test ! -d $installdir; then
17389            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17390        fi
17391        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17392        touch $tmpfile
17393        if test ! -f $tmpfile; then
17394            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17395        fi
17396
17397    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17398    # $tmpfile is the local file name for the downloaded file.
17399    VALID_TOOL=no
17400    if test "x$BDEPS_FTP" = xwget; then
17401       VALID_TOOL=yes
17402       wget -O $tmpfile $with_builddeps_server/$resource
17403    fi
17404    if test "x$BDEPS_FTP" = xlftp; then
17405       VALID_TOOL=yes
17406       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17407    fi
17408    if test "x$BDEPS_FTP" = xftp; then
17409        VALID_TOOL=yes
17410        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17411        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17412        FTPUSERPWD=${FTPSERVER%%@*}
17413        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17414            FTPUSER=${userpwd%%:*}
17415            FTPPWD=${userpwd#*@}
17416            FTPSERVER=${FTPSERVER#*@}
17417        else
17418            FTPUSER=ftp
17419            FTPPWD=ftp
17420        fi
17421        # the "pass" command does not work on some
17422        # ftp clients (read ftp.exe) but if it works,
17423        # passive mode is better!
17424        (\
17425            echo "user $FTPUSER $FTPPWD"        ;\
17426            echo "pass"                         ;\
17427            echo "bin"                          ;\
17428            echo "get $FTPPATH $tmpfile"              ;\
17429        ) | ftp -in $FTPSERVER
17430    fi
17431    if test "x$VALID_TOOL" != xyes; then
17432       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17433    fi
17434
17435        mv $tmpfile $installdir/$filename
17436        if test ! -s $installdir/$filename; then
17437            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17438        fi
17439        case "$extension" in
17440            zip)  echo "Unzipping $installdir/$filename..."
17441               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17442            ;;
17443            tar.gz) echo "Untaring $installdir/$filename..."
17444               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17445            ;;
17446            tgz) echo "Untaring $installdir/$filename..."
17447               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17448            ;;
17449            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17450            ;;
17451        esac
17452    fi
17453    if test -f $installdir/$filename.unpacked; then
17454        depdir=$installdir
17455    fi
17456
17457	    fi
17458            # Source the builddeps file again, because in the previous command, the depdir
17459            # was updated to point at the current build dependency install directory.
17460            . $builddepsfile
17461            # Now extract variables from the builddeps.conf files.
17462            theroot=${builddep_devkit_ROOT}
17463            thecflags=${builddep_devkit_CFLAGS}
17464            thelibs=${builddep_devkit_LIBS}
17465            if test "x$depdir" = x; then
17466                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17467            fi
17468            DEVKIT=$depdir
17469            if test "x$theroot" != x; then
17470               DEVKIT="$theroot"
17471            fi
17472            if test "x$thecflags" != x; then
17473               DEVKIT_CFLAGS="$thecflags"
17474            fi
17475            if test "x$thelibs" != x; then
17476               DEVKIT_LIBS="$thelibs"
17477            fi
17478            # Found devkit
17479                     PATH="$DEVKIT/bin:$PATH"
17480                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17481                     if test "x$x_includes" = "xNONE"; then
17482                         x_includes="$SYS_ROOT/usr/include/X11"
17483                     fi
17484                     if test "x$x_libraries" = "xNONE"; then
17485                         x_libraries="$SYS_ROOT/usr/lib"
17486                     fi
17487
17488
17489        fi
17490
17491    fi
17492
17493
17494if test "x$SYS_ROOT" != "x/" ; then
17495    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17496    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17497    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17498    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17499    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17500    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17501fi
17502
17503# Store the CFLAGS etal passed to the configure script.
17504ORG_CFLAGS="$CFLAGS"
17505ORG_CXXFLAGS="$CXXFLAGS"
17506ORG_OBJCFLAGS="$OBJCFLAGS"
17507
17508# autoconf magic only relies on PATH, so update it if tools dir is specified
17509OLD_PATH="$PATH"
17510if test "x$TOOLS_DIR" != x; then
17511  PATH=$TOOLS_DIR:$PATH
17512fi
17513
17514
17515### Locate C compiler (CC)
17516
17517# gcc is almost always present, but on Windows we
17518# prefer cl.exe and on Solaris we prefer CC.
17519# Thus test for them in this order.
17520if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17521  # Do not probe for cc on MacOSX.
17522  COMPILER_CHECK_LIST="cl gcc"
17523else
17524  COMPILER_CHECK_LIST="cl cc gcc"
17525fi
17526
17527
17528  COMPILER_NAME=C
17529
17530  # Do a first initial attempt at searching the list of compiler names.
17531  # AC_PATH_PROGS can't be run multiple times with the same variable,
17532  # so create a new name for this run.
17533  for ac_prog in $COMPILER_CHECK_LIST
17534do
17535  # Extract the first word of "$ac_prog", so it can be a program name with args.
17536set dummy $ac_prog; ac_word=$2
17537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17538$as_echo_n "checking for $ac_word... " >&6; }
17539if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17540  $as_echo_n "(cached) " >&6
17541else
17542  case $POTENTIAL_CC in
17543  [\\/]* | ?:[\\/]*)
17544  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17545  ;;
17546  *)
17547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17548for as_dir in $PATH
17549do
17550  IFS=$as_save_IFS
17551  test -z "$as_dir" && as_dir=.
17552    for ac_exec_ext in '' $ac_executable_extensions; do
17553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17554    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17556    break 2
17557  fi
17558done
17559  done
17560IFS=$as_save_IFS
17561
17562  ;;
17563esac
17564fi
17565POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17566if test -n "$POTENTIAL_CC"; then
17567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17568$as_echo "$POTENTIAL_CC" >&6; }
17569else
17570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17571$as_echo "no" >&6; }
17572fi
17573
17574
17575  test -n "$POTENTIAL_CC" && break
17576done
17577
17578  CC=$POTENTIAL_CC
17579
17580  if test "x$$CC" = x; then
17581
17582    # Print a helpful message on how to acquire the necessary build dependency.
17583    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17584    MISSING_DEPENDENCY=devkit
17585    PKGHANDLER_COMMAND=
17586
17587    case $PKGHANDLER in
17588	apt-get)
17589                apt_help     $MISSING_DEPENDENCY ;;
17590    yum)
17591                yum_help     $MISSING_DEPENDENCY ;;
17592	port)
17593                port_help    $MISSING_DEPENDENCY ;;
17594	pkgutil)
17595                pkgutil_help $MISSING_DEPENDENCY ;;
17596	pkgadd)
17597                pkgadd_help  $MISSING_DEPENDENCY ;;
17598    * )
17599      break ;;
17600    esac
17601
17602    if test "x$PKGHANDLER_COMMAND" != x; then
17603        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17604    fi
17605
17606      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17607  fi
17608
17609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17610
17611  # First separate the path from the arguments. This will split at the first
17612  # space.
17613  complete="$CC"
17614  path="${complete%% *}"
17615  tmp="$complete EOL"
17616  arguments="${tmp#* }"
17617
17618  # Input might be given as Windows format, start by converting to
17619  # unix format.
17620  new_path=`$CYGPATH -u "$path"`
17621
17622  # Now try to locate executable using which
17623  new_path=`$WHICH "$new_path" 2> /dev/null`
17624  if test "x$new_path" = x; then
17625    # Oops. Which didn't find the executable.
17626    # The splitting of arguments from the executable at a space might have been incorrect,
17627    # since paths with space are more likely in Windows. Give it another try with the whole
17628    # argument.
17629    path="$complete"
17630    arguments="EOL"
17631    new_path=`$CYGPATH -u "$path"`
17632    new_path=`$WHICH "$new_path" 2> /dev/null`
17633    if test "x$new_path" = x; then
17634      # It's still not found. Now this is an unrecoverable error.
17635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17636$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17637      has_space=`$ECHO "$complete" | $GREP " "`
17638      if test "x$has_space" != x; then
17639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17641      fi
17642      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17643    fi
17644  fi
17645
17646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17649  # "foo.exe" is OK but "foo" is an error.
17650  #
17651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17652  # It is also a way to make sure we got the proper file name for the real test later on.
17653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17654  if test "x$test_shortpath" = x; then
17655    # Short path failed, file does not exist as specified.
17656    # Try adding .exe or .cmd
17657    if test -f "${new_path}.exe"; then
17658       input_to_shortpath="${new_path}.exe"
17659    elif test -f "${new_path}.cmd"; then
17660       input_to_shortpath="${new_path}.cmd"
17661    else
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17663$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17665$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17666      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17667    fi
17668  else
17669    input_to_shortpath="$new_path"
17670  fi
17671
17672  # Call helper function which possibly converts this using DOS-style short mode.
17673  # If so, the updated path is stored in $new_path.
17674  new_path="$input_to_shortpath"
17675
17676  input_path="$input_to_shortpath"
17677  # Check if we need to convert this using DOS-style short mode. If the path
17678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17679  # take no chances and rewrite it.
17680  # Note: m4 eats our [], so we need to use [ and ] instead.
17681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17682  if test "x$has_forbidden_chars" != x; then
17683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17687      # Going to short mode and back again did indeed matter. Since short mode is
17688      # case insensitive, let's make it lowercase to improve readability.
17689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17690      # Now convert it back to Unix-stile (cygpath)
17691      input_path=`$CYGPATH -u "$shortmode_path"`
17692      new_path="$input_path"
17693    fi
17694  fi
17695
17696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17697  if test "x$test_cygdrive_prefix" = x; then
17698    # As a simple fix, exclude /usr/bin since it's not a real path.
17699    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17701      # a path prefixed by /cygdrive for fixpath to work.
17702      new_path="$CYGWIN_ROOT_PATH$input_path"
17703    fi
17704  fi
17705
17706  # remove trailing .exe if any
17707  new_path="${new_path/%.exe/}"
17708
17709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17710
17711  # First separate the path from the arguments. This will split at the first
17712  # space.
17713  complete="$CC"
17714  path="${complete%% *}"
17715  tmp="$complete EOL"
17716  arguments="${tmp#* }"
17717
17718  # Input might be given as Windows format, start by converting to
17719  # unix format.
17720  new_path="$path"
17721
17722  windows_path="$new_path"
17723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17724    unix_path=`$CYGPATH -u "$windows_path"`
17725    new_path="$unix_path"
17726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17728    new_path="$unix_path"
17729  fi
17730
17731
17732  # Now try to locate executable using which
17733  new_path=`$WHICH "$new_path" 2> /dev/null`
17734
17735  if test "x$new_path" = x; then
17736    # Oops. Which didn't find the executable.
17737    # The splitting of arguments from the executable at a space might have been incorrect,
17738    # since paths with space are more likely in Windows. Give it another try with the whole
17739    # argument.
17740    path="$complete"
17741    arguments="EOL"
17742    new_path="$path"
17743
17744  windows_path="$new_path"
17745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17746    unix_path=`$CYGPATH -u "$windows_path"`
17747    new_path="$unix_path"
17748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17750    new_path="$unix_path"
17751  fi
17752
17753
17754    new_path=`$WHICH "$new_path" 2> /dev/null`
17755
17756    if test "x$new_path" = x; then
17757      # It's still not found. Now this is an unrecoverable error.
17758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17759$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17760      has_space=`$ECHO "$complete" | $GREP " "`
17761      if test "x$has_space" != x; then
17762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17764      fi
17765      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17766    fi
17767  fi
17768
17769  # Now new_path has a complete unix path to the binary
17770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17771    # Keep paths in /bin as-is, but remove trailing .exe if any
17772    new_path="${new_path/%.exe/}"
17773    # Do not save /bin paths to all_fixpath_prefixes!
17774  else
17775    # Not in mixed or Windows style, start by that.
17776    new_path=`cmd //c echo $new_path`
17777
17778  input_path="$new_path"
17779  # Check if we need to convert this using DOS-style short mode. If the path
17780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17781  # take no chances and rewrite it.
17782  # Note: m4 eats our [], so we need to use [ and ] instead.
17783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17784  if test "x$has_forbidden_chars" != x; then
17785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17787  fi
17788
17789    # Output is in $new_path
17790
17791  windows_path="$new_path"
17792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17793    unix_path=`$CYGPATH -u "$windows_path"`
17794    new_path="$unix_path"
17795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17797    new_path="$unix_path"
17798  fi
17799
17800    # remove trailing .exe if any
17801    new_path="${new_path/%.exe/}"
17802
17803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17805  fi
17806
17807  else
17808    # We're on a posix platform. Hooray! :)
17809    # First separate the path from the arguments. This will split at the first
17810    # space.
17811    complete="$CC"
17812    path="${complete%% *}"
17813    tmp="$complete EOL"
17814    arguments="${tmp#* }"
17815
17816    new_path=`$WHICH $path 2> /dev/null`
17817    if test "x$new_path" = x; then
17818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17819      if test "x$is_absolute_path" != x; then
17820        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17821$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17822        new_path="$path"
17823      else
17824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17825$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17826        has_space=`$ECHO "$complete" | $GREP " "`
17827        if test "x$has_space" != x; then
17828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17830        fi
17831        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17832      fi
17833    fi
17834  fi
17835
17836  # Now join together the path and the arguments once again
17837  if test "x$arguments" != xEOL; then
17838      new_complete="$new_path ${arguments% *}"
17839  else
17840      new_complete="$new_path"
17841  fi
17842
17843  if test "x$complete" != "x$new_complete"; then
17844    CC="$new_complete"
17845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
17846$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17847  fi
17848
17849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
17850$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17851  TEST_COMPILER="$CC"
17852
17853    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17854        # Follow a chain of symbolic links. Use readlink
17855        # where it exists, else fall back to horribly
17856        # complicated shell code.
17857        if test "x$READLINK_TESTED" != yes; then
17858            # On MacOSX there is a readlink tool with a different
17859            # purpose than the GNU readlink tool. Check the found readlink.
17860            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
17861            if test "x$ISGNU" = x; then
17862                 # A readlink that we do not know how to use.
17863                 # Are there other non-GNU readlinks out there?
17864                 READLINK_TESTED=yes
17865                 READLINK=
17866            fi
17867        fi
17868
17869        if test "x$READLINK" != x; then
17870            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
17871        else
17872            STARTDIR=$PWD
17873            COUNTER=0
17874            sym_link_dir=`$DIRNAME $TEST_COMPILER`
17875            sym_link_file=`$BASENAME $TEST_COMPILER`
17876            while test $COUNTER -lt 20; do
17877                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
17878                if test "x$ISLINK" == x; then
17879                    # This is not a symbolic link! We are done!
17880                    break
17881                fi
17882                # The link might be relative! We have to use cd to travel safely.
17883                cd $sym_link_dir
17884                # ... and we must get the to the absolute path, not one using symbolic links.
17885                cd `pwd -P`
17886                cd `$DIRNAME $ISLINK`
17887                sym_link_dir=`$THEPWDCMD`
17888                sym_link_file=`$BASENAME $ISLINK`
17889                let COUNTER=COUNTER+1
17890            done
17891            cd $STARTDIR
17892            TEST_COMPILER=$sym_link_dir/$sym_link_file
17893        fi
17894    fi
17895
17896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
17897$as_echo "$TEST_COMPILER" >&6; }
17898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
17899$as_echo_n "checking if CC is disguised ccache... " >&6; }
17900
17901  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
17902  if test "x$COMPILER_BASENAME" = "xccache"; then
17903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
17904$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
17905    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
17906    # We want to control ccache invocation ourselves, so ignore this cc and try
17907    # searching again.
17908
17909    # Remove the path to the fake ccache cc from the PATH
17910    RETRY_COMPILER_SAVED_PATH="$PATH"
17911    COMPILER_DIRNAME=`$DIRNAME $CC`
17912    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
17913
17914    # Try again looking for our compiler
17915    if test -n "$ac_tool_prefix"; then
17916  for ac_prog in $COMPILER_CHECK_LIST
17917  do
17918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17921$as_echo_n "checking for $ac_word... " >&6; }
17922if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
17923  $as_echo_n "(cached) " >&6
17924else
17925  if test -n "$PROPER_COMPILER_CC"; then
17926  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
17927else
17928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17929for as_dir in $PATH
17930do
17931  IFS=$as_save_IFS
17932  test -z "$as_dir" && as_dir=.
17933    for ac_exec_ext in '' $ac_executable_extensions; do
17934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17935    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
17936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17937    break 2
17938  fi
17939done
17940  done
17941IFS=$as_save_IFS
17942
17943fi
17944fi
17945PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
17946if test -n "$PROPER_COMPILER_CC"; then
17947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
17948$as_echo "$PROPER_COMPILER_CC" >&6; }
17949else
17950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17951$as_echo "no" >&6; }
17952fi
17953
17954
17955    test -n "$PROPER_COMPILER_CC" && break
17956  done
17957fi
17958if test -z "$PROPER_COMPILER_CC"; then
17959  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
17960  for ac_prog in $COMPILER_CHECK_LIST
17961do
17962  # Extract the first word of "$ac_prog", so it can be a program name with args.
17963set dummy $ac_prog; ac_word=$2
17964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17965$as_echo_n "checking for $ac_word... " >&6; }
17966if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
17967  $as_echo_n "(cached) " >&6
17968else
17969  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
17970  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
17971else
17972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17973for as_dir in $PATH
17974do
17975  IFS=$as_save_IFS
17976  test -z "$as_dir" && as_dir=.
17977    for ac_exec_ext in '' $ac_executable_extensions; do
17978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17979    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
17980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17981    break 2
17982  fi
17983done
17984  done
17985IFS=$as_save_IFS
17986
17987fi
17988fi
17989ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
17990if test -n "$ac_ct_PROPER_COMPILER_CC"; then
17991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
17992$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
17993else
17994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17995$as_echo "no" >&6; }
17996fi
17997
17998
17999  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18000done
18001
18002  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18003    PROPER_COMPILER_CC=""
18004  else
18005    case $cross_compiling:$ac_tool_warned in
18006yes:)
18007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18009ac_tool_warned=yes ;;
18010esac
18011    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18012  fi
18013fi
18014
18015
18016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18017
18018  # First separate the path from the arguments. This will split at the first
18019  # space.
18020  complete="$PROPER_COMPILER_CC"
18021  path="${complete%% *}"
18022  tmp="$complete EOL"
18023  arguments="${tmp#* }"
18024
18025  # Input might be given as Windows format, start by converting to
18026  # unix format.
18027  new_path=`$CYGPATH -u "$path"`
18028
18029  # Now try to locate executable using which
18030  new_path=`$WHICH "$new_path" 2> /dev/null`
18031  if test "x$new_path" = x; then
18032    # Oops. Which didn't find the executable.
18033    # The splitting of arguments from the executable at a space might have been incorrect,
18034    # since paths with space are more likely in Windows. Give it another try with the whole
18035    # argument.
18036    path="$complete"
18037    arguments="EOL"
18038    new_path=`$CYGPATH -u "$path"`
18039    new_path=`$WHICH "$new_path" 2> /dev/null`
18040    if test "x$new_path" = x; then
18041      # It's still not found. Now this is an unrecoverable error.
18042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18043$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18044      has_space=`$ECHO "$complete" | $GREP " "`
18045      if test "x$has_space" != x; then
18046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18048      fi
18049      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18050    fi
18051  fi
18052
18053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18056  # "foo.exe" is OK but "foo" is an error.
18057  #
18058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18059  # It is also a way to make sure we got the proper file name for the real test later on.
18060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18061  if test "x$test_shortpath" = x; then
18062    # Short path failed, file does not exist as specified.
18063    # Try adding .exe or .cmd
18064    if test -f "${new_path}.exe"; then
18065       input_to_shortpath="${new_path}.exe"
18066    elif test -f "${new_path}.cmd"; then
18067       input_to_shortpath="${new_path}.cmd"
18068    else
18069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18070$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18073      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18074    fi
18075  else
18076    input_to_shortpath="$new_path"
18077  fi
18078
18079  # Call helper function which possibly converts this using DOS-style short mode.
18080  # If so, the updated path is stored in $new_path.
18081  new_path="$input_to_shortpath"
18082
18083  input_path="$input_to_shortpath"
18084  # Check if we need to convert this using DOS-style short mode. If the path
18085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18086  # take no chances and rewrite it.
18087  # Note: m4 eats our [], so we need to use [ and ] instead.
18088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18089  if test "x$has_forbidden_chars" != x; then
18090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18094      # Going to short mode and back again did indeed matter. Since short mode is
18095      # case insensitive, let's make it lowercase to improve readability.
18096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18097      # Now convert it back to Unix-stile (cygpath)
18098      input_path=`$CYGPATH -u "$shortmode_path"`
18099      new_path="$input_path"
18100    fi
18101  fi
18102
18103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18104  if test "x$test_cygdrive_prefix" = x; then
18105    # As a simple fix, exclude /usr/bin since it's not a real path.
18106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18108      # a path prefixed by /cygdrive for fixpath to work.
18109      new_path="$CYGWIN_ROOT_PATH$input_path"
18110    fi
18111  fi
18112
18113  # remove trailing .exe if any
18114  new_path="${new_path/%.exe/}"
18115
18116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18117
18118  # First separate the path from the arguments. This will split at the first
18119  # space.
18120  complete="$PROPER_COMPILER_CC"
18121  path="${complete%% *}"
18122  tmp="$complete EOL"
18123  arguments="${tmp#* }"
18124
18125  # Input might be given as Windows format, start by converting to
18126  # unix format.
18127  new_path="$path"
18128
18129  windows_path="$new_path"
18130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18131    unix_path=`$CYGPATH -u "$windows_path"`
18132    new_path="$unix_path"
18133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18135    new_path="$unix_path"
18136  fi
18137
18138
18139  # Now try to locate executable using which
18140  new_path=`$WHICH "$new_path" 2> /dev/null`
18141
18142  if test "x$new_path" = x; then
18143    # Oops. Which didn't find the executable.
18144    # The splitting of arguments from the executable at a space might have been incorrect,
18145    # since paths with space are more likely in Windows. Give it another try with the whole
18146    # argument.
18147    path="$complete"
18148    arguments="EOL"
18149    new_path="$path"
18150
18151  windows_path="$new_path"
18152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18153    unix_path=`$CYGPATH -u "$windows_path"`
18154    new_path="$unix_path"
18155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18157    new_path="$unix_path"
18158  fi
18159
18160
18161    new_path=`$WHICH "$new_path" 2> /dev/null`
18162
18163    if test "x$new_path" = x; then
18164      # It's still not found. Now this is an unrecoverable error.
18165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18166$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18167      has_space=`$ECHO "$complete" | $GREP " "`
18168      if test "x$has_space" != x; then
18169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18171      fi
18172      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18173    fi
18174  fi
18175
18176  # Now new_path has a complete unix path to the binary
18177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18178    # Keep paths in /bin as-is, but remove trailing .exe if any
18179    new_path="${new_path/%.exe/}"
18180    # Do not save /bin paths to all_fixpath_prefixes!
18181  else
18182    # Not in mixed or Windows style, start by that.
18183    new_path=`cmd //c echo $new_path`
18184
18185  input_path="$new_path"
18186  # Check if we need to convert this using DOS-style short mode. If the path
18187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18188  # take no chances and rewrite it.
18189  # Note: m4 eats our [], so we need to use [ and ] instead.
18190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18191  if test "x$has_forbidden_chars" != x; then
18192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18194  fi
18195
18196    # Output is in $new_path
18197
18198  windows_path="$new_path"
18199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18200    unix_path=`$CYGPATH -u "$windows_path"`
18201    new_path="$unix_path"
18202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18204    new_path="$unix_path"
18205  fi
18206
18207    # remove trailing .exe if any
18208    new_path="${new_path/%.exe/}"
18209
18210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18212  fi
18213
18214  else
18215    # We're on a posix platform. Hooray! :)
18216    # First separate the path from the arguments. This will split at the first
18217    # space.
18218    complete="$PROPER_COMPILER_CC"
18219    path="${complete%% *}"
18220    tmp="$complete EOL"
18221    arguments="${tmp#* }"
18222
18223    new_path=`$WHICH $path 2> /dev/null`
18224    if test "x$new_path" = x; then
18225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18226      if test "x$is_absolute_path" != x; then
18227        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18228$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18229        new_path="$path"
18230      else
18231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18232$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18233        has_space=`$ECHO "$complete" | $GREP " "`
18234        if test "x$has_space" != x; then
18235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18237        fi
18238        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18239      fi
18240    fi
18241  fi
18242
18243  # Now join together the path and the arguments once again
18244  if test "x$arguments" != xEOL; then
18245      new_complete="$new_path ${arguments% *}"
18246  else
18247      new_complete="$new_path"
18248  fi
18249
18250  if test "x$complete" != "x$new_complete"; then
18251    PROPER_COMPILER_CC="$new_complete"
18252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18253$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18254  fi
18255
18256    PATH="$RETRY_COMPILER_SAVED_PATH"
18257
18258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18259$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18260
18261    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18262        # Follow a chain of symbolic links. Use readlink
18263        # where it exists, else fall back to horribly
18264        # complicated shell code.
18265        if test "x$READLINK_TESTED" != yes; then
18266            # On MacOSX there is a readlink tool with a different
18267            # purpose than the GNU readlink tool. Check the found readlink.
18268            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18269            if test "x$ISGNU" = x; then
18270                 # A readlink that we do not know how to use.
18271                 # Are there other non-GNU readlinks out there?
18272                 READLINK_TESTED=yes
18273                 READLINK=
18274            fi
18275        fi
18276
18277        if test "x$READLINK" != x; then
18278            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18279        else
18280            STARTDIR=$PWD
18281            COUNTER=0
18282            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18283            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18284            while test $COUNTER -lt 20; do
18285                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18286                if test "x$ISLINK" == x; then
18287                    # This is not a symbolic link! We are done!
18288                    break
18289                fi
18290                # The link might be relative! We have to use cd to travel safely.
18291                cd $sym_link_dir
18292                # ... and we must get the to the absolute path, not one using symbolic links.
18293                cd `pwd -P`
18294                cd `$DIRNAME $ISLINK`
18295                sym_link_dir=`$THEPWDCMD`
18296                sym_link_file=`$BASENAME $ISLINK`
18297                let COUNTER=COUNTER+1
18298            done
18299            cd $STARTDIR
18300            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18301        fi
18302    fi
18303
18304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18305$as_echo "$PROPER_COMPILER_CC" >&6; }
18306    CC="$PROPER_COMPILER_CC"
18307  else
18308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18309$as_echo "no, keeping CC" >&6; }
18310    CC="$TEST_COMPILER"
18311  fi
18312
18313  COMPILER=$CC
18314  COMPILER_NAME=$COMPILER_NAME
18315
18316  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18317    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18318    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18319    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18320    if test $? -ne 0; then
18321      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18322
18323      { $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
18324$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18325      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18326$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18327      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18328    else
18329      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18330      COMPILER_VENDOR="Sun Studio"
18331    fi
18332  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18333    # First line typically looks something like:
18334    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18335    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18336    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18337    COMPILER_VENDOR="Microsoft CL.EXE"
18338    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18339    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18340      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18341        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18342      fi
18343    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18344      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18345        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18346      fi
18347    fi
18348  else
18349    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18350    # Check that this is likely to be GCC.
18351    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18352    if test $? -ne 0; then
18353      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18354$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18355      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18356$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18357      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18358    fi
18359
18360    # First line typically looks something like:
18361    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18362    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18363    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18364  fi
18365  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18366  CC_VERSION="$COMPILER_VERSION"
18367  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18368  CC_VENDOR="$COMPILER_VENDOR"
18369
18370  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18371$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18372
18373
18374# Now that we have resolved CC ourself, let autoconf have it's go at it
18375ac_ext=c
18376ac_cpp='$CPP $CPPFLAGS'
18377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18379ac_compiler_gnu=$ac_cv_c_compiler_gnu
18380if test -n "$ac_tool_prefix"; then
18381  for ac_prog in $CC
18382  do
18383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386$as_echo_n "checking for $ac_word... " >&6; }
18387if test "${ac_cv_prog_CC+set}" = set; then :
18388  $as_echo_n "(cached) " >&6
18389else
18390  if test -n "$CC"; then
18391  ac_cv_prog_CC="$CC" # Let the user override the test.
18392else
18393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394for as_dir in $PATH
18395do
18396  IFS=$as_save_IFS
18397  test -z "$as_dir" && as_dir=.
18398    for ac_exec_ext in '' $ac_executable_extensions; do
18399  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18400    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402    break 2
18403  fi
18404done
18405  done
18406IFS=$as_save_IFS
18407
18408fi
18409fi
18410CC=$ac_cv_prog_CC
18411if test -n "$CC"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18413$as_echo "$CC" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420    test -n "$CC" && break
18421  done
18422fi
18423if test -z "$CC"; then
18424  ac_ct_CC=$CC
18425  for ac_prog in $CC
18426do
18427  # Extract the first word of "$ac_prog", so it can be a program name with args.
18428set dummy $ac_prog; ac_word=$2
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18430$as_echo_n "checking for $ac_word... " >&6; }
18431if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18432  $as_echo_n "(cached) " >&6
18433else
18434  if test -n "$ac_ct_CC"; then
18435  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18436else
18437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18438for as_dir in $PATH
18439do
18440  IFS=$as_save_IFS
18441  test -z "$as_dir" && as_dir=.
18442    for ac_exec_ext in '' $ac_executable_extensions; do
18443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18444    ac_cv_prog_ac_ct_CC="$ac_prog"
18445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18446    break 2
18447  fi
18448done
18449  done
18450IFS=$as_save_IFS
18451
18452fi
18453fi
18454ac_ct_CC=$ac_cv_prog_ac_ct_CC
18455if test -n "$ac_ct_CC"; then
18456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18457$as_echo "$ac_ct_CC" >&6; }
18458else
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18460$as_echo "no" >&6; }
18461fi
18462
18463
18464  test -n "$ac_ct_CC" && break
18465done
18466
18467  if test "x$ac_ct_CC" = x; then
18468    CC=""
18469  else
18470    case $cross_compiling:$ac_tool_warned in
18471yes:)
18472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18474ac_tool_warned=yes ;;
18475esac
18476    CC=$ac_ct_CC
18477  fi
18478fi
18479
18480
18481test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18483as_fn_error $? "no acceptable C compiler found in \$PATH
18484See \`config.log' for more details" "$LINENO" 5 ; }
18485
18486# Provide some information about the compiler.
18487$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18488set X $ac_compile
18489ac_compiler=$2
18490for ac_option in --version -v -V -qversion; do
18491  { { ac_try="$ac_compiler $ac_option >&5"
18492case "(($ac_try" in
18493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18494  *) ac_try_echo=$ac_try;;
18495esac
18496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18497$as_echo "$ac_try_echo"; } >&5
18498  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18499  ac_status=$?
18500  if test -s conftest.err; then
18501    sed '10a\
18502... rest of stderr output deleted ...
18503         10q' conftest.err >conftest.er1
18504    cat conftest.er1 >&5
18505  fi
18506  rm -f conftest.er1 conftest.err
18507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18508  test $ac_status = 0; }
18509done
18510
18511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18512/* end confdefs.h.  */
18513
18514int
18515main ()
18516{
18517
18518  ;
18519  return 0;
18520}
18521_ACEOF
18522ac_clean_files_save=$ac_clean_files
18523ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18524# Try to create an executable without -o first, disregard a.out.
18525# It will help us diagnose broken compilers, and finding out an intuition
18526# of exeext.
18527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18528$as_echo_n "checking whether the C compiler works... " >&6; }
18529ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18530
18531# The possible output files:
18532ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18533
18534ac_rmfiles=
18535for ac_file in $ac_files
18536do
18537  case $ac_file in
18538    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18539    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18540  esac
18541done
18542rm -f $ac_rmfiles
18543
18544if { { ac_try="$ac_link_default"
18545case "(($ac_try" in
18546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18547  *) ac_try_echo=$ac_try;;
18548esac
18549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18550$as_echo "$ac_try_echo"; } >&5
18551  (eval "$ac_link_default") 2>&5
18552  ac_status=$?
18553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18554  test $ac_status = 0; }; then :
18555  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18556# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18557# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18558# so that the user can short-circuit this test for compilers unknown to
18559# Autoconf.
18560for ac_file in $ac_files ''
18561do
18562  test -f "$ac_file" || continue
18563  case $ac_file in
18564    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18565	;;
18566    [ab].out )
18567	# We found the default executable, but exeext='' is most
18568	# certainly right.
18569	break;;
18570    *.* )
18571	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18572	then :; else
18573	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18574	fi
18575	# We set ac_cv_exeext here because the later test for it is not
18576	# safe: cross compilers may not add the suffix if given an `-o'
18577	# argument, so we may need to know it at that point already.
18578	# Even if this section looks crufty: it has the advantage of
18579	# actually working.
18580	break;;
18581    * )
18582	break;;
18583  esac
18584done
18585test "$ac_cv_exeext" = no && ac_cv_exeext=
18586
18587else
18588  ac_file=''
18589fi
18590if test -z "$ac_file"; then :
18591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18592$as_echo "no" >&6; }
18593$as_echo "$as_me: failed program was:" >&5
18594sed 's/^/| /' conftest.$ac_ext >&5
18595
18596{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18598as_fn_error 77 "C compiler cannot create executables
18599See \`config.log' for more details" "$LINENO" 5 ; }
18600else
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18602$as_echo "yes" >&6; }
18603fi
18604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18605$as_echo_n "checking for C compiler default output file name... " >&6; }
18606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18607$as_echo "$ac_file" >&6; }
18608ac_exeext=$ac_cv_exeext
18609
18610rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18611ac_clean_files=$ac_clean_files_save
18612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18613$as_echo_n "checking for suffix of executables... " >&6; }
18614if { { ac_try="$ac_link"
18615case "(($ac_try" in
18616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18617  *) ac_try_echo=$ac_try;;
18618esac
18619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18620$as_echo "$ac_try_echo"; } >&5
18621  (eval "$ac_link") 2>&5
18622  ac_status=$?
18623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18624  test $ac_status = 0; }; then :
18625  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18626# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18627# work properly (i.e., refer to `conftest.exe'), while it won't with
18628# `rm'.
18629for ac_file in conftest.exe conftest conftest.*; do
18630  test -f "$ac_file" || continue
18631  case $ac_file in
18632    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18633    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18634	  break;;
18635    * ) break;;
18636  esac
18637done
18638else
18639  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18641as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18642See \`config.log' for more details" "$LINENO" 5 ; }
18643fi
18644rm -f conftest conftest$ac_cv_exeext
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18646$as_echo "$ac_cv_exeext" >&6; }
18647
18648rm -f conftest.$ac_ext
18649EXEEXT=$ac_cv_exeext
18650ac_exeext=$EXEEXT
18651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652/* end confdefs.h.  */
18653#include <stdio.h>
18654int
18655main ()
18656{
18657FILE *f = fopen ("conftest.out", "w");
18658 return ferror (f) || fclose (f) != 0;
18659
18660  ;
18661  return 0;
18662}
18663_ACEOF
18664ac_clean_files="$ac_clean_files conftest.out"
18665# Check that the compiler produces executables we can run.  If not, either
18666# the compiler is broken, or we cross compile.
18667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18668$as_echo_n "checking whether we are cross compiling... " >&6; }
18669if test "$cross_compiling" != yes; then
18670  { { ac_try="$ac_link"
18671case "(($ac_try" in
18672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18673  *) ac_try_echo=$ac_try;;
18674esac
18675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18676$as_echo "$ac_try_echo"; } >&5
18677  (eval "$ac_link") 2>&5
18678  ac_status=$?
18679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18680  test $ac_status = 0; }
18681  if { ac_try='./conftest$ac_cv_exeext'
18682  { { case "(($ac_try" in
18683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18684  *) ac_try_echo=$ac_try;;
18685esac
18686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18687$as_echo "$ac_try_echo"; } >&5
18688  (eval "$ac_try") 2>&5
18689  ac_status=$?
18690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18691  test $ac_status = 0; }; }; then
18692    cross_compiling=no
18693  else
18694    if test "$cross_compiling" = maybe; then
18695	cross_compiling=yes
18696    else
18697	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18699as_fn_error $? "cannot run C compiled programs.
18700If you meant to cross compile, use \`--host'.
18701See \`config.log' for more details" "$LINENO" 5 ; }
18702    fi
18703  fi
18704fi
18705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18706$as_echo "$cross_compiling" >&6; }
18707
18708rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18709ac_clean_files=$ac_clean_files_save
18710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18711$as_echo_n "checking for suffix of object files... " >&6; }
18712if test "${ac_cv_objext+set}" = set; then :
18713  $as_echo_n "(cached) " >&6
18714else
18715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18716/* end confdefs.h.  */
18717
18718int
18719main ()
18720{
18721
18722  ;
18723  return 0;
18724}
18725_ACEOF
18726rm -f conftest.o conftest.obj
18727if { { ac_try="$ac_compile"
18728case "(($ac_try" in
18729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18730  *) ac_try_echo=$ac_try;;
18731esac
18732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18733$as_echo "$ac_try_echo"; } >&5
18734  (eval "$ac_compile") 2>&5
18735  ac_status=$?
18736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18737  test $ac_status = 0; }; then :
18738  for ac_file in conftest.o conftest.obj conftest.*; do
18739  test -f "$ac_file" || continue;
18740  case $ac_file in
18741    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18742    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18743       break;;
18744  esac
18745done
18746else
18747  $as_echo "$as_me: failed program was:" >&5
18748sed 's/^/| /' conftest.$ac_ext >&5
18749
18750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18752as_fn_error $? "cannot compute suffix of object files: cannot compile
18753See \`config.log' for more details" "$LINENO" 5 ; }
18754fi
18755rm -f conftest.$ac_cv_objext conftest.$ac_ext
18756fi
18757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
18758$as_echo "$ac_cv_objext" >&6; }
18759OBJEXT=$ac_cv_objext
18760ac_objext=$OBJEXT
18761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
18762$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18763if test "${ac_cv_c_compiler_gnu+set}" = set; then :
18764  $as_echo_n "(cached) " >&6
18765else
18766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18767/* end confdefs.h.  */
18768
18769int
18770main ()
18771{
18772#ifndef __GNUC__
18773       choke me
18774#endif
18775
18776  ;
18777  return 0;
18778}
18779_ACEOF
18780if ac_fn_c_try_compile "$LINENO"; then :
18781  ac_compiler_gnu=yes
18782else
18783  ac_compiler_gnu=no
18784fi
18785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18786ac_cv_c_compiler_gnu=$ac_compiler_gnu
18787
18788fi
18789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
18790$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18791if test $ac_compiler_gnu = yes; then
18792  GCC=yes
18793else
18794  GCC=
18795fi
18796ac_test_CFLAGS=${CFLAGS+set}
18797ac_save_CFLAGS=$CFLAGS
18798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
18799$as_echo_n "checking whether $CC accepts -g... " >&6; }
18800if test "${ac_cv_prog_cc_g+set}" = set; then :
18801  $as_echo_n "(cached) " >&6
18802else
18803  ac_save_c_werror_flag=$ac_c_werror_flag
18804   ac_c_werror_flag=yes
18805   ac_cv_prog_cc_g=no
18806   CFLAGS="-g"
18807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18808/* end confdefs.h.  */
18809
18810int
18811main ()
18812{
18813
18814  ;
18815  return 0;
18816}
18817_ACEOF
18818if ac_fn_c_try_compile "$LINENO"; then :
18819  ac_cv_prog_cc_g=yes
18820else
18821  CFLAGS=""
18822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18823/* end confdefs.h.  */
18824
18825int
18826main ()
18827{
18828
18829  ;
18830  return 0;
18831}
18832_ACEOF
18833if ac_fn_c_try_compile "$LINENO"; then :
18834
18835else
18836  ac_c_werror_flag=$ac_save_c_werror_flag
18837	 CFLAGS="-g"
18838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18839/* end confdefs.h.  */
18840
18841int
18842main ()
18843{
18844
18845  ;
18846  return 0;
18847}
18848_ACEOF
18849if ac_fn_c_try_compile "$LINENO"; then :
18850  ac_cv_prog_cc_g=yes
18851fi
18852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18853fi
18854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18855fi
18856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18857   ac_c_werror_flag=$ac_save_c_werror_flag
18858fi
18859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
18860$as_echo "$ac_cv_prog_cc_g" >&6; }
18861if test "$ac_test_CFLAGS" = set; then
18862  CFLAGS=$ac_save_CFLAGS
18863elif test $ac_cv_prog_cc_g = yes; then
18864  if test "$GCC" = yes; then
18865    CFLAGS="-g -O2"
18866  else
18867    CFLAGS="-g"
18868  fi
18869else
18870  if test "$GCC" = yes; then
18871    CFLAGS="-O2"
18872  else
18873    CFLAGS=
18874  fi
18875fi
18876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
18877$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
18878if test "${ac_cv_prog_cc_c89+set}" = set; then :
18879  $as_echo_n "(cached) " >&6
18880else
18881  ac_cv_prog_cc_c89=no
18882ac_save_CC=$CC
18883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18884/* end confdefs.h.  */
18885#include <stdarg.h>
18886#include <stdio.h>
18887#include <sys/types.h>
18888#include <sys/stat.h>
18889/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
18890struct buf { int x; };
18891FILE * (*rcsopen) (struct buf *, struct stat *, int);
18892static char *e (p, i)
18893     char **p;
18894     int i;
18895{
18896  return p[i];
18897}
18898static char *f (char * (*g) (char **, int), char **p, ...)
18899{
18900  char *s;
18901  va_list v;
18902  va_start (v,p);
18903  s = g (p, va_arg (v,int));
18904  va_end (v);
18905  return s;
18906}
18907
18908/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
18909   function prototypes and stuff, but not '\xHH' hex character constants.
18910   These don't provoke an error unfortunately, instead are silently treated
18911   as 'x'.  The following induces an error, until -std is added to get
18912   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
18913   array size at least.  It's necessary to write '\x00'==0 to get something
18914   that's true only with -std.  */
18915int osf4_cc_array ['\x00' == 0 ? 1 : -1];
18916
18917/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
18918   inside strings and character constants.  */
18919#define FOO(x) 'x'
18920int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
18921
18922int test (int i, double x);
18923struct s1 {int (*f) (int a);};
18924struct s2 {int (*f) (double a);};
18925int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
18926int argc;
18927char **argv;
18928int
18929main ()
18930{
18931return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
18932  ;
18933  return 0;
18934}
18935_ACEOF
18936for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
18937	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
18938do
18939  CC="$ac_save_CC $ac_arg"
18940  if ac_fn_c_try_compile "$LINENO"; then :
18941  ac_cv_prog_cc_c89=$ac_arg
18942fi
18943rm -f core conftest.err conftest.$ac_objext
18944  test "x$ac_cv_prog_cc_c89" != "xno" && break
18945done
18946rm -f conftest.$ac_ext
18947CC=$ac_save_CC
18948
18949fi
18950# AC_CACHE_VAL
18951case "x$ac_cv_prog_cc_c89" in
18952  x)
18953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
18954$as_echo "none needed" >&6; } ;;
18955  xno)
18956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
18957$as_echo "unsupported" >&6; } ;;
18958  *)
18959    CC="$CC $ac_cv_prog_cc_c89"
18960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
18961$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
18962esac
18963if test "x$ac_cv_prog_cc_c89" != xno; then :
18964
18965fi
18966
18967ac_ext=cpp
18968ac_cpp='$CXXCPP $CPPFLAGS'
18969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18970ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18972
18973
18974### Locate C++ compiler (CXX)
18975
18976if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18977  # Do not probe for CC on MacOSX.
18978  COMPILER_CHECK_LIST="cl g++"
18979else
18980  COMPILER_CHECK_LIST="cl CC g++"
18981fi
18982
18983  COMPILER_NAME=C++
18984
18985  # Do a first initial attempt at searching the list of compiler names.
18986  # AC_PATH_PROGS can't be run multiple times with the same variable,
18987  # so create a new name for this run.
18988  for ac_prog in $COMPILER_CHECK_LIST
18989do
18990  # Extract the first word of "$ac_prog", so it can be a program name with args.
18991set dummy $ac_prog; ac_word=$2
18992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18993$as_echo_n "checking for $ac_word... " >&6; }
18994if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
18995  $as_echo_n "(cached) " >&6
18996else
18997  case $POTENTIAL_CXX in
18998  [\\/]* | ?:[\\/]*)
18999  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19000  ;;
19001  *)
19002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19003for as_dir in $PATH
19004do
19005  IFS=$as_save_IFS
19006  test -z "$as_dir" && as_dir=.
19007    for ac_exec_ext in '' $ac_executable_extensions; do
19008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19009    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19011    break 2
19012  fi
19013done
19014  done
19015IFS=$as_save_IFS
19016
19017  ;;
19018esac
19019fi
19020POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19021if test -n "$POTENTIAL_CXX"; then
19022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19023$as_echo "$POTENTIAL_CXX" >&6; }
19024else
19025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19026$as_echo "no" >&6; }
19027fi
19028
19029
19030  test -n "$POTENTIAL_CXX" && break
19031done
19032
19033  CXX=$POTENTIAL_CXX
19034
19035  if test "x$$CXX" = x; then
19036
19037    # Print a helpful message on how to acquire the necessary build dependency.
19038    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19039    MISSING_DEPENDENCY=devkit
19040    PKGHANDLER_COMMAND=
19041
19042    case $PKGHANDLER in
19043	apt-get)
19044                apt_help     $MISSING_DEPENDENCY ;;
19045    yum)
19046                yum_help     $MISSING_DEPENDENCY ;;
19047	port)
19048                port_help    $MISSING_DEPENDENCY ;;
19049	pkgutil)
19050                pkgutil_help $MISSING_DEPENDENCY ;;
19051	pkgadd)
19052                pkgadd_help  $MISSING_DEPENDENCY ;;
19053    * )
19054      break ;;
19055    esac
19056
19057    if test "x$PKGHANDLER_COMMAND" != x; then
19058        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19059    fi
19060
19061      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19062  fi
19063
19064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19065
19066  # First separate the path from the arguments. This will split at the first
19067  # space.
19068  complete="$CXX"
19069  path="${complete%% *}"
19070  tmp="$complete EOL"
19071  arguments="${tmp#* }"
19072
19073  # Input might be given as Windows format, start by converting to
19074  # unix format.
19075  new_path=`$CYGPATH -u "$path"`
19076
19077  # Now try to locate executable using which
19078  new_path=`$WHICH "$new_path" 2> /dev/null`
19079  if test "x$new_path" = x; then
19080    # Oops. Which didn't find the executable.
19081    # The splitting of arguments from the executable at a space might have been incorrect,
19082    # since paths with space are more likely in Windows. Give it another try with the whole
19083    # argument.
19084    path="$complete"
19085    arguments="EOL"
19086    new_path=`$CYGPATH -u "$path"`
19087    new_path=`$WHICH "$new_path" 2> /dev/null`
19088    if test "x$new_path" = x; then
19089      # It's still not found. Now this is an unrecoverable error.
19090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19091$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19092      has_space=`$ECHO "$complete" | $GREP " "`
19093      if test "x$has_space" != x; then
19094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19096      fi
19097      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19098    fi
19099  fi
19100
19101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19104  # "foo.exe" is OK but "foo" is an error.
19105  #
19106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19107  # It is also a way to make sure we got the proper file name for the real test later on.
19108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19109  if test "x$test_shortpath" = x; then
19110    # Short path failed, file does not exist as specified.
19111    # Try adding .exe or .cmd
19112    if test -f "${new_path}.exe"; then
19113       input_to_shortpath="${new_path}.exe"
19114    elif test -f "${new_path}.cmd"; then
19115       input_to_shortpath="${new_path}.cmd"
19116    else
19117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19118$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19121      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19122    fi
19123  else
19124    input_to_shortpath="$new_path"
19125  fi
19126
19127  # Call helper function which possibly converts this using DOS-style short mode.
19128  # If so, the updated path is stored in $new_path.
19129  new_path="$input_to_shortpath"
19130
19131  input_path="$input_to_shortpath"
19132  # Check if we need to convert this using DOS-style short mode. If the path
19133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19134  # take no chances and rewrite it.
19135  # Note: m4 eats our [], so we need to use [ and ] instead.
19136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19137  if test "x$has_forbidden_chars" != x; then
19138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19142      # Going to short mode and back again did indeed matter. Since short mode is
19143      # case insensitive, let's make it lowercase to improve readability.
19144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19145      # Now convert it back to Unix-stile (cygpath)
19146      input_path=`$CYGPATH -u "$shortmode_path"`
19147      new_path="$input_path"
19148    fi
19149  fi
19150
19151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19152  if test "x$test_cygdrive_prefix" = x; then
19153    # As a simple fix, exclude /usr/bin since it's not a real path.
19154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19156      # a path prefixed by /cygdrive for fixpath to work.
19157      new_path="$CYGWIN_ROOT_PATH$input_path"
19158    fi
19159  fi
19160
19161  # remove trailing .exe if any
19162  new_path="${new_path/%.exe/}"
19163
19164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165
19166  # First separate the path from the arguments. This will split at the first
19167  # space.
19168  complete="$CXX"
19169  path="${complete%% *}"
19170  tmp="$complete EOL"
19171  arguments="${tmp#* }"
19172
19173  # Input might be given as Windows format, start by converting to
19174  # unix format.
19175  new_path="$path"
19176
19177  windows_path="$new_path"
19178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19179    unix_path=`$CYGPATH -u "$windows_path"`
19180    new_path="$unix_path"
19181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19183    new_path="$unix_path"
19184  fi
19185
19186
19187  # Now try to locate executable using which
19188  new_path=`$WHICH "$new_path" 2> /dev/null`
19189
19190  if test "x$new_path" = x; then
19191    # Oops. Which didn't find the executable.
19192    # The splitting of arguments from the executable at a space might have been incorrect,
19193    # since paths with space are more likely in Windows. Give it another try with the whole
19194    # argument.
19195    path="$complete"
19196    arguments="EOL"
19197    new_path="$path"
19198
19199  windows_path="$new_path"
19200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19201    unix_path=`$CYGPATH -u "$windows_path"`
19202    new_path="$unix_path"
19203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19205    new_path="$unix_path"
19206  fi
19207
19208
19209    new_path=`$WHICH "$new_path" 2> /dev/null`
19210
19211    if test "x$new_path" = x; then
19212      # It's still not found. Now this is an unrecoverable error.
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19214$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19215      has_space=`$ECHO "$complete" | $GREP " "`
19216      if test "x$has_space" != x; then
19217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19219      fi
19220      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19221    fi
19222  fi
19223
19224  # Now new_path has a complete unix path to the binary
19225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19226    # Keep paths in /bin as-is, but remove trailing .exe if any
19227    new_path="${new_path/%.exe/}"
19228    # Do not save /bin paths to all_fixpath_prefixes!
19229  else
19230    # Not in mixed or Windows style, start by that.
19231    new_path=`cmd //c echo $new_path`
19232
19233  input_path="$new_path"
19234  # Check if we need to convert this using DOS-style short mode. If the path
19235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19236  # take no chances and rewrite it.
19237  # Note: m4 eats our [], so we need to use [ and ] instead.
19238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19239  if test "x$has_forbidden_chars" != x; then
19240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19242  fi
19243
19244    # Output is in $new_path
19245
19246  windows_path="$new_path"
19247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19248    unix_path=`$CYGPATH -u "$windows_path"`
19249    new_path="$unix_path"
19250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19252    new_path="$unix_path"
19253  fi
19254
19255    # remove trailing .exe if any
19256    new_path="${new_path/%.exe/}"
19257
19258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19260  fi
19261
19262  else
19263    # We're on a posix platform. Hooray! :)
19264    # First separate the path from the arguments. This will split at the first
19265    # space.
19266    complete="$CXX"
19267    path="${complete%% *}"
19268    tmp="$complete EOL"
19269    arguments="${tmp#* }"
19270
19271    new_path=`$WHICH $path 2> /dev/null`
19272    if test "x$new_path" = x; then
19273      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19274      if test "x$is_absolute_path" != x; then
19275        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19276$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19277        new_path="$path"
19278      else
19279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19280$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19281        has_space=`$ECHO "$complete" | $GREP " "`
19282        if test "x$has_space" != x; then
19283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19285        fi
19286        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19287      fi
19288    fi
19289  fi
19290
19291  # Now join together the path and the arguments once again
19292  if test "x$arguments" != xEOL; then
19293      new_complete="$new_path ${arguments% *}"
19294  else
19295      new_complete="$new_path"
19296  fi
19297
19298  if test "x$complete" != "x$new_complete"; then
19299    CXX="$new_complete"
19300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19301$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19302  fi
19303
19304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19305$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19306  TEST_COMPILER="$CXX"
19307
19308    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19309        # Follow a chain of symbolic links. Use readlink
19310        # where it exists, else fall back to horribly
19311        # complicated shell code.
19312        if test "x$READLINK_TESTED" != yes; then
19313            # On MacOSX there is a readlink tool with a different
19314            # purpose than the GNU readlink tool. Check the found readlink.
19315            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19316            if test "x$ISGNU" = x; then
19317                 # A readlink that we do not know how to use.
19318                 # Are there other non-GNU readlinks out there?
19319                 READLINK_TESTED=yes
19320                 READLINK=
19321            fi
19322        fi
19323
19324        if test "x$READLINK" != x; then
19325            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19326        else
19327            STARTDIR=$PWD
19328            COUNTER=0
19329            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19330            sym_link_file=`$BASENAME $TEST_COMPILER`
19331            while test $COUNTER -lt 20; do
19332                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19333                if test "x$ISLINK" == x; then
19334                    # This is not a symbolic link! We are done!
19335                    break
19336                fi
19337                # The link might be relative! We have to use cd to travel safely.
19338                cd $sym_link_dir
19339                # ... and we must get the to the absolute path, not one using symbolic links.
19340                cd `pwd -P`
19341                cd `$DIRNAME $ISLINK`
19342                sym_link_dir=`$THEPWDCMD`
19343                sym_link_file=`$BASENAME $ISLINK`
19344                let COUNTER=COUNTER+1
19345            done
19346            cd $STARTDIR
19347            TEST_COMPILER=$sym_link_dir/$sym_link_file
19348        fi
19349    fi
19350
19351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19352$as_echo "$TEST_COMPILER" >&6; }
19353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19354$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19355
19356  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19357  if test "x$COMPILER_BASENAME" = "xccache"; then
19358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19359$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19360    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19361    # We want to control ccache invocation ourselves, so ignore this cc and try
19362    # searching again.
19363
19364    # Remove the path to the fake ccache cc from the PATH
19365    RETRY_COMPILER_SAVED_PATH="$PATH"
19366    COMPILER_DIRNAME=`$DIRNAME $CXX`
19367    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19368
19369    # Try again looking for our compiler
19370    if test -n "$ac_tool_prefix"; then
19371  for ac_prog in $COMPILER_CHECK_LIST
19372  do
19373    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19376$as_echo_n "checking for $ac_word... " >&6; }
19377if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19378  $as_echo_n "(cached) " >&6
19379else
19380  if test -n "$PROPER_COMPILER_CXX"; then
19381  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19382else
19383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19384for as_dir in $PATH
19385do
19386  IFS=$as_save_IFS
19387  test -z "$as_dir" && as_dir=.
19388    for ac_exec_ext in '' $ac_executable_extensions; do
19389  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19390    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19392    break 2
19393  fi
19394done
19395  done
19396IFS=$as_save_IFS
19397
19398fi
19399fi
19400PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19401if test -n "$PROPER_COMPILER_CXX"; then
19402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19403$as_echo "$PROPER_COMPILER_CXX" >&6; }
19404else
19405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19406$as_echo "no" >&6; }
19407fi
19408
19409
19410    test -n "$PROPER_COMPILER_CXX" && break
19411  done
19412fi
19413if test -z "$PROPER_COMPILER_CXX"; then
19414  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19415  for ac_prog in $COMPILER_CHECK_LIST
19416do
19417  # Extract the first word of "$ac_prog", so it can be a program name with args.
19418set dummy $ac_prog; ac_word=$2
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19420$as_echo_n "checking for $ac_word... " >&6; }
19421if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19422  $as_echo_n "(cached) " >&6
19423else
19424  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19425  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19426else
19427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428for as_dir in $PATH
19429do
19430  IFS=$as_save_IFS
19431  test -z "$as_dir" && as_dir=.
19432    for ac_exec_ext in '' $ac_executable_extensions; do
19433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19434    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436    break 2
19437  fi
19438done
19439  done
19440IFS=$as_save_IFS
19441
19442fi
19443fi
19444ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19445if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19447$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19448else
19449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19450$as_echo "no" >&6; }
19451fi
19452
19453
19454  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19455done
19456
19457  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19458    PROPER_COMPILER_CXX=""
19459  else
19460    case $cross_compiling:$ac_tool_warned in
19461yes:)
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19464ac_tool_warned=yes ;;
19465esac
19466    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19467  fi
19468fi
19469
19470
19471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19472
19473  # First separate the path from the arguments. This will split at the first
19474  # space.
19475  complete="$PROPER_COMPILER_CXX"
19476  path="${complete%% *}"
19477  tmp="$complete EOL"
19478  arguments="${tmp#* }"
19479
19480  # Input might be given as Windows format, start by converting to
19481  # unix format.
19482  new_path=`$CYGPATH -u "$path"`
19483
19484  # Now try to locate executable using which
19485  new_path=`$WHICH "$new_path" 2> /dev/null`
19486  if test "x$new_path" = x; then
19487    # Oops. Which didn't find the executable.
19488    # The splitting of arguments from the executable at a space might have been incorrect,
19489    # since paths with space are more likely in Windows. Give it another try with the whole
19490    # argument.
19491    path="$complete"
19492    arguments="EOL"
19493    new_path=`$CYGPATH -u "$path"`
19494    new_path=`$WHICH "$new_path" 2> /dev/null`
19495    if test "x$new_path" = x; then
19496      # It's still not found. Now this is an unrecoverable error.
19497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19498$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19499      has_space=`$ECHO "$complete" | $GREP " "`
19500      if test "x$has_space" != x; then
19501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19503      fi
19504      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19505    fi
19506  fi
19507
19508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19511  # "foo.exe" is OK but "foo" is an error.
19512  #
19513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19514  # It is also a way to make sure we got the proper file name for the real test later on.
19515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19516  if test "x$test_shortpath" = x; then
19517    # Short path failed, file does not exist as specified.
19518    # Try adding .exe or .cmd
19519    if test -f "${new_path}.exe"; then
19520       input_to_shortpath="${new_path}.exe"
19521    elif test -f "${new_path}.cmd"; then
19522       input_to_shortpath="${new_path}.cmd"
19523    else
19524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19525$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19528      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19529    fi
19530  else
19531    input_to_shortpath="$new_path"
19532  fi
19533
19534  # Call helper function which possibly converts this using DOS-style short mode.
19535  # If so, the updated path is stored in $new_path.
19536  new_path="$input_to_shortpath"
19537
19538  input_path="$input_to_shortpath"
19539  # Check if we need to convert this using DOS-style short mode. If the path
19540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19541  # take no chances and rewrite it.
19542  # Note: m4 eats our [], so we need to use [ and ] instead.
19543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19544  if test "x$has_forbidden_chars" != x; then
19545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19549      # Going to short mode and back again did indeed matter. Since short mode is
19550      # case insensitive, let's make it lowercase to improve readability.
19551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19552      # Now convert it back to Unix-stile (cygpath)
19553      input_path=`$CYGPATH -u "$shortmode_path"`
19554      new_path="$input_path"
19555    fi
19556  fi
19557
19558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19559  if test "x$test_cygdrive_prefix" = x; then
19560    # As a simple fix, exclude /usr/bin since it's not a real path.
19561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19563      # a path prefixed by /cygdrive for fixpath to work.
19564      new_path="$CYGWIN_ROOT_PATH$input_path"
19565    fi
19566  fi
19567
19568  # remove trailing .exe if any
19569  new_path="${new_path/%.exe/}"
19570
19571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19572
19573  # First separate the path from the arguments. This will split at the first
19574  # space.
19575  complete="$PROPER_COMPILER_CXX"
19576  path="${complete%% *}"
19577  tmp="$complete EOL"
19578  arguments="${tmp#* }"
19579
19580  # Input might be given as Windows format, start by converting to
19581  # unix format.
19582  new_path="$path"
19583
19584  windows_path="$new_path"
19585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19586    unix_path=`$CYGPATH -u "$windows_path"`
19587    new_path="$unix_path"
19588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19590    new_path="$unix_path"
19591  fi
19592
19593
19594  # Now try to locate executable using which
19595  new_path=`$WHICH "$new_path" 2> /dev/null`
19596
19597  if test "x$new_path" = x; then
19598    # Oops. Which didn't find the executable.
19599    # The splitting of arguments from the executable at a space might have been incorrect,
19600    # since paths with space are more likely in Windows. Give it another try with the whole
19601    # argument.
19602    path="$complete"
19603    arguments="EOL"
19604    new_path="$path"
19605
19606  windows_path="$new_path"
19607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19608    unix_path=`$CYGPATH -u "$windows_path"`
19609    new_path="$unix_path"
19610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19612    new_path="$unix_path"
19613  fi
19614
19615
19616    new_path=`$WHICH "$new_path" 2> /dev/null`
19617
19618    if test "x$new_path" = x; then
19619      # It's still not found. Now this is an unrecoverable error.
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19621$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19622      has_space=`$ECHO "$complete" | $GREP " "`
19623      if test "x$has_space" != x; then
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19626      fi
19627      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19628    fi
19629  fi
19630
19631  # Now new_path has a complete unix path to the binary
19632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19633    # Keep paths in /bin as-is, but remove trailing .exe if any
19634    new_path="${new_path/%.exe/}"
19635    # Do not save /bin paths to all_fixpath_prefixes!
19636  else
19637    # Not in mixed or Windows style, start by that.
19638    new_path=`cmd //c echo $new_path`
19639
19640  input_path="$new_path"
19641  # Check if we need to convert this using DOS-style short mode. If the path
19642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19643  # take no chances and rewrite it.
19644  # Note: m4 eats our [], so we need to use [ and ] instead.
19645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19646  if test "x$has_forbidden_chars" != x; then
19647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19649  fi
19650
19651    # Output is in $new_path
19652
19653  windows_path="$new_path"
19654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19655    unix_path=`$CYGPATH -u "$windows_path"`
19656    new_path="$unix_path"
19657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19659    new_path="$unix_path"
19660  fi
19661
19662    # remove trailing .exe if any
19663    new_path="${new_path/%.exe/}"
19664
19665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19667  fi
19668
19669  else
19670    # We're on a posix platform. Hooray! :)
19671    # First separate the path from the arguments. This will split at the first
19672    # space.
19673    complete="$PROPER_COMPILER_CXX"
19674    path="${complete%% *}"
19675    tmp="$complete EOL"
19676    arguments="${tmp#* }"
19677
19678    new_path=`$WHICH $path 2> /dev/null`
19679    if test "x$new_path" = x; then
19680      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19681      if test "x$is_absolute_path" != x; then
19682        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19683$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19684        new_path="$path"
19685      else
19686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19687$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19688        has_space=`$ECHO "$complete" | $GREP " "`
19689        if test "x$has_space" != x; then
19690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19692        fi
19693        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19694      fi
19695    fi
19696  fi
19697
19698  # Now join together the path and the arguments once again
19699  if test "x$arguments" != xEOL; then
19700      new_complete="$new_path ${arguments% *}"
19701  else
19702      new_complete="$new_path"
19703  fi
19704
19705  if test "x$complete" != "x$new_complete"; then
19706    PROPER_COMPILER_CXX="$new_complete"
19707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
19708$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
19709  fi
19710
19711    PATH="$RETRY_COMPILER_SAVED_PATH"
19712
19713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
19714$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
19715
19716    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19717        # Follow a chain of symbolic links. Use readlink
19718        # where it exists, else fall back to horribly
19719        # complicated shell code.
19720        if test "x$READLINK_TESTED" != yes; then
19721            # On MacOSX there is a readlink tool with a different
19722            # purpose than the GNU readlink tool. Check the found readlink.
19723            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19724            if test "x$ISGNU" = x; then
19725                 # A readlink that we do not know how to use.
19726                 # Are there other non-GNU readlinks out there?
19727                 READLINK_TESTED=yes
19728                 READLINK=
19729            fi
19730        fi
19731
19732        if test "x$READLINK" != x; then
19733            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
19734        else
19735            STARTDIR=$PWD
19736            COUNTER=0
19737            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
19738            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
19739            while test $COUNTER -lt 20; do
19740                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19741                if test "x$ISLINK" == x; then
19742                    # This is not a symbolic link! We are done!
19743                    break
19744                fi
19745                # The link might be relative! We have to use cd to travel safely.
19746                cd $sym_link_dir
19747                # ... and we must get the to the absolute path, not one using symbolic links.
19748                cd `pwd -P`
19749                cd `$DIRNAME $ISLINK`
19750                sym_link_dir=`$THEPWDCMD`
19751                sym_link_file=`$BASENAME $ISLINK`
19752                let COUNTER=COUNTER+1
19753            done
19754            cd $STARTDIR
19755            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
19756        fi
19757    fi
19758
19759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19760$as_echo "$PROPER_COMPILER_CXX" >&6; }
19761    CXX="$PROPER_COMPILER_CXX"
19762  else
19763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
19764$as_echo "no, keeping CXX" >&6; }
19765    CXX="$TEST_COMPILER"
19766  fi
19767
19768  COMPILER=$CXX
19769  COMPILER_NAME=$COMPILER_NAME
19770
19771  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19772    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19773    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19774    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19775    if test $? -ne 0; then
19776      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19777
19778      { $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
19779$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19780      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19781$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19782      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19783    else
19784      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19785      COMPILER_VENDOR="Sun Studio"
19786    fi
19787  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19788    # First line typically looks something like:
19789    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19790    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19791    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19792    COMPILER_VENDOR="Microsoft CL.EXE"
19793    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19794    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19795      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19796        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19797      fi
19798    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19799      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19800        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19801      fi
19802    fi
19803  else
19804    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19805    # Check that this is likely to be GCC.
19806    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19807    if test $? -ne 0; then
19808      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19809$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19810      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19811$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19812      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19813    fi
19814
19815    # First line typically looks something like:
19816    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19817    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19818    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19819  fi
19820  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19821  CXX_VERSION="$COMPILER_VERSION"
19822  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19823  CXX_VENDOR="$COMPILER_VENDOR"
19824
19825  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19826$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19827
19828
19829# Now that we have resolved CXX ourself, let autoconf have it's go at it
19830ac_ext=cpp
19831ac_cpp='$CXXCPP $CPPFLAGS'
19832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19835if test -z "$CXX"; then
19836  if test -n "$CCC"; then
19837    CXX=$CCC
19838  else
19839    if test -n "$ac_tool_prefix"; then
19840  for ac_prog in $CXX
19841  do
19842    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19843set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19845$as_echo_n "checking for $ac_word... " >&6; }
19846if test "${ac_cv_prog_CXX+set}" = set; then :
19847  $as_echo_n "(cached) " >&6
19848else
19849  if test -n "$CXX"; then
19850  ac_cv_prog_CXX="$CXX" # Let the user override the test.
19851else
19852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19853for as_dir in $PATH
19854do
19855  IFS=$as_save_IFS
19856  test -z "$as_dir" && as_dir=.
19857    for ac_exec_ext in '' $ac_executable_extensions; do
19858  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19859    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
19860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19861    break 2
19862  fi
19863done
19864  done
19865IFS=$as_save_IFS
19866
19867fi
19868fi
19869CXX=$ac_cv_prog_CXX
19870if test -n "$CXX"; then
19871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
19872$as_echo "$CXX" >&6; }
19873else
19874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19875$as_echo "no" >&6; }
19876fi
19877
19878
19879    test -n "$CXX" && break
19880  done
19881fi
19882if test -z "$CXX"; then
19883  ac_ct_CXX=$CXX
19884  for ac_prog in $CXX
19885do
19886  # Extract the first word of "$ac_prog", so it can be a program name with args.
19887set dummy $ac_prog; ac_word=$2
19888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19889$as_echo_n "checking for $ac_word... " >&6; }
19890if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
19891  $as_echo_n "(cached) " >&6
19892else
19893  if test -n "$ac_ct_CXX"; then
19894  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
19895else
19896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19897for as_dir in $PATH
19898do
19899  IFS=$as_save_IFS
19900  test -z "$as_dir" && as_dir=.
19901    for ac_exec_ext in '' $ac_executable_extensions; do
19902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19903    ac_cv_prog_ac_ct_CXX="$ac_prog"
19904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19905    break 2
19906  fi
19907done
19908  done
19909IFS=$as_save_IFS
19910
19911fi
19912fi
19913ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
19914if test -n "$ac_ct_CXX"; then
19915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
19916$as_echo "$ac_ct_CXX" >&6; }
19917else
19918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19919$as_echo "no" >&6; }
19920fi
19921
19922
19923  test -n "$ac_ct_CXX" && break
19924done
19925
19926  if test "x$ac_ct_CXX" = x; then
19927    CXX="g++"
19928  else
19929    case $cross_compiling:$ac_tool_warned in
19930yes:)
19931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19933ac_tool_warned=yes ;;
19934esac
19935    CXX=$ac_ct_CXX
19936  fi
19937fi
19938
19939  fi
19940fi
19941# Provide some information about the compiler.
19942$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
19943set X $ac_compile
19944ac_compiler=$2
19945for ac_option in --version -v -V -qversion; do
19946  { { ac_try="$ac_compiler $ac_option >&5"
19947case "(($ac_try" in
19948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949  *) ac_try_echo=$ac_try;;
19950esac
19951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19952$as_echo "$ac_try_echo"; } >&5
19953  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19954  ac_status=$?
19955  if test -s conftest.err; then
19956    sed '10a\
19957... rest of stderr output deleted ...
19958         10q' conftest.err >conftest.er1
19959    cat conftest.er1 >&5
19960  fi
19961  rm -f conftest.er1 conftest.err
19962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19963  test $ac_status = 0; }
19964done
19965
19966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
19967$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
19968if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
19969  $as_echo_n "(cached) " >&6
19970else
19971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19972/* end confdefs.h.  */
19973
19974int
19975main ()
19976{
19977#ifndef __GNUC__
19978       choke me
19979#endif
19980
19981  ;
19982  return 0;
19983}
19984_ACEOF
19985if ac_fn_cxx_try_compile "$LINENO"; then :
19986  ac_compiler_gnu=yes
19987else
19988  ac_compiler_gnu=no
19989fi
19990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19991ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
19992
19993fi
19994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
19995$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
19996if test $ac_compiler_gnu = yes; then
19997  GXX=yes
19998else
19999  GXX=
20000fi
20001ac_test_CXXFLAGS=${CXXFLAGS+set}
20002ac_save_CXXFLAGS=$CXXFLAGS
20003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20004$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20005if test "${ac_cv_prog_cxx_g+set}" = set; then :
20006  $as_echo_n "(cached) " >&6
20007else
20008  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20009   ac_cxx_werror_flag=yes
20010   ac_cv_prog_cxx_g=no
20011   CXXFLAGS="-g"
20012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20013/* end confdefs.h.  */
20014
20015int
20016main ()
20017{
20018
20019  ;
20020  return 0;
20021}
20022_ACEOF
20023if ac_fn_cxx_try_compile "$LINENO"; then :
20024  ac_cv_prog_cxx_g=yes
20025else
20026  CXXFLAGS=""
20027      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20028/* end confdefs.h.  */
20029
20030int
20031main ()
20032{
20033
20034  ;
20035  return 0;
20036}
20037_ACEOF
20038if ac_fn_cxx_try_compile "$LINENO"; then :
20039
20040else
20041  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20042	 CXXFLAGS="-g"
20043	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20044/* end confdefs.h.  */
20045
20046int
20047main ()
20048{
20049
20050  ;
20051  return 0;
20052}
20053_ACEOF
20054if ac_fn_cxx_try_compile "$LINENO"; then :
20055  ac_cv_prog_cxx_g=yes
20056fi
20057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20058fi
20059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20060fi
20061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20062   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20063fi
20064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20065$as_echo "$ac_cv_prog_cxx_g" >&6; }
20066if test "$ac_test_CXXFLAGS" = set; then
20067  CXXFLAGS=$ac_save_CXXFLAGS
20068elif test $ac_cv_prog_cxx_g = yes; then
20069  if test "$GXX" = yes; then
20070    CXXFLAGS="-g -O2"
20071  else
20072    CXXFLAGS="-g"
20073  fi
20074else
20075  if test "$GXX" = yes; then
20076    CXXFLAGS="-O2"
20077  else
20078    CXXFLAGS=
20079  fi
20080fi
20081ac_ext=cpp
20082ac_cpp='$CXXCPP $CPPFLAGS'
20083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20086
20087
20088### Locate other tools
20089
20090if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20091    ac_ext=m
20092ac_cpp='$OBJCPP $CPPFLAGS'
20093ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20094ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20095ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20096if test -n "$ac_tool_prefix"; then
20097  for ac_prog in gcc objcc objc cc CC
20098  do
20099    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20100set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20102$as_echo_n "checking for $ac_word... " >&6; }
20103if test "${ac_cv_prog_OBJC+set}" = set; then :
20104  $as_echo_n "(cached) " >&6
20105else
20106  if test -n "$OBJC"; then
20107  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20108else
20109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20110for as_dir in $PATH
20111do
20112  IFS=$as_save_IFS
20113  test -z "$as_dir" && as_dir=.
20114    for ac_exec_ext in '' $ac_executable_extensions; do
20115  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20116    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20118    break 2
20119  fi
20120done
20121  done
20122IFS=$as_save_IFS
20123
20124fi
20125fi
20126OBJC=$ac_cv_prog_OBJC
20127if test -n "$OBJC"; then
20128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20129$as_echo "$OBJC" >&6; }
20130else
20131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20132$as_echo "no" >&6; }
20133fi
20134
20135
20136    test -n "$OBJC" && break
20137  done
20138fi
20139if test -z "$OBJC"; then
20140  ac_ct_OBJC=$OBJC
20141  for ac_prog in gcc objcc objc cc CC
20142do
20143  # Extract the first word of "$ac_prog", so it can be a program name with args.
20144set dummy $ac_prog; ac_word=$2
20145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20146$as_echo_n "checking for $ac_word... " >&6; }
20147if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20148  $as_echo_n "(cached) " >&6
20149else
20150  if test -n "$ac_ct_OBJC"; then
20151  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20152else
20153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20154for as_dir in $PATH
20155do
20156  IFS=$as_save_IFS
20157  test -z "$as_dir" && as_dir=.
20158    for ac_exec_ext in '' $ac_executable_extensions; do
20159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20160    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20162    break 2
20163  fi
20164done
20165  done
20166IFS=$as_save_IFS
20167
20168fi
20169fi
20170ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20171if test -n "$ac_ct_OBJC"; then
20172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20173$as_echo "$ac_ct_OBJC" >&6; }
20174else
20175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20176$as_echo "no" >&6; }
20177fi
20178
20179
20180  test -n "$ac_ct_OBJC" && break
20181done
20182
20183  if test "x$ac_ct_OBJC" = x; then
20184    OBJC="gcc"
20185  else
20186    case $cross_compiling:$ac_tool_warned in
20187yes:)
20188{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20189$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20190ac_tool_warned=yes ;;
20191esac
20192    OBJC=$ac_ct_OBJC
20193  fi
20194fi
20195
20196# Provide some information about the compiler.
20197$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20198set X $ac_compile
20199ac_compiler=$2
20200for ac_option in --version -v -V -qversion; do
20201  { { ac_try="$ac_compiler $ac_option >&5"
20202case "(($ac_try" in
20203  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20204  *) ac_try_echo=$ac_try;;
20205esac
20206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20207$as_echo "$ac_try_echo"; } >&5
20208  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20209  ac_status=$?
20210  if test -s conftest.err; then
20211    sed '10a\
20212... rest of stderr output deleted ...
20213         10q' conftest.err >conftest.er1
20214    cat conftest.er1 >&5
20215  fi
20216  rm -f conftest.er1 conftest.err
20217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20218  test $ac_status = 0; }
20219done
20220
20221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20222$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20223if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20224  $as_echo_n "(cached) " >&6
20225else
20226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20227/* end confdefs.h.  */
20228
20229int
20230main ()
20231{
20232#ifndef __GNUC__
20233       choke me
20234#endif
20235
20236  ;
20237  return 0;
20238}
20239_ACEOF
20240if ac_fn_objc_try_compile "$LINENO"; then :
20241  ac_compiler_gnu=yes
20242else
20243  ac_compiler_gnu=no
20244fi
20245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20246ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20247
20248fi
20249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20250$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20251if test $ac_compiler_gnu = yes; then
20252  GOBJC=yes
20253else
20254  GOBJC=
20255fi
20256ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20257ac_save_OBJCFLAGS=$OBJCFLAGS
20258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20259$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20260if test "${ac_cv_prog_objc_g+set}" = set; then :
20261  $as_echo_n "(cached) " >&6
20262else
20263  ac_save_objc_werror_flag=$ac_objc_werror_flag
20264   ac_objc_werror_flag=yes
20265   ac_cv_prog_objc_g=no
20266   OBJCFLAGS="-g"
20267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20268/* end confdefs.h.  */
20269
20270int
20271main ()
20272{
20273
20274  ;
20275  return 0;
20276}
20277_ACEOF
20278if ac_fn_objc_try_compile "$LINENO"; then :
20279  ac_cv_prog_objc_g=yes
20280else
20281  OBJCFLAGS=""
20282      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20283/* end confdefs.h.  */
20284
20285int
20286main ()
20287{
20288
20289  ;
20290  return 0;
20291}
20292_ACEOF
20293if ac_fn_objc_try_compile "$LINENO"; then :
20294
20295else
20296  ac_objc_werror_flag=$ac_save_objc_werror_flag
20297	 OBJCFLAGS="-g"
20298	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20299/* end confdefs.h.  */
20300
20301int
20302main ()
20303{
20304
20305  ;
20306  return 0;
20307}
20308_ACEOF
20309if ac_fn_objc_try_compile "$LINENO"; then :
20310  ac_cv_prog_objc_g=yes
20311fi
20312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20313fi
20314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20315fi
20316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20317   ac_objc_werror_flag=$ac_save_objc_werror_flag
20318fi
20319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20320$as_echo "$ac_cv_prog_objc_g" >&6; }
20321if test "$ac_test_OBJCFLAGS" = set; then
20322  OBJCFLAGS=$ac_save_OBJCFLAGS
20323elif test $ac_cv_prog_objc_g = yes; then
20324  if test "$GOBJC" = yes; then
20325    OBJCFLAGS="-g -O2"
20326  else
20327    OBJCFLAGS="-g"
20328  fi
20329else
20330  if test "$GOBJC" = yes; then
20331    OBJCFLAGS="-O2"
20332  else
20333    OBJCFLAGS=
20334  fi
20335fi
20336ac_ext=cpp
20337ac_cpp='$CXXCPP $CPPFLAGS'
20338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20341
20342
20343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20344
20345  # First separate the path from the arguments. This will split at the first
20346  # space.
20347  complete="$OBJC"
20348  path="${complete%% *}"
20349  tmp="$complete EOL"
20350  arguments="${tmp#* }"
20351
20352  # Input might be given as Windows format, start by converting to
20353  # unix format.
20354  new_path=`$CYGPATH -u "$path"`
20355
20356  # Now try to locate executable using which
20357  new_path=`$WHICH "$new_path" 2> /dev/null`
20358  if test "x$new_path" = x; then
20359    # Oops. Which didn't find the executable.
20360    # The splitting of arguments from the executable at a space might have been incorrect,
20361    # since paths with space are more likely in Windows. Give it another try with the whole
20362    # argument.
20363    path="$complete"
20364    arguments="EOL"
20365    new_path=`$CYGPATH -u "$path"`
20366    new_path=`$WHICH "$new_path" 2> /dev/null`
20367    if test "x$new_path" = x; then
20368      # It's still not found. Now this is an unrecoverable error.
20369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20370$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20371      has_space=`$ECHO "$complete" | $GREP " "`
20372      if test "x$has_space" != x; then
20373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20375      fi
20376      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20377    fi
20378  fi
20379
20380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20383  # "foo.exe" is OK but "foo" is an error.
20384  #
20385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20386  # It is also a way to make sure we got the proper file name for the real test later on.
20387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20388  if test "x$test_shortpath" = x; then
20389    # Short path failed, file does not exist as specified.
20390    # Try adding .exe or .cmd
20391    if test -f "${new_path}.exe"; then
20392       input_to_shortpath="${new_path}.exe"
20393    elif test -f "${new_path}.cmd"; then
20394       input_to_shortpath="${new_path}.cmd"
20395    else
20396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20397$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20400      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20401    fi
20402  else
20403    input_to_shortpath="$new_path"
20404  fi
20405
20406  # Call helper function which possibly converts this using DOS-style short mode.
20407  # If so, the updated path is stored in $new_path.
20408  new_path="$input_to_shortpath"
20409
20410  input_path="$input_to_shortpath"
20411  # Check if we need to convert this using DOS-style short mode. If the path
20412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20413  # take no chances and rewrite it.
20414  # Note: m4 eats our [], so we need to use [ and ] instead.
20415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20416  if test "x$has_forbidden_chars" != x; then
20417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20421      # Going to short mode and back again did indeed matter. Since short mode is
20422      # case insensitive, let's make it lowercase to improve readability.
20423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20424      # Now convert it back to Unix-stile (cygpath)
20425      input_path=`$CYGPATH -u "$shortmode_path"`
20426      new_path="$input_path"
20427    fi
20428  fi
20429
20430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20431  if test "x$test_cygdrive_prefix" = x; then
20432    # As a simple fix, exclude /usr/bin since it's not a real path.
20433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20435      # a path prefixed by /cygdrive for fixpath to work.
20436      new_path="$CYGWIN_ROOT_PATH$input_path"
20437    fi
20438  fi
20439
20440  # remove trailing .exe if any
20441  new_path="${new_path/%.exe/}"
20442
20443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20444
20445  # First separate the path from the arguments. This will split at the first
20446  # space.
20447  complete="$OBJC"
20448  path="${complete%% *}"
20449  tmp="$complete EOL"
20450  arguments="${tmp#* }"
20451
20452  # Input might be given as Windows format, start by converting to
20453  # unix format.
20454  new_path="$path"
20455
20456  windows_path="$new_path"
20457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20458    unix_path=`$CYGPATH -u "$windows_path"`
20459    new_path="$unix_path"
20460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20462    new_path="$unix_path"
20463  fi
20464
20465
20466  # Now try to locate executable using which
20467  new_path=`$WHICH "$new_path" 2> /dev/null`
20468
20469  if test "x$new_path" = x; then
20470    # Oops. Which didn't find the executable.
20471    # The splitting of arguments from the executable at a space might have been incorrect,
20472    # since paths with space are more likely in Windows. Give it another try with the whole
20473    # argument.
20474    path="$complete"
20475    arguments="EOL"
20476    new_path="$path"
20477
20478  windows_path="$new_path"
20479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20480    unix_path=`$CYGPATH -u "$windows_path"`
20481    new_path="$unix_path"
20482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20484    new_path="$unix_path"
20485  fi
20486
20487
20488    new_path=`$WHICH "$new_path" 2> /dev/null`
20489
20490    if test "x$new_path" = x; then
20491      # It's still not found. Now this is an unrecoverable error.
20492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20493$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20494      has_space=`$ECHO "$complete" | $GREP " "`
20495      if test "x$has_space" != x; then
20496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20498      fi
20499      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20500    fi
20501  fi
20502
20503  # Now new_path has a complete unix path to the binary
20504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20505    # Keep paths in /bin as-is, but remove trailing .exe if any
20506    new_path="${new_path/%.exe/}"
20507    # Do not save /bin paths to all_fixpath_prefixes!
20508  else
20509    # Not in mixed or Windows style, start by that.
20510    new_path=`cmd //c echo $new_path`
20511
20512  input_path="$new_path"
20513  # Check if we need to convert this using DOS-style short mode. If the path
20514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20515  # take no chances and rewrite it.
20516  # Note: m4 eats our [], so we need to use [ and ] instead.
20517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20518  if test "x$has_forbidden_chars" != x; then
20519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20521  fi
20522
20523    # Output is in $new_path
20524
20525  windows_path="$new_path"
20526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20527    unix_path=`$CYGPATH -u "$windows_path"`
20528    new_path="$unix_path"
20529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20531    new_path="$unix_path"
20532  fi
20533
20534    # remove trailing .exe if any
20535    new_path="${new_path/%.exe/}"
20536
20537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20539  fi
20540
20541  else
20542    # We're on a posix platform. Hooray! :)
20543    # First separate the path from the arguments. This will split at the first
20544    # space.
20545    complete="$OBJC"
20546    path="${complete%% *}"
20547    tmp="$complete EOL"
20548    arguments="${tmp#* }"
20549
20550    new_path=`$WHICH $path 2> /dev/null`
20551    if test "x$new_path" = x; then
20552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20553      if test "x$is_absolute_path" != x; then
20554        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20555$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20556        new_path="$path"
20557      else
20558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20559$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20560        has_space=`$ECHO "$complete" | $GREP " "`
20561        if test "x$has_space" != x; then
20562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20564        fi
20565        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20566      fi
20567    fi
20568  fi
20569
20570  # Now join together the path and the arguments once again
20571  if test "x$arguments" != xEOL; then
20572      new_complete="$new_path ${arguments% *}"
20573  else
20574      new_complete="$new_path"
20575  fi
20576
20577  if test "x$complete" != "x$new_complete"; then
20578    OBJC="$new_complete"
20579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20580$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20581  fi
20582
20583else
20584    OBJC=
20585fi
20586
20587# Restore the flags to the user specified values.
20588# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20589CFLAGS="$ORG_CFLAGS"
20590CXXFLAGS="$ORG_CXXFLAGS"
20591OBJCFLAGS="$ORG_OBJCFLAGS"
20592
20593LD="$CC"
20594LDEXE="$CC"
20595LDCXX="$CXX"
20596LDEXECXX="$CXX"
20597
20598# LDEXE is the linker to use, when creating executables.
20599
20600# Linking C++ libraries.
20601
20602# Linking C++ executables.
20603
20604
20605if test "x$OPENJDK_TARGET_OS" != xwindows; then
20606    if test -n "$ac_tool_prefix"; then
20607  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20608set dummy ${ac_tool_prefix}ar; ac_word=$2
20609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20610$as_echo_n "checking for $ac_word... " >&6; }
20611if test "${ac_cv_prog_AR+set}" = set; then :
20612  $as_echo_n "(cached) " >&6
20613else
20614  if test -n "$AR"; then
20615  ac_cv_prog_AR="$AR" # Let the user override the test.
20616else
20617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20618for as_dir in $PATH
20619do
20620  IFS=$as_save_IFS
20621  test -z "$as_dir" && as_dir=.
20622    for ac_exec_ext in '' $ac_executable_extensions; do
20623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20624    ac_cv_prog_AR="${ac_tool_prefix}ar"
20625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20626    break 2
20627  fi
20628done
20629  done
20630IFS=$as_save_IFS
20631
20632fi
20633fi
20634AR=$ac_cv_prog_AR
20635if test -n "$AR"; then
20636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20637$as_echo "$AR" >&6; }
20638else
20639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20640$as_echo "no" >&6; }
20641fi
20642
20643
20644fi
20645if test -z "$ac_cv_prog_AR"; then
20646  ac_ct_AR=$AR
20647  # Extract the first word of "ar", so it can be a program name with args.
20648set dummy ar; ac_word=$2
20649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20650$as_echo_n "checking for $ac_word... " >&6; }
20651if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20652  $as_echo_n "(cached) " >&6
20653else
20654  if test -n "$ac_ct_AR"; then
20655  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20656else
20657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20658for as_dir in $PATH
20659do
20660  IFS=$as_save_IFS
20661  test -z "$as_dir" && as_dir=.
20662    for ac_exec_ext in '' $ac_executable_extensions; do
20663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20664    ac_cv_prog_ac_ct_AR="ar"
20665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20666    break 2
20667  fi
20668done
20669  done
20670IFS=$as_save_IFS
20671
20672fi
20673fi
20674ac_ct_AR=$ac_cv_prog_ac_ct_AR
20675if test -n "$ac_ct_AR"; then
20676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20677$as_echo "$ac_ct_AR" >&6; }
20678else
20679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20680$as_echo "no" >&6; }
20681fi
20682
20683  if test "x$ac_ct_AR" = x; then
20684    AR=""
20685  else
20686    case $cross_compiling:$ac_tool_warned in
20687yes:)
20688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20690ac_tool_warned=yes ;;
20691esac
20692    AR=$ac_ct_AR
20693  fi
20694else
20695  AR="$ac_cv_prog_AR"
20696fi
20697
20698
20699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20700
20701  # First separate the path from the arguments. This will split at the first
20702  # space.
20703  complete="$AR"
20704  path="${complete%% *}"
20705  tmp="$complete EOL"
20706  arguments="${tmp#* }"
20707
20708  # Input might be given as Windows format, start by converting to
20709  # unix format.
20710  new_path=`$CYGPATH -u "$path"`
20711
20712  # Now try to locate executable using which
20713  new_path=`$WHICH "$new_path" 2> /dev/null`
20714  if test "x$new_path" = x; then
20715    # Oops. Which didn't find the executable.
20716    # The splitting of arguments from the executable at a space might have been incorrect,
20717    # since paths with space are more likely in Windows. Give it another try with the whole
20718    # argument.
20719    path="$complete"
20720    arguments="EOL"
20721    new_path=`$CYGPATH -u "$path"`
20722    new_path=`$WHICH "$new_path" 2> /dev/null`
20723    if test "x$new_path" = x; then
20724      # It's still not found. Now this is an unrecoverable error.
20725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20726$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20727      has_space=`$ECHO "$complete" | $GREP " "`
20728      if test "x$has_space" != x; then
20729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20731      fi
20732      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20733    fi
20734  fi
20735
20736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20739  # "foo.exe" is OK but "foo" is an error.
20740  #
20741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20742  # It is also a way to make sure we got the proper file name for the real test later on.
20743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20744  if test "x$test_shortpath" = x; then
20745    # Short path failed, file does not exist as specified.
20746    # Try adding .exe or .cmd
20747    if test -f "${new_path}.exe"; then
20748       input_to_shortpath="${new_path}.exe"
20749    elif test -f "${new_path}.cmd"; then
20750       input_to_shortpath="${new_path}.cmd"
20751    else
20752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
20753$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
20754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20756      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20757    fi
20758  else
20759    input_to_shortpath="$new_path"
20760  fi
20761
20762  # Call helper function which possibly converts this using DOS-style short mode.
20763  # If so, the updated path is stored in $new_path.
20764  new_path="$input_to_shortpath"
20765
20766  input_path="$input_to_shortpath"
20767  # Check if we need to convert this using DOS-style short mode. If the path
20768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20769  # take no chances and rewrite it.
20770  # Note: m4 eats our [], so we need to use [ and ] instead.
20771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20772  if test "x$has_forbidden_chars" != x; then
20773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20777      # Going to short mode and back again did indeed matter. Since short mode is
20778      # case insensitive, let's make it lowercase to improve readability.
20779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20780      # Now convert it back to Unix-stile (cygpath)
20781      input_path=`$CYGPATH -u "$shortmode_path"`
20782      new_path="$input_path"
20783    fi
20784  fi
20785
20786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20787  if test "x$test_cygdrive_prefix" = x; then
20788    # As a simple fix, exclude /usr/bin since it's not a real path.
20789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20791      # a path prefixed by /cygdrive for fixpath to work.
20792      new_path="$CYGWIN_ROOT_PATH$input_path"
20793    fi
20794  fi
20795
20796  # remove trailing .exe if any
20797  new_path="${new_path/%.exe/}"
20798
20799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20800
20801  # First separate the path from the arguments. This will split at the first
20802  # space.
20803  complete="$AR"
20804  path="${complete%% *}"
20805  tmp="$complete EOL"
20806  arguments="${tmp#* }"
20807
20808  # Input might be given as Windows format, start by converting to
20809  # unix format.
20810  new_path="$path"
20811
20812  windows_path="$new_path"
20813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20814    unix_path=`$CYGPATH -u "$windows_path"`
20815    new_path="$unix_path"
20816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20818    new_path="$unix_path"
20819  fi
20820
20821
20822  # Now try to locate executable using which
20823  new_path=`$WHICH "$new_path" 2> /dev/null`
20824
20825  if test "x$new_path" = x; then
20826    # Oops. Which didn't find the executable.
20827    # The splitting of arguments from the executable at a space might have been incorrect,
20828    # since paths with space are more likely in Windows. Give it another try with the whole
20829    # argument.
20830    path="$complete"
20831    arguments="EOL"
20832    new_path="$path"
20833
20834  windows_path="$new_path"
20835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20836    unix_path=`$CYGPATH -u "$windows_path"`
20837    new_path="$unix_path"
20838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20840    new_path="$unix_path"
20841  fi
20842
20843
20844    new_path=`$WHICH "$new_path" 2> /dev/null`
20845
20846    if test "x$new_path" = x; then
20847      # It's still not found. Now this is an unrecoverable error.
20848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20849$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20850      has_space=`$ECHO "$complete" | $GREP " "`
20851      if test "x$has_space" != x; then
20852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20854      fi
20855      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20856    fi
20857  fi
20858
20859  # Now new_path has a complete unix path to the binary
20860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20861    # Keep paths in /bin as-is, but remove trailing .exe if any
20862    new_path="${new_path/%.exe/}"
20863    # Do not save /bin paths to all_fixpath_prefixes!
20864  else
20865    # Not in mixed or Windows style, start by that.
20866    new_path=`cmd //c echo $new_path`
20867
20868  input_path="$new_path"
20869  # Check if we need to convert this using DOS-style short mode. If the path
20870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20871  # take no chances and rewrite it.
20872  # Note: m4 eats our [], so we need to use [ and ] instead.
20873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20874  if test "x$has_forbidden_chars" != x; then
20875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20877  fi
20878
20879    # Output is in $new_path
20880
20881  windows_path="$new_path"
20882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20883    unix_path=`$CYGPATH -u "$windows_path"`
20884    new_path="$unix_path"
20885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20887    new_path="$unix_path"
20888  fi
20889
20890    # remove trailing .exe if any
20891    new_path="${new_path/%.exe/}"
20892
20893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20895  fi
20896
20897  else
20898    # We're on a posix platform. Hooray! :)
20899    # First separate the path from the arguments. This will split at the first
20900    # space.
20901    complete="$AR"
20902    path="${complete%% *}"
20903    tmp="$complete EOL"
20904    arguments="${tmp#* }"
20905
20906    new_path=`$WHICH $path 2> /dev/null`
20907    if test "x$new_path" = x; then
20908      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20909      if test "x$is_absolute_path" != x; then
20910        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
20911$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
20912        new_path="$path"
20913      else
20914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
20915$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
20916        has_space=`$ECHO "$complete" | $GREP " "`
20917        if test "x$has_space" != x; then
20918          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20920        fi
20921        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
20922      fi
20923    fi
20924  fi
20925
20926  # Now join together the path and the arguments once again
20927  if test "x$arguments" != xEOL; then
20928      new_complete="$new_path ${arguments% *}"
20929  else
20930      new_complete="$new_path"
20931  fi
20932
20933  if test "x$complete" != "x$new_complete"; then
20934    AR="$new_complete"
20935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
20936$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
20937  fi
20938
20939fi
20940if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20941    ARFLAGS="-r"
20942else
20943    ARFLAGS=""
20944fi
20945
20946
20947# For hotspot, we need these in Windows mixed path; other platforms keep them the same
20948HOTSPOT_CXX="$CXX"
20949HOTSPOT_LD="$LD"
20950
20951
20952
20953COMPILER_NAME=gcc
20954COMPILER_TYPE=CC
20955if test "x$OPENJDK_TARGET_OS" = xwindows; then :
20956
20957    # For now, assume that we are always compiling using cl.exe.
20958    CC_OUT_OPTION=-Fo
20959    EXE_OUT_OPTION=-out:
20960    LD_OUT_OPTION=-out:
20961    AR_OUT_OPTION=-out:
20962    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
20963    # program for something completely different.
20964    # Extract the first word of "link", so it can be a program name with args.
20965set dummy link; ac_word=$2
20966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20967$as_echo_n "checking for $ac_word... " >&6; }
20968if test "${ac_cv_prog_WINLD+set}" = set; then :
20969  $as_echo_n "(cached) " >&6
20970else
20971  if test -n "$WINLD"; then
20972  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
20973else
20974  ac_prog_rejected=no
20975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20976for as_dir in $PATH
20977do
20978  IFS=$as_save_IFS
20979  test -z "$as_dir" && as_dir=.
20980    for ac_exec_ext in '' $ac_executable_extensions; do
20981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20982    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
20983       ac_prog_rejected=yes
20984       continue
20985     fi
20986    ac_cv_prog_WINLD="link"
20987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20988    break 2
20989  fi
20990done
20991  done
20992IFS=$as_save_IFS
20993
20994if test $ac_prog_rejected = yes; then
20995  # We found a bogon in the path, so make sure we never use it.
20996  set dummy $ac_cv_prog_WINLD
20997  shift
20998  if test $# != 0; then
20999    # We chose a different compiler from the bogus one.
21000    # However, it has the same basename, so the bogon will be chosen
21001    # first if we set WINLD to just the basename; use the full file name.
21002    shift
21003    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21004  fi
21005fi
21006fi
21007fi
21008WINLD=$ac_cv_prog_WINLD
21009if test -n "$WINLD"; then
21010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21011$as_echo "$WINLD" >&6; }
21012else
21013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21014$as_echo "no" >&6; }
21015fi
21016
21017
21018    # Since we must ignore the first found link, WINLD will contain
21019    # the full path to the link.exe program.
21020
21021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21022
21023  # First separate the path from the arguments. This will split at the first
21024  # space.
21025  complete="$WINLD"
21026  path="${complete%% *}"
21027  tmp="$complete EOL"
21028  arguments="${tmp#* }"
21029
21030  # Input might be given as Windows format, start by converting to
21031  # unix format.
21032  new_path=`$CYGPATH -u "$path"`
21033
21034  # Now try to locate executable using which
21035  new_path=`$WHICH "$new_path" 2> /dev/null`
21036  if test "x$new_path" = x; then
21037    # Oops. Which didn't find the executable.
21038    # The splitting of arguments from the executable at a space might have been incorrect,
21039    # since paths with space are more likely in Windows. Give it another try with the whole
21040    # argument.
21041    path="$complete"
21042    arguments="EOL"
21043    new_path=`$CYGPATH -u "$path"`
21044    new_path=`$WHICH "$new_path" 2> /dev/null`
21045    if test "x$new_path" = x; then
21046      # It's still not found. Now this is an unrecoverable error.
21047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21048$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21049      has_space=`$ECHO "$complete" | $GREP " "`
21050      if test "x$has_space" != x; then
21051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21053      fi
21054      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21055    fi
21056  fi
21057
21058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21061  # "foo.exe" is OK but "foo" is an error.
21062  #
21063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21064  # It is also a way to make sure we got the proper file name for the real test later on.
21065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21066  if test "x$test_shortpath" = x; then
21067    # Short path failed, file does not exist as specified.
21068    # Try adding .exe or .cmd
21069    if test -f "${new_path}.exe"; then
21070       input_to_shortpath="${new_path}.exe"
21071    elif test -f "${new_path}.cmd"; then
21072       input_to_shortpath="${new_path}.cmd"
21073    else
21074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21075$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21078      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21079    fi
21080  else
21081    input_to_shortpath="$new_path"
21082  fi
21083
21084  # Call helper function which possibly converts this using DOS-style short mode.
21085  # If so, the updated path is stored in $new_path.
21086  new_path="$input_to_shortpath"
21087
21088  input_path="$input_to_shortpath"
21089  # Check if we need to convert this using DOS-style short mode. If the path
21090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21091  # take no chances and rewrite it.
21092  # Note: m4 eats our [], so we need to use [ and ] instead.
21093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21094  if test "x$has_forbidden_chars" != x; then
21095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21099      # Going to short mode and back again did indeed matter. Since short mode is
21100      # case insensitive, let's make it lowercase to improve readability.
21101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21102      # Now convert it back to Unix-stile (cygpath)
21103      input_path=`$CYGPATH -u "$shortmode_path"`
21104      new_path="$input_path"
21105    fi
21106  fi
21107
21108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21109  if test "x$test_cygdrive_prefix" = x; then
21110    # As a simple fix, exclude /usr/bin since it's not a real path.
21111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21113      # a path prefixed by /cygdrive for fixpath to work.
21114      new_path="$CYGWIN_ROOT_PATH$input_path"
21115    fi
21116  fi
21117
21118  # remove trailing .exe if any
21119  new_path="${new_path/%.exe/}"
21120
21121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21122
21123  # First separate the path from the arguments. This will split at the first
21124  # space.
21125  complete="$WINLD"
21126  path="${complete%% *}"
21127  tmp="$complete EOL"
21128  arguments="${tmp#* }"
21129
21130  # Input might be given as Windows format, start by converting to
21131  # unix format.
21132  new_path="$path"
21133
21134  windows_path="$new_path"
21135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21136    unix_path=`$CYGPATH -u "$windows_path"`
21137    new_path="$unix_path"
21138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21140    new_path="$unix_path"
21141  fi
21142
21143
21144  # Now try to locate executable using which
21145  new_path=`$WHICH "$new_path" 2> /dev/null`
21146
21147  if test "x$new_path" = x; then
21148    # Oops. Which didn't find the executable.
21149    # The splitting of arguments from the executable at a space might have been incorrect,
21150    # since paths with space are more likely in Windows. Give it another try with the whole
21151    # argument.
21152    path="$complete"
21153    arguments="EOL"
21154    new_path="$path"
21155
21156  windows_path="$new_path"
21157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21158    unix_path=`$CYGPATH -u "$windows_path"`
21159    new_path="$unix_path"
21160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21162    new_path="$unix_path"
21163  fi
21164
21165
21166    new_path=`$WHICH "$new_path" 2> /dev/null`
21167
21168    if test "x$new_path" = x; then
21169      # It's still not found. Now this is an unrecoverable error.
21170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21171$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21172      has_space=`$ECHO "$complete" | $GREP " "`
21173      if test "x$has_space" != x; then
21174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21176      fi
21177      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21178    fi
21179  fi
21180
21181  # Now new_path has a complete unix path to the binary
21182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21183    # Keep paths in /bin as-is, but remove trailing .exe if any
21184    new_path="${new_path/%.exe/}"
21185    # Do not save /bin paths to all_fixpath_prefixes!
21186  else
21187    # Not in mixed or Windows style, start by that.
21188    new_path=`cmd //c echo $new_path`
21189
21190  input_path="$new_path"
21191  # Check if we need to convert this using DOS-style short mode. If the path
21192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21193  # take no chances and rewrite it.
21194  # Note: m4 eats our [], so we need to use [ and ] instead.
21195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21196  if test "x$has_forbidden_chars" != x; then
21197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21199  fi
21200
21201    # Output is in $new_path
21202
21203  windows_path="$new_path"
21204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21205    unix_path=`$CYGPATH -u "$windows_path"`
21206    new_path="$unix_path"
21207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21209    new_path="$unix_path"
21210  fi
21211
21212    # remove trailing .exe if any
21213    new_path="${new_path/%.exe/}"
21214
21215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21217  fi
21218
21219  else
21220    # We're on a posix platform. Hooray! :)
21221    # First separate the path from the arguments. This will split at the first
21222    # space.
21223    complete="$WINLD"
21224    path="${complete%% *}"
21225    tmp="$complete EOL"
21226    arguments="${tmp#* }"
21227
21228    new_path=`$WHICH $path 2> /dev/null`
21229    if test "x$new_path" = x; then
21230      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21231      if test "x$is_absolute_path" != x; then
21232        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21233$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21234        new_path="$path"
21235      else
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21237$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21238        has_space=`$ECHO "$complete" | $GREP " "`
21239        if test "x$has_space" != x; then
21240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21242        fi
21243        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21244      fi
21245    fi
21246  fi
21247
21248  # Now join together the path and the arguments once again
21249  if test "x$arguments" != xEOL; then
21250      new_complete="$new_path ${arguments% *}"
21251  else
21252      new_complete="$new_path"
21253  fi
21254
21255  if test "x$complete" != "x$new_complete"; then
21256    WINLD="$new_complete"
21257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21258$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21259  fi
21260
21261    printf "Windows linker was found at $WINLD\n"
21262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21263$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21264    "$WINLD" --version > /dev/null
21265    if test $? -eq 0 ; then
21266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21267$as_echo "no" >&6; }
21268      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21269    else
21270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21271$as_echo "yes" >&6; }
21272    fi
21273    LD="$WINLD"
21274    LDEXE="$WINLD"
21275    LDCXX="$WINLD"
21276    LDEXECXX="$WINLD"
21277
21278    # Extract the first word of "mt", so it can be a program name with args.
21279set dummy mt; ac_word=$2
21280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21281$as_echo_n "checking for $ac_word... " >&6; }
21282if test "${ac_cv_prog_MT+set}" = set; then :
21283  $as_echo_n "(cached) " >&6
21284else
21285  if test -n "$MT"; then
21286  ac_cv_prog_MT="$MT" # Let the user override the test.
21287else
21288  ac_prog_rejected=no
21289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21290for as_dir in $PATH
21291do
21292  IFS=$as_save_IFS
21293  test -z "$as_dir" && as_dir=.
21294    for ac_exec_ext in '' $ac_executable_extensions; do
21295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21296    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21297       ac_prog_rejected=yes
21298       continue
21299     fi
21300    ac_cv_prog_MT="mt"
21301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21302    break 2
21303  fi
21304done
21305  done
21306IFS=$as_save_IFS
21307
21308if test $ac_prog_rejected = yes; then
21309  # We found a bogon in the path, so make sure we never use it.
21310  set dummy $ac_cv_prog_MT
21311  shift
21312  if test $# != 0; then
21313    # We chose a different compiler from the bogus one.
21314    # However, it has the same basename, so the bogon will be chosen
21315    # first if we set MT to just the basename; use the full file name.
21316    shift
21317    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21318  fi
21319fi
21320fi
21321fi
21322MT=$ac_cv_prog_MT
21323if test -n "$MT"; then
21324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21325$as_echo "$MT" >&6; }
21326else
21327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21328$as_echo "no" >&6; }
21329fi
21330
21331
21332
21333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21334
21335  # First separate the path from the arguments. This will split at the first
21336  # space.
21337  complete="$MT"
21338  path="${complete%% *}"
21339  tmp="$complete EOL"
21340  arguments="${tmp#* }"
21341
21342  # Input might be given as Windows format, start by converting to
21343  # unix format.
21344  new_path=`$CYGPATH -u "$path"`
21345
21346  # Now try to locate executable using which
21347  new_path=`$WHICH "$new_path" 2> /dev/null`
21348  if test "x$new_path" = x; then
21349    # Oops. Which didn't find the executable.
21350    # The splitting of arguments from the executable at a space might have been incorrect,
21351    # since paths with space are more likely in Windows. Give it another try with the whole
21352    # argument.
21353    path="$complete"
21354    arguments="EOL"
21355    new_path=`$CYGPATH -u "$path"`
21356    new_path=`$WHICH "$new_path" 2> /dev/null`
21357    if test "x$new_path" = x; then
21358      # It's still not found. Now this is an unrecoverable error.
21359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21360$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21361      has_space=`$ECHO "$complete" | $GREP " "`
21362      if test "x$has_space" != x; then
21363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21365      fi
21366      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21367    fi
21368  fi
21369
21370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21373  # "foo.exe" is OK but "foo" is an error.
21374  #
21375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21376  # It is also a way to make sure we got the proper file name for the real test later on.
21377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21378  if test "x$test_shortpath" = x; then
21379    # Short path failed, file does not exist as specified.
21380    # Try adding .exe or .cmd
21381    if test -f "${new_path}.exe"; then
21382       input_to_shortpath="${new_path}.exe"
21383    elif test -f "${new_path}.cmd"; then
21384       input_to_shortpath="${new_path}.cmd"
21385    else
21386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21387$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21390      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21391    fi
21392  else
21393    input_to_shortpath="$new_path"
21394  fi
21395
21396  # Call helper function which possibly converts this using DOS-style short mode.
21397  # If so, the updated path is stored in $new_path.
21398  new_path="$input_to_shortpath"
21399
21400  input_path="$input_to_shortpath"
21401  # Check if we need to convert this using DOS-style short mode. If the path
21402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21403  # take no chances and rewrite it.
21404  # Note: m4 eats our [], so we need to use [ and ] instead.
21405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21406  if test "x$has_forbidden_chars" != x; then
21407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21411      # Going to short mode and back again did indeed matter. Since short mode is
21412      # case insensitive, let's make it lowercase to improve readability.
21413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21414      # Now convert it back to Unix-stile (cygpath)
21415      input_path=`$CYGPATH -u "$shortmode_path"`
21416      new_path="$input_path"
21417    fi
21418  fi
21419
21420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21421  if test "x$test_cygdrive_prefix" = x; then
21422    # As a simple fix, exclude /usr/bin since it's not a real path.
21423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21425      # a path prefixed by /cygdrive for fixpath to work.
21426      new_path="$CYGWIN_ROOT_PATH$input_path"
21427    fi
21428  fi
21429
21430  # remove trailing .exe if any
21431  new_path="${new_path/%.exe/}"
21432
21433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21434
21435  # First separate the path from the arguments. This will split at the first
21436  # space.
21437  complete="$MT"
21438  path="${complete%% *}"
21439  tmp="$complete EOL"
21440  arguments="${tmp#* }"
21441
21442  # Input might be given as Windows format, start by converting to
21443  # unix format.
21444  new_path="$path"
21445
21446  windows_path="$new_path"
21447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21448    unix_path=`$CYGPATH -u "$windows_path"`
21449    new_path="$unix_path"
21450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21452    new_path="$unix_path"
21453  fi
21454
21455
21456  # Now try to locate executable using which
21457  new_path=`$WHICH "$new_path" 2> /dev/null`
21458
21459  if test "x$new_path" = x; then
21460    # Oops. Which didn't find the executable.
21461    # The splitting of arguments from the executable at a space might have been incorrect,
21462    # since paths with space are more likely in Windows. Give it another try with the whole
21463    # argument.
21464    path="$complete"
21465    arguments="EOL"
21466    new_path="$path"
21467
21468  windows_path="$new_path"
21469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21470    unix_path=`$CYGPATH -u "$windows_path"`
21471    new_path="$unix_path"
21472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21474    new_path="$unix_path"
21475  fi
21476
21477
21478    new_path=`$WHICH "$new_path" 2> /dev/null`
21479
21480    if test "x$new_path" = x; then
21481      # It's still not found. Now this is an unrecoverable error.
21482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21483$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21484      has_space=`$ECHO "$complete" | $GREP " "`
21485      if test "x$has_space" != x; then
21486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21488      fi
21489      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21490    fi
21491  fi
21492
21493  # Now new_path has a complete unix path to the binary
21494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21495    # Keep paths in /bin as-is, but remove trailing .exe if any
21496    new_path="${new_path/%.exe/}"
21497    # Do not save /bin paths to all_fixpath_prefixes!
21498  else
21499    # Not in mixed or Windows style, start by that.
21500    new_path=`cmd //c echo $new_path`
21501
21502  input_path="$new_path"
21503  # Check if we need to convert this using DOS-style short mode. If the path
21504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21505  # take no chances and rewrite it.
21506  # Note: m4 eats our [], so we need to use [ and ] instead.
21507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21508  if test "x$has_forbidden_chars" != x; then
21509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21511  fi
21512
21513    # Output is in $new_path
21514
21515  windows_path="$new_path"
21516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21517    unix_path=`$CYGPATH -u "$windows_path"`
21518    new_path="$unix_path"
21519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21521    new_path="$unix_path"
21522  fi
21523
21524    # remove trailing .exe if any
21525    new_path="${new_path/%.exe/}"
21526
21527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21529  fi
21530
21531  else
21532    # We're on a posix platform. Hooray! :)
21533    # First separate the path from the arguments. This will split at the first
21534    # space.
21535    complete="$MT"
21536    path="${complete%% *}"
21537    tmp="$complete EOL"
21538    arguments="${tmp#* }"
21539
21540    new_path=`$WHICH $path 2> /dev/null`
21541    if test "x$new_path" = x; then
21542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21543      if test "x$is_absolute_path" != x; then
21544        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21545$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21546        new_path="$path"
21547      else
21548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21549$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21550        has_space=`$ECHO "$complete" | $GREP " "`
21551        if test "x$has_space" != x; then
21552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21554        fi
21555        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21556      fi
21557    fi
21558  fi
21559
21560  # Now join together the path and the arguments once again
21561  if test "x$arguments" != xEOL; then
21562      new_complete="$new_path ${arguments% *}"
21563  else
21564      new_complete="$new_path"
21565  fi
21566
21567  if test "x$complete" != "x$new_complete"; then
21568    MT="$new_complete"
21569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21570$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21571  fi
21572
21573    # The resource compiler
21574    # Extract the first word of "rc", so it can be a program name with args.
21575set dummy rc; ac_word=$2
21576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21577$as_echo_n "checking for $ac_word... " >&6; }
21578if test "${ac_cv_prog_RC+set}" = set; then :
21579  $as_echo_n "(cached) " >&6
21580else
21581  if test -n "$RC"; then
21582  ac_cv_prog_RC="$RC" # Let the user override the test.
21583else
21584  ac_prog_rejected=no
21585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21586for as_dir in $PATH
21587do
21588  IFS=$as_save_IFS
21589  test -z "$as_dir" && as_dir=.
21590    for ac_exec_ext in '' $ac_executable_extensions; do
21591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21592    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21593       ac_prog_rejected=yes
21594       continue
21595     fi
21596    ac_cv_prog_RC="rc"
21597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21598    break 2
21599  fi
21600done
21601  done
21602IFS=$as_save_IFS
21603
21604if test $ac_prog_rejected = yes; then
21605  # We found a bogon in the path, so make sure we never use it.
21606  set dummy $ac_cv_prog_RC
21607  shift
21608  if test $# != 0; then
21609    # We chose a different compiler from the bogus one.
21610    # However, it has the same basename, so the bogon will be chosen
21611    # first if we set RC to just the basename; use the full file name.
21612    shift
21613    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21614  fi
21615fi
21616fi
21617fi
21618RC=$ac_cv_prog_RC
21619if test -n "$RC"; then
21620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21621$as_echo "$RC" >&6; }
21622else
21623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21624$as_echo "no" >&6; }
21625fi
21626
21627
21628
21629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21630
21631  # First separate the path from the arguments. This will split at the first
21632  # space.
21633  complete="$RC"
21634  path="${complete%% *}"
21635  tmp="$complete EOL"
21636  arguments="${tmp#* }"
21637
21638  # Input might be given as Windows format, start by converting to
21639  # unix format.
21640  new_path=`$CYGPATH -u "$path"`
21641
21642  # Now try to locate executable using which
21643  new_path=`$WHICH "$new_path" 2> /dev/null`
21644  if test "x$new_path" = x; then
21645    # Oops. Which didn't find the executable.
21646    # The splitting of arguments from the executable at a space might have been incorrect,
21647    # since paths with space are more likely in Windows. Give it another try with the whole
21648    # argument.
21649    path="$complete"
21650    arguments="EOL"
21651    new_path=`$CYGPATH -u "$path"`
21652    new_path=`$WHICH "$new_path" 2> /dev/null`
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 RC, which resolves as \"$complete\", is not found." >&5
21656$as_echo "$as_me: The path of RC, 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 RC" "$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 RC, which resolves as \"$new_path\", is invalid." >&5
21683$as_echo "$as_me: The path of RC, 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 RC" "$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="$RC"
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 RC, which resolves as \"$complete\", is not found." >&5
21779$as_echo "$as_me: The path of RC, 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 RC" "$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="$RC"
21832    path="${complete%% *}"
21833    tmp="$complete EOL"
21834    arguments="${tmp#* }"
21835
21836    new_path=`$WHICH $path 2> /dev/null`
21837    if test "x$new_path" = x; then
21838      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21839      if test "x$is_absolute_path" != x; then
21840        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
21841$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
21842        new_path="$path"
21843      else
21844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21845$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21846        has_space=`$ECHO "$complete" | $GREP " "`
21847        if test "x$has_space" != x; then
21848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21850        fi
21851        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
21852      fi
21853    fi
21854  fi
21855
21856  # Now join together the path and the arguments once again
21857  if test "x$arguments" != xEOL; then
21858      new_complete="$new_path ${arguments% *}"
21859  else
21860      new_complete="$new_path"
21861  fi
21862
21863  if test "x$complete" != "x$new_complete"; then
21864    RC="$new_complete"
21865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
21866$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
21867  fi
21868
21869
21870    # For hotspot, we need these in Windows mixed path,
21871    # so rewrite them all. Need added .exe suffix.
21872    HOTSPOT_CXX="$CXX.exe"
21873    HOTSPOT_LD="$LD.exe"
21874    HOTSPOT_MT="$MT.exe"
21875    HOTSPOT_RC="$RC.exe"
21876
21877  unix_path="$HOTSPOT_CXX"
21878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21879    windows_path=`$CYGPATH -m "$unix_path"`
21880    HOTSPOT_CXX="$windows_path"
21881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21882    windows_path=`cmd //c echo $unix_path`
21883    HOTSPOT_CXX="$windows_path"
21884  fi
21885
21886
21887  unix_path="$HOTSPOT_LD"
21888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21889    windows_path=`$CYGPATH -m "$unix_path"`
21890    HOTSPOT_LD="$windows_path"
21891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21892    windows_path=`cmd //c echo $unix_path`
21893    HOTSPOT_LD="$windows_path"
21894  fi
21895
21896
21897  unix_path="$HOTSPOT_MT"
21898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21899    windows_path=`$CYGPATH -m "$unix_path"`
21900    HOTSPOT_MT="$windows_path"
21901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21902    windows_path=`cmd //c echo $unix_path`
21903    HOTSPOT_MT="$windows_path"
21904  fi
21905
21906
21907  unix_path="$HOTSPOT_RC"
21908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21909    windows_path=`$CYGPATH -m "$unix_path"`
21910    HOTSPOT_RC="$windows_path"
21911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21912    windows_path=`cmd //c echo $unix_path`
21913    HOTSPOT_RC="$windows_path"
21914  fi
21915
21916
21917
21918
21919    RC_FLAGS="-nologo -l 0x409 -r"
21920    if test "x$VARIANT" = xOPT; then :
21921
21922        RC_FLAGS="$RC_FLAGS -d NDEBUG"
21923
21924fi
21925    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
21926    if test "x$JDK_UPDATE_VERSION" = x; then :
21927
21928        JDK_UPDATE_VERSION_NOTNULL=0
21929
21930fi
21931    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
21932    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
21933    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
21934    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
21935    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
21936    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
21937    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
21938
21939    # lib.exe is used to create static libraries.
21940    # Extract the first word of "lib", so it can be a program name with args.
21941set dummy lib; ac_word=$2
21942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21943$as_echo_n "checking for $ac_word... " >&6; }
21944if test "${ac_cv_prog_WINAR+set}" = set; then :
21945  $as_echo_n "(cached) " >&6
21946else
21947  if test -n "$WINAR"; then
21948  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
21949else
21950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951for as_dir in $PATH
21952do
21953  IFS=$as_save_IFS
21954  test -z "$as_dir" && as_dir=.
21955    for ac_exec_ext in '' $ac_executable_extensions; do
21956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21957    ac_cv_prog_WINAR="lib"
21958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959    break 2
21960  fi
21961done
21962  done
21963IFS=$as_save_IFS
21964
21965fi
21966fi
21967WINAR=$ac_cv_prog_WINAR
21968if test -n "$WINAR"; then
21969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
21970$as_echo "$WINAR" >&6; }
21971else
21972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21973$as_echo "no" >&6; }
21974fi
21975
21976
21977
21978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21979
21980  # First separate the path from the arguments. This will split at the first
21981  # space.
21982  complete="$WINAR"
21983  path="${complete%% *}"
21984  tmp="$complete EOL"
21985  arguments="${tmp#* }"
21986
21987  # Input might be given as Windows format, start by converting to
21988  # unix format.
21989  new_path=`$CYGPATH -u "$path"`
21990
21991  # Now try to locate executable using which
21992  new_path=`$WHICH "$new_path" 2> /dev/null`
21993  if test "x$new_path" = x; then
21994    # Oops. Which didn't find the executable.
21995    # The splitting of arguments from the executable at a space might have been incorrect,
21996    # since paths with space are more likely in Windows. Give it another try with the whole
21997    # argument.
21998    path="$complete"
21999    arguments="EOL"
22000    new_path=`$CYGPATH -u "$path"`
22001    new_path=`$WHICH "$new_path" 2> /dev/null`
22002    if test "x$new_path" = x; then
22003      # It's still not found. Now this is an unrecoverable error.
22004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22005$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22006      has_space=`$ECHO "$complete" | $GREP " "`
22007      if test "x$has_space" != x; then
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22010      fi
22011      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22012    fi
22013  fi
22014
22015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22018  # "foo.exe" is OK but "foo" is an error.
22019  #
22020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22021  # It is also a way to make sure we got the proper file name for the real test later on.
22022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22023  if test "x$test_shortpath" = x; then
22024    # Short path failed, file does not exist as specified.
22025    # Try adding .exe or .cmd
22026    if test -f "${new_path}.exe"; then
22027       input_to_shortpath="${new_path}.exe"
22028    elif test -f "${new_path}.cmd"; then
22029       input_to_shortpath="${new_path}.cmd"
22030    else
22031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22032$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22035      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22036    fi
22037  else
22038    input_to_shortpath="$new_path"
22039  fi
22040
22041  # Call helper function which possibly converts this using DOS-style short mode.
22042  # If so, the updated path is stored in $new_path.
22043  new_path="$input_to_shortpath"
22044
22045  input_path="$input_to_shortpath"
22046  # Check if we need to convert this using DOS-style short mode. If the path
22047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22048  # take no chances and rewrite it.
22049  # Note: m4 eats our [], so we need to use [ and ] instead.
22050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22051  if test "x$has_forbidden_chars" != x; then
22052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22056      # Going to short mode and back again did indeed matter. Since short mode is
22057      # case insensitive, let's make it lowercase to improve readability.
22058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22059      # Now convert it back to Unix-stile (cygpath)
22060      input_path=`$CYGPATH -u "$shortmode_path"`
22061      new_path="$input_path"
22062    fi
22063  fi
22064
22065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22066  if test "x$test_cygdrive_prefix" = x; then
22067    # As a simple fix, exclude /usr/bin since it's not a real path.
22068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22070      # a path prefixed by /cygdrive for fixpath to work.
22071      new_path="$CYGWIN_ROOT_PATH$input_path"
22072    fi
22073  fi
22074
22075  # remove trailing .exe if any
22076  new_path="${new_path/%.exe/}"
22077
22078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22079
22080  # First separate the path from the arguments. This will split at the first
22081  # space.
22082  complete="$WINAR"
22083  path="${complete%% *}"
22084  tmp="$complete EOL"
22085  arguments="${tmp#* }"
22086
22087  # Input might be given as Windows format, start by converting to
22088  # unix format.
22089  new_path="$path"
22090
22091  windows_path="$new_path"
22092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22093    unix_path=`$CYGPATH -u "$windows_path"`
22094    new_path="$unix_path"
22095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22097    new_path="$unix_path"
22098  fi
22099
22100
22101  # Now try to locate executable using which
22102  new_path=`$WHICH "$new_path" 2> /dev/null`
22103
22104  if test "x$new_path" = x; then
22105    # Oops. Which didn't find the executable.
22106    # The splitting of arguments from the executable at a space might have been incorrect,
22107    # since paths with space are more likely in Windows. Give it another try with the whole
22108    # argument.
22109    path="$complete"
22110    arguments="EOL"
22111    new_path="$path"
22112
22113  windows_path="$new_path"
22114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22115    unix_path=`$CYGPATH -u "$windows_path"`
22116    new_path="$unix_path"
22117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22119    new_path="$unix_path"
22120  fi
22121
22122
22123    new_path=`$WHICH "$new_path" 2> /dev/null`
22124
22125    if test "x$new_path" = x; then
22126      # It's still not found. Now this is an unrecoverable error.
22127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22128$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22129      has_space=`$ECHO "$complete" | $GREP " "`
22130      if test "x$has_space" != x; then
22131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22133      fi
22134      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22135    fi
22136  fi
22137
22138  # Now new_path has a complete unix path to the binary
22139  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22140    # Keep paths in /bin as-is, but remove trailing .exe if any
22141    new_path="${new_path/%.exe/}"
22142    # Do not save /bin paths to all_fixpath_prefixes!
22143  else
22144    # Not in mixed or Windows style, start by that.
22145    new_path=`cmd //c echo $new_path`
22146
22147  input_path="$new_path"
22148  # Check if we need to convert this using DOS-style short mode. If the path
22149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22150  # take no chances and rewrite it.
22151  # Note: m4 eats our [], so we need to use [ and ] instead.
22152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22153  if test "x$has_forbidden_chars" != x; then
22154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22156  fi
22157
22158    # Output is in $new_path
22159
22160  windows_path="$new_path"
22161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22162    unix_path=`$CYGPATH -u "$windows_path"`
22163    new_path="$unix_path"
22164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22166    new_path="$unix_path"
22167  fi
22168
22169    # remove trailing .exe if any
22170    new_path="${new_path/%.exe/}"
22171
22172    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22173    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22174  fi
22175
22176  else
22177    # We're on a posix platform. Hooray! :)
22178    # First separate the path from the arguments. This will split at the first
22179    # space.
22180    complete="$WINAR"
22181    path="${complete%% *}"
22182    tmp="$complete EOL"
22183    arguments="${tmp#* }"
22184
22185    new_path=`$WHICH $path 2> /dev/null`
22186    if test "x$new_path" = x; then
22187      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22188      if test "x$is_absolute_path" != x; then
22189        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22190$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22191        new_path="$path"
22192      else
22193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22194$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22195        has_space=`$ECHO "$complete" | $GREP " "`
22196        if test "x$has_space" != x; then
22197          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22198$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22199        fi
22200        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22201      fi
22202    fi
22203  fi
22204
22205  # Now join together the path and the arguments once again
22206  if test "x$arguments" != xEOL; then
22207      new_complete="$new_path ${arguments% *}"
22208  else
22209      new_complete="$new_path"
22210  fi
22211
22212  if test "x$complete" != "x$new_complete"; then
22213    WINAR="$new_complete"
22214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22215$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22216  fi
22217
22218    AR="$WINAR"
22219    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22220
22221    # Extract the first word of "dumpbin", so it can be a program name with args.
22222set dummy dumpbin; ac_word=$2
22223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22224$as_echo_n "checking for $ac_word... " >&6; }
22225if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22226  $as_echo_n "(cached) " >&6
22227else
22228  if test -n "$DUMPBIN"; then
22229  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22230else
22231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22232for as_dir in $PATH
22233do
22234  IFS=$as_save_IFS
22235  test -z "$as_dir" && as_dir=.
22236    for ac_exec_ext in '' $ac_executable_extensions; do
22237  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22238    ac_cv_prog_DUMPBIN="dumpbin"
22239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22240    break 2
22241  fi
22242done
22243  done
22244IFS=$as_save_IFS
22245
22246fi
22247fi
22248DUMPBIN=$ac_cv_prog_DUMPBIN
22249if test -n "$DUMPBIN"; then
22250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22251$as_echo "$DUMPBIN" >&6; }
22252else
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22254$as_echo "no" >&6; }
22255fi
22256
22257
22258
22259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22260
22261  # First separate the path from the arguments. This will split at the first
22262  # space.
22263  complete="$DUMPBIN"
22264  path="${complete%% *}"
22265  tmp="$complete EOL"
22266  arguments="${tmp#* }"
22267
22268  # Input might be given as Windows format, start by converting to
22269  # unix format.
22270  new_path=`$CYGPATH -u "$path"`
22271
22272  # Now try to locate executable using which
22273  new_path=`$WHICH "$new_path" 2> /dev/null`
22274  if test "x$new_path" = x; then
22275    # Oops. Which didn't find the executable.
22276    # The splitting of arguments from the executable at a space might have been incorrect,
22277    # since paths with space are more likely in Windows. Give it another try with the whole
22278    # argument.
22279    path="$complete"
22280    arguments="EOL"
22281    new_path=`$CYGPATH -u "$path"`
22282    new_path=`$WHICH "$new_path" 2> /dev/null`
22283    if test "x$new_path" = x; then
22284      # It's still not found. Now this is an unrecoverable error.
22285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22286$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22287      has_space=`$ECHO "$complete" | $GREP " "`
22288      if test "x$has_space" != x; then
22289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22291      fi
22292      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22293    fi
22294  fi
22295
22296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22299  # "foo.exe" is OK but "foo" is an error.
22300  #
22301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22302  # It is also a way to make sure we got the proper file name for the real test later on.
22303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22304  if test "x$test_shortpath" = x; then
22305    # Short path failed, file does not exist as specified.
22306    # Try adding .exe or .cmd
22307    if test -f "${new_path}.exe"; then
22308       input_to_shortpath="${new_path}.exe"
22309    elif test -f "${new_path}.cmd"; then
22310       input_to_shortpath="${new_path}.cmd"
22311    else
22312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22313$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22316      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22317    fi
22318  else
22319    input_to_shortpath="$new_path"
22320  fi
22321
22322  # Call helper function which possibly converts this using DOS-style short mode.
22323  # If so, the updated path is stored in $new_path.
22324  new_path="$input_to_shortpath"
22325
22326  input_path="$input_to_shortpath"
22327  # Check if we need to convert this using DOS-style short mode. If the path
22328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22329  # take no chances and rewrite it.
22330  # Note: m4 eats our [], so we need to use [ and ] instead.
22331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22332  if test "x$has_forbidden_chars" != x; then
22333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22337      # Going to short mode and back again did indeed matter. Since short mode is
22338      # case insensitive, let's make it lowercase to improve readability.
22339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22340      # Now convert it back to Unix-stile (cygpath)
22341      input_path=`$CYGPATH -u "$shortmode_path"`
22342      new_path="$input_path"
22343    fi
22344  fi
22345
22346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22347  if test "x$test_cygdrive_prefix" = x; then
22348    # As a simple fix, exclude /usr/bin since it's not a real path.
22349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22351      # a path prefixed by /cygdrive for fixpath to work.
22352      new_path="$CYGWIN_ROOT_PATH$input_path"
22353    fi
22354  fi
22355
22356  # remove trailing .exe if any
22357  new_path="${new_path/%.exe/}"
22358
22359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22360
22361  # First separate the path from the arguments. This will split at the first
22362  # space.
22363  complete="$DUMPBIN"
22364  path="${complete%% *}"
22365  tmp="$complete EOL"
22366  arguments="${tmp#* }"
22367
22368  # Input might be given as Windows format, start by converting to
22369  # unix format.
22370  new_path="$path"
22371
22372  windows_path="$new_path"
22373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22374    unix_path=`$CYGPATH -u "$windows_path"`
22375    new_path="$unix_path"
22376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22378    new_path="$unix_path"
22379  fi
22380
22381
22382  # Now try to locate executable using which
22383  new_path=`$WHICH "$new_path" 2> /dev/null`
22384
22385  if test "x$new_path" = x; then
22386    # Oops. Which didn't find the executable.
22387    # The splitting of arguments from the executable at a space might have been incorrect,
22388    # since paths with space are more likely in Windows. Give it another try with the whole
22389    # argument.
22390    path="$complete"
22391    arguments="EOL"
22392    new_path="$path"
22393
22394  windows_path="$new_path"
22395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22396    unix_path=`$CYGPATH -u "$windows_path"`
22397    new_path="$unix_path"
22398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22400    new_path="$unix_path"
22401  fi
22402
22403
22404    new_path=`$WHICH "$new_path" 2> /dev/null`
22405
22406    if test "x$new_path" = x; then
22407      # It's still not found. Now this is an unrecoverable error.
22408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22409$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22410      has_space=`$ECHO "$complete" | $GREP " "`
22411      if test "x$has_space" != x; then
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22414      fi
22415      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22416    fi
22417  fi
22418
22419  # Now new_path has a complete unix path to the binary
22420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22421    # Keep paths in /bin as-is, but remove trailing .exe if any
22422    new_path="${new_path/%.exe/}"
22423    # Do not save /bin paths to all_fixpath_prefixes!
22424  else
22425    # Not in mixed or Windows style, start by that.
22426    new_path=`cmd //c echo $new_path`
22427
22428  input_path="$new_path"
22429  # Check if we need to convert this using DOS-style short mode. If the path
22430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22431  # take no chances and rewrite it.
22432  # Note: m4 eats our [], so we need to use [ and ] instead.
22433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22434  if test "x$has_forbidden_chars" != x; then
22435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22437  fi
22438
22439    # Output is in $new_path
22440
22441  windows_path="$new_path"
22442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22443    unix_path=`$CYGPATH -u "$windows_path"`
22444    new_path="$unix_path"
22445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22447    new_path="$unix_path"
22448  fi
22449
22450    # remove trailing .exe if any
22451    new_path="${new_path/%.exe/}"
22452
22453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22455  fi
22456
22457  else
22458    # We're on a posix platform. Hooray! :)
22459    # First separate the path from the arguments. This will split at the first
22460    # space.
22461    complete="$DUMPBIN"
22462    path="${complete%% *}"
22463    tmp="$complete EOL"
22464    arguments="${tmp#* }"
22465
22466    new_path=`$WHICH $path 2> /dev/null`
22467    if test "x$new_path" = x; then
22468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22469      if test "x$is_absolute_path" != x; then
22470        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22471$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22472        new_path="$path"
22473      else
22474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22475$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22476        has_space=`$ECHO "$complete" | $GREP " "`
22477        if test "x$has_space" != x; then
22478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22480        fi
22481        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22482      fi
22483    fi
22484  fi
22485
22486  # Now join together the path and the arguments once again
22487  if test "x$arguments" != xEOL; then
22488      new_complete="$new_path ${arguments% *}"
22489  else
22490      new_complete="$new_path"
22491  fi
22492
22493  if test "x$complete" != "x$new_complete"; then
22494    DUMPBIN="$new_complete"
22495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22496$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22497  fi
22498
22499
22500    COMPILER_TYPE=CL
22501    CCXXFLAGS="$CCXXFLAGS -nologo"
22502
22503fi
22504
22505
22506
22507ac_ext=c
22508ac_cpp='$CPP $CPPFLAGS'
22509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22511ac_compiler_gnu=$ac_cv_c_compiler_gnu
22512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22513$as_echo_n "checking how to run the C preprocessor... " >&6; }
22514# On Suns, sometimes $CPP names a directory.
22515if test -n "$CPP" && test -d "$CPP"; then
22516  CPP=
22517fi
22518if test -z "$CPP"; then
22519  if test "${ac_cv_prog_CPP+set}" = set; then :
22520  $as_echo_n "(cached) " >&6
22521else
22522      # Double quotes because CPP needs to be expanded
22523    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22524    do
22525      ac_preproc_ok=false
22526for ac_c_preproc_warn_flag in '' yes
22527do
22528  # Use a header file that comes with gcc, so configuring glibc
22529  # with a fresh cross-compiler works.
22530  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22531  # <limits.h> exists even on freestanding compilers.
22532  # On the NeXT, cc -E runs the code through the compiler's parser,
22533  # not just through cpp. "Syntax error" is here to catch this case.
22534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22535/* end confdefs.h.  */
22536#ifdef __STDC__
22537# include <limits.h>
22538#else
22539# include <assert.h>
22540#endif
22541		     Syntax error
22542_ACEOF
22543if ac_fn_c_try_cpp "$LINENO"; then :
22544
22545else
22546  # Broken: fails on valid input.
22547continue
22548fi
22549rm -f conftest.err conftest.i conftest.$ac_ext
22550
22551  # OK, works on sane cases.  Now check whether nonexistent headers
22552  # can be detected and how.
22553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22554/* end confdefs.h.  */
22555#include <ac_nonexistent.h>
22556_ACEOF
22557if ac_fn_c_try_cpp "$LINENO"; then :
22558  # Broken: success on invalid input.
22559continue
22560else
22561  # Passes both tests.
22562ac_preproc_ok=:
22563break
22564fi
22565rm -f conftest.err conftest.i conftest.$ac_ext
22566
22567done
22568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22569rm -f conftest.i conftest.err conftest.$ac_ext
22570if $ac_preproc_ok; then :
22571  break
22572fi
22573
22574    done
22575    ac_cv_prog_CPP=$CPP
22576
22577fi
22578  CPP=$ac_cv_prog_CPP
22579else
22580  ac_cv_prog_CPP=$CPP
22581fi
22582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22583$as_echo "$CPP" >&6; }
22584ac_preproc_ok=false
22585for ac_c_preproc_warn_flag in '' yes
22586do
22587  # Use a header file that comes with gcc, so configuring glibc
22588  # with a fresh cross-compiler works.
22589  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22590  # <limits.h> exists even on freestanding compilers.
22591  # On the NeXT, cc -E runs the code through the compiler's parser,
22592  # not just through cpp. "Syntax error" is here to catch this case.
22593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22594/* end confdefs.h.  */
22595#ifdef __STDC__
22596# include <limits.h>
22597#else
22598# include <assert.h>
22599#endif
22600		     Syntax error
22601_ACEOF
22602if ac_fn_c_try_cpp "$LINENO"; then :
22603
22604else
22605  # Broken: fails on valid input.
22606continue
22607fi
22608rm -f conftest.err conftest.i conftest.$ac_ext
22609
22610  # OK, works on sane cases.  Now check whether nonexistent headers
22611  # can be detected and how.
22612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22613/* end confdefs.h.  */
22614#include <ac_nonexistent.h>
22615_ACEOF
22616if ac_fn_c_try_cpp "$LINENO"; then :
22617  # Broken: success on invalid input.
22618continue
22619else
22620  # Passes both tests.
22621ac_preproc_ok=:
22622break
22623fi
22624rm -f conftest.err conftest.i conftest.$ac_ext
22625
22626done
22627# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22628rm -f conftest.i conftest.err conftest.$ac_ext
22629if $ac_preproc_ok; then :
22630
22631else
22632  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22634as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
22635See \`config.log' for more details" "$LINENO" 5 ; }
22636fi
22637
22638ac_ext=cpp
22639ac_cpp='$CXXCPP $CPPFLAGS'
22640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22643
22644
22645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22646
22647  # First separate the path from the arguments. This will split at the first
22648  # space.
22649  complete="$CPP"
22650  path="${complete%% *}"
22651  tmp="$complete EOL"
22652  arguments="${tmp#* }"
22653
22654  # Input might be given as Windows format, start by converting to
22655  # unix format.
22656  new_path=`$CYGPATH -u "$path"`
22657
22658  # Now try to locate executable using which
22659  new_path=`$WHICH "$new_path" 2> /dev/null`
22660  if test "x$new_path" = x; then
22661    # Oops. Which didn't find the executable.
22662    # The splitting of arguments from the executable at a space might have been incorrect,
22663    # since paths with space are more likely in Windows. Give it another try with the whole
22664    # argument.
22665    path="$complete"
22666    arguments="EOL"
22667    new_path=`$CYGPATH -u "$path"`
22668    new_path=`$WHICH "$new_path" 2> /dev/null`
22669    if test "x$new_path" = x; then
22670      # It's still not found. Now this is an unrecoverable error.
22671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22672$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22673      has_space=`$ECHO "$complete" | $GREP " "`
22674      if test "x$has_space" != x; then
22675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22677      fi
22678      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22679    fi
22680  fi
22681
22682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22685  # "foo.exe" is OK but "foo" is an error.
22686  #
22687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22688  # It is also a way to make sure we got the proper file name for the real test later on.
22689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22690  if test "x$test_shortpath" = x; then
22691    # Short path failed, file does not exist as specified.
22692    # Try adding .exe or .cmd
22693    if test -f "${new_path}.exe"; then
22694       input_to_shortpath="${new_path}.exe"
22695    elif test -f "${new_path}.cmd"; then
22696       input_to_shortpath="${new_path}.cmd"
22697    else
22698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
22699$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
22700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22702      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22703    fi
22704  else
22705    input_to_shortpath="$new_path"
22706  fi
22707
22708  # Call helper function which possibly converts this using DOS-style short mode.
22709  # If so, the updated path is stored in $new_path.
22710  new_path="$input_to_shortpath"
22711
22712  input_path="$input_to_shortpath"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22723      # Going to short mode and back again did indeed matter. Since short mode is
22724      # case insensitive, let's make it lowercase to improve readability.
22725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22726      # Now convert it back to Unix-stile (cygpath)
22727      input_path=`$CYGPATH -u "$shortmode_path"`
22728      new_path="$input_path"
22729    fi
22730  fi
22731
22732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22733  if test "x$test_cygdrive_prefix" = x; then
22734    # As a simple fix, exclude /usr/bin since it's not a real path.
22735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22737      # a path prefixed by /cygdrive for fixpath to work.
22738      new_path="$CYGWIN_ROOT_PATH$input_path"
22739    fi
22740  fi
22741
22742  # remove trailing .exe if any
22743  new_path="${new_path/%.exe/}"
22744
22745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22746
22747  # First separate the path from the arguments. This will split at the first
22748  # space.
22749  complete="$CPP"
22750  path="${complete%% *}"
22751  tmp="$complete EOL"
22752  arguments="${tmp#* }"
22753
22754  # Input might be given as Windows format, start by converting to
22755  # unix format.
22756  new_path="$path"
22757
22758  windows_path="$new_path"
22759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22760    unix_path=`$CYGPATH -u "$windows_path"`
22761    new_path="$unix_path"
22762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22764    new_path="$unix_path"
22765  fi
22766
22767
22768  # Now try to locate executable using which
22769  new_path=`$WHICH "$new_path" 2> /dev/null`
22770
22771  if test "x$new_path" = x; then
22772    # Oops. Which didn't find the executable.
22773    # The splitting of arguments from the executable at a space might have been incorrect,
22774    # since paths with space are more likely in Windows. Give it another try with the whole
22775    # argument.
22776    path="$complete"
22777    arguments="EOL"
22778    new_path="$path"
22779
22780  windows_path="$new_path"
22781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22782    unix_path=`$CYGPATH -u "$windows_path"`
22783    new_path="$unix_path"
22784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22786    new_path="$unix_path"
22787  fi
22788
22789
22790    new_path=`$WHICH "$new_path" 2> /dev/null`
22791
22792    if test "x$new_path" = x; then
22793      # It's still not found. Now this is an unrecoverable error.
22794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22795$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22796      has_space=`$ECHO "$complete" | $GREP " "`
22797      if test "x$has_space" != x; then
22798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22800      fi
22801      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22802    fi
22803  fi
22804
22805  # Now new_path has a complete unix path to the binary
22806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22807    # Keep paths in /bin as-is, but remove trailing .exe if any
22808    new_path="${new_path/%.exe/}"
22809    # Do not save /bin paths to all_fixpath_prefixes!
22810  else
22811    # Not in mixed or Windows style, start by that.
22812    new_path=`cmd //c echo $new_path`
22813
22814  input_path="$new_path"
22815  # Check if we need to convert this using DOS-style short mode. If the path
22816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22817  # take no chances and rewrite it.
22818  # Note: m4 eats our [], so we need to use [ and ] instead.
22819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22820  if test "x$has_forbidden_chars" != x; then
22821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22823  fi
22824
22825    # Output is in $new_path
22826
22827  windows_path="$new_path"
22828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22829    unix_path=`$CYGPATH -u "$windows_path"`
22830    new_path="$unix_path"
22831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22833    new_path="$unix_path"
22834  fi
22835
22836    # remove trailing .exe if any
22837    new_path="${new_path/%.exe/}"
22838
22839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22841  fi
22842
22843  else
22844    # We're on a posix platform. Hooray! :)
22845    # First separate the path from the arguments. This will split at the first
22846    # space.
22847    complete="$CPP"
22848    path="${complete%% *}"
22849    tmp="$complete EOL"
22850    arguments="${tmp#* }"
22851
22852    new_path=`$WHICH $path 2> /dev/null`
22853    if test "x$new_path" = x; then
22854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22855      if test "x$is_absolute_path" != x; then
22856        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
22857$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
22858        new_path="$path"
22859      else
22860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
22861$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
22862        has_space=`$ECHO "$complete" | $GREP " "`
22863        if test "x$has_space" != x; then
22864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22866        fi
22867        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
22868      fi
22869    fi
22870  fi
22871
22872  # Now join together the path and the arguments once again
22873  if test "x$arguments" != xEOL; then
22874      new_complete="$new_path ${arguments% *}"
22875  else
22876      new_complete="$new_path"
22877  fi
22878
22879  if test "x$complete" != "x$new_complete"; then
22880    CPP="$new_complete"
22881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
22882$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
22883  fi
22884
22885
22886ac_ext=cpp
22887ac_cpp='$CXXCPP $CPPFLAGS'
22888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
22892$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
22893if test -z "$CXXCPP"; then
22894  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
22895  $as_echo_n "(cached) " >&6
22896else
22897      # Double quotes because CXXCPP needs to be expanded
22898    for CXXCPP in "$CXX -E" "/lib/cpp"
22899    do
22900      ac_preproc_ok=false
22901for ac_cxx_preproc_warn_flag in '' yes
22902do
22903  # Use a header file that comes with gcc, so configuring glibc
22904  # with a fresh cross-compiler works.
22905  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22906  # <limits.h> exists even on freestanding compilers.
22907  # On the NeXT, cc -E runs the code through the compiler's parser,
22908  # not just through cpp. "Syntax error" is here to catch this case.
22909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22910/* end confdefs.h.  */
22911#ifdef __STDC__
22912# include <limits.h>
22913#else
22914# include <assert.h>
22915#endif
22916		     Syntax error
22917_ACEOF
22918if ac_fn_cxx_try_cpp "$LINENO"; then :
22919
22920else
22921  # Broken: fails on valid input.
22922continue
22923fi
22924rm -f conftest.err conftest.i conftest.$ac_ext
22925
22926  # OK, works on sane cases.  Now check whether nonexistent headers
22927  # can be detected and how.
22928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22929/* end confdefs.h.  */
22930#include <ac_nonexistent.h>
22931_ACEOF
22932if ac_fn_cxx_try_cpp "$LINENO"; then :
22933  # Broken: success on invalid input.
22934continue
22935else
22936  # Passes both tests.
22937ac_preproc_ok=:
22938break
22939fi
22940rm -f conftest.err conftest.i conftest.$ac_ext
22941
22942done
22943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22944rm -f conftest.i conftest.err conftest.$ac_ext
22945if $ac_preproc_ok; then :
22946  break
22947fi
22948
22949    done
22950    ac_cv_prog_CXXCPP=$CXXCPP
22951
22952fi
22953  CXXCPP=$ac_cv_prog_CXXCPP
22954else
22955  ac_cv_prog_CXXCPP=$CXXCPP
22956fi
22957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
22958$as_echo "$CXXCPP" >&6; }
22959ac_preproc_ok=false
22960for ac_cxx_preproc_warn_flag in '' yes
22961do
22962  # Use a header file that comes with gcc, so configuring glibc
22963  # with a fresh cross-compiler works.
22964  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22965  # <limits.h> exists even on freestanding compilers.
22966  # On the NeXT, cc -E runs the code through the compiler's parser,
22967  # not just through cpp. "Syntax error" is here to catch this case.
22968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22969/* end confdefs.h.  */
22970#ifdef __STDC__
22971# include <limits.h>
22972#else
22973# include <assert.h>
22974#endif
22975		     Syntax error
22976_ACEOF
22977if ac_fn_cxx_try_cpp "$LINENO"; then :
22978
22979else
22980  # Broken: fails on valid input.
22981continue
22982fi
22983rm -f conftest.err conftest.i conftest.$ac_ext
22984
22985  # OK, works on sane cases.  Now check whether nonexistent headers
22986  # can be detected and how.
22987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22988/* end confdefs.h.  */
22989#include <ac_nonexistent.h>
22990_ACEOF
22991if ac_fn_cxx_try_cpp "$LINENO"; then :
22992  # Broken: success on invalid input.
22993continue
22994else
22995  # Passes both tests.
22996ac_preproc_ok=:
22997break
22998fi
22999rm -f conftest.err conftest.i conftest.$ac_ext
23000
23001done
23002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23003rm -f conftest.i conftest.err conftest.$ac_ext
23004if $ac_preproc_ok; then :
23005
23006else
23007  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23009as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23010See \`config.log' for more details" "$LINENO" 5 ; }
23011fi
23012
23013ac_ext=cpp
23014ac_cpp='$CXXCPP $CPPFLAGS'
23015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23018
23019
23020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23021
23022  # First separate the path from the arguments. This will split at the first
23023  # space.
23024  complete="$CXXCPP"
23025  path="${complete%% *}"
23026  tmp="$complete EOL"
23027  arguments="${tmp#* }"
23028
23029  # Input might be given as Windows format, start by converting to
23030  # unix format.
23031  new_path=`$CYGPATH -u "$path"`
23032
23033  # Now try to locate executable using which
23034  new_path=`$WHICH "$new_path" 2> /dev/null`
23035  if test "x$new_path" = x; then
23036    # Oops. Which didn't find the executable.
23037    # The splitting of arguments from the executable at a space might have been incorrect,
23038    # since paths with space are more likely in Windows. Give it another try with the whole
23039    # argument.
23040    path="$complete"
23041    arguments="EOL"
23042    new_path=`$CYGPATH -u "$path"`
23043    new_path=`$WHICH "$new_path" 2> /dev/null`
23044    if test "x$new_path" = x; then
23045      # It's still not found. Now this is an unrecoverable error.
23046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23047$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23048      has_space=`$ECHO "$complete" | $GREP " "`
23049      if test "x$has_space" != x; then
23050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23052      fi
23053      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23054    fi
23055  fi
23056
23057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23060  # "foo.exe" is OK but "foo" is an error.
23061  #
23062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23063  # It is also a way to make sure we got the proper file name for the real test later on.
23064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23065  if test "x$test_shortpath" = x; then
23066    # Short path failed, file does not exist as specified.
23067    # Try adding .exe or .cmd
23068    if test -f "${new_path}.exe"; then
23069       input_to_shortpath="${new_path}.exe"
23070    elif test -f "${new_path}.cmd"; then
23071       input_to_shortpath="${new_path}.cmd"
23072    else
23073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23074$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23077      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23078    fi
23079  else
23080    input_to_shortpath="$new_path"
23081  fi
23082
23083  # Call helper function which possibly converts this using DOS-style short mode.
23084  # If so, the updated path is stored in $new_path.
23085  new_path="$input_to_shortpath"
23086
23087  input_path="$input_to_shortpath"
23088  # Check if we need to convert this using DOS-style short mode. If the path
23089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23090  # take no chances and rewrite it.
23091  # Note: m4 eats our [], so we need to use [ and ] instead.
23092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23093  if test "x$has_forbidden_chars" != x; then
23094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23098      # Going to short mode and back again did indeed matter. Since short mode is
23099      # case insensitive, let's make it lowercase to improve readability.
23100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23101      # Now convert it back to Unix-stile (cygpath)
23102      input_path=`$CYGPATH -u "$shortmode_path"`
23103      new_path="$input_path"
23104    fi
23105  fi
23106
23107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23108  if test "x$test_cygdrive_prefix" = x; then
23109    # As a simple fix, exclude /usr/bin since it's not a real path.
23110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23112      # a path prefixed by /cygdrive for fixpath to work.
23113      new_path="$CYGWIN_ROOT_PATH$input_path"
23114    fi
23115  fi
23116
23117  # remove trailing .exe if any
23118  new_path="${new_path/%.exe/}"
23119
23120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23121
23122  # First separate the path from the arguments. This will split at the first
23123  # space.
23124  complete="$CXXCPP"
23125  path="${complete%% *}"
23126  tmp="$complete EOL"
23127  arguments="${tmp#* }"
23128
23129  # Input might be given as Windows format, start by converting to
23130  # unix format.
23131  new_path="$path"
23132
23133  windows_path="$new_path"
23134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23135    unix_path=`$CYGPATH -u "$windows_path"`
23136    new_path="$unix_path"
23137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23139    new_path="$unix_path"
23140  fi
23141
23142
23143  # Now try to locate executable using which
23144  new_path=`$WHICH "$new_path" 2> /dev/null`
23145
23146  if test "x$new_path" = x; then
23147    # Oops. Which didn't find the executable.
23148    # The splitting of arguments from the executable at a space might have been incorrect,
23149    # since paths with space are more likely in Windows. Give it another try with the whole
23150    # argument.
23151    path="$complete"
23152    arguments="EOL"
23153    new_path="$path"
23154
23155  windows_path="$new_path"
23156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23157    unix_path=`$CYGPATH -u "$windows_path"`
23158    new_path="$unix_path"
23159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23161    new_path="$unix_path"
23162  fi
23163
23164
23165    new_path=`$WHICH "$new_path" 2> /dev/null`
23166
23167    if test "x$new_path" = x; then
23168      # It's still not found. Now this is an unrecoverable error.
23169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23170$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23171      has_space=`$ECHO "$complete" | $GREP " "`
23172      if test "x$has_space" != x; then
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23175      fi
23176      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23177    fi
23178  fi
23179
23180  # Now new_path has a complete unix path to the binary
23181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23182    # Keep paths in /bin as-is, but remove trailing .exe if any
23183    new_path="${new_path/%.exe/}"
23184    # Do not save /bin paths to all_fixpath_prefixes!
23185  else
23186    # Not in mixed or Windows style, start by that.
23187    new_path=`cmd //c echo $new_path`
23188
23189  input_path="$new_path"
23190  # Check if we need to convert this using DOS-style short mode. If the path
23191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23192  # take no chances and rewrite it.
23193  # Note: m4 eats our [], so we need to use [ and ] instead.
23194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23195  if test "x$has_forbidden_chars" != x; then
23196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23198  fi
23199
23200    # Output is in $new_path
23201
23202  windows_path="$new_path"
23203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23204    unix_path=`$CYGPATH -u "$windows_path"`
23205    new_path="$unix_path"
23206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23208    new_path="$unix_path"
23209  fi
23210
23211    # remove trailing .exe if any
23212    new_path="${new_path/%.exe/}"
23213
23214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23216  fi
23217
23218  else
23219    # We're on a posix platform. Hooray! :)
23220    # First separate the path from the arguments. This will split at the first
23221    # space.
23222    complete="$CXXCPP"
23223    path="${complete%% *}"
23224    tmp="$complete EOL"
23225    arguments="${tmp#* }"
23226
23227    new_path=`$WHICH $path 2> /dev/null`
23228    if test "x$new_path" = x; then
23229      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23230      if test "x$is_absolute_path" != x; then
23231        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23232$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23233        new_path="$path"
23234      else
23235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23236$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23237        has_space=`$ECHO "$complete" | $GREP " "`
23238        if test "x$has_space" != x; then
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23240$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23241        fi
23242        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23243      fi
23244    fi
23245  fi
23246
23247  # Now join together the path and the arguments once again
23248  if test "x$arguments" != xEOL; then
23249      new_complete="$new_path ${arguments% *}"
23250  else
23251      new_complete="$new_path"
23252  fi
23253
23254  if test "x$complete" != "x$new_complete"; then
23255    CXXCPP="$new_complete"
23256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23257$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23258  fi
23259
23260
23261if test "x$COMPILE_TYPE" != "xcross"; then
23262    # If we are not cross compiling, use the same compilers for
23263    # building the build platform executables. The cross-compilation
23264    # case needed to be done earlier, but this can only be done after
23265    # the native tools have been localized.
23266    BUILD_CC="$CC"
23267    BUILD_CXX="$CXX"
23268    BUILD_LD="$LD"
23269fi
23270
23271# for solaris we really need solaris tools, and not gnu equivalent
23272#   these seems to normally reside in /usr/ccs/bin so add that to path before
23273#   starting to probe
23274#
23275#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23276#         so that it can be overriden --with-tools-dir
23277if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23278    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23279fi
23280
23281# Find the right assembler.
23282if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23283    # Extract the first word of "as", so it can be a program name with args.
23284set dummy as; ac_word=$2
23285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23286$as_echo_n "checking for $ac_word... " >&6; }
23287if test "${ac_cv_path_AS+set}" = set; then :
23288  $as_echo_n "(cached) " >&6
23289else
23290  case $AS in
23291  [\\/]* | ?:[\\/]*)
23292  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23293  ;;
23294  *)
23295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23296for as_dir in $PATH
23297do
23298  IFS=$as_save_IFS
23299  test -z "$as_dir" && as_dir=.
23300    for ac_exec_ext in '' $ac_executable_extensions; do
23301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23302    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23304    break 2
23305  fi
23306done
23307  done
23308IFS=$as_save_IFS
23309
23310  ;;
23311esac
23312fi
23313AS=$ac_cv_path_AS
23314if test -n "$AS"; then
23315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23316$as_echo "$AS" >&6; }
23317else
23318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23319$as_echo "no" >&6; }
23320fi
23321
23322
23323
23324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23325
23326  # First separate the path from the arguments. This will split at the first
23327  # space.
23328  complete="$AS"
23329  path="${complete%% *}"
23330  tmp="$complete EOL"
23331  arguments="${tmp#* }"
23332
23333  # Input might be given as Windows format, start by converting to
23334  # unix format.
23335  new_path=`$CYGPATH -u "$path"`
23336
23337  # Now try to locate executable using which
23338  new_path=`$WHICH "$new_path" 2> /dev/null`
23339  if test "x$new_path" = x; then
23340    # Oops. Which didn't find the executable.
23341    # The splitting of arguments from the executable at a space might have been incorrect,
23342    # since paths with space are more likely in Windows. Give it another try with the whole
23343    # argument.
23344    path="$complete"
23345    arguments="EOL"
23346    new_path=`$CYGPATH -u "$path"`
23347    new_path=`$WHICH "$new_path" 2> /dev/null`
23348    if test "x$new_path" = x; then
23349      # It's still not found. Now this is an unrecoverable error.
23350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23351$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23352      has_space=`$ECHO "$complete" | $GREP " "`
23353      if test "x$has_space" != x; then
23354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23356      fi
23357      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23358    fi
23359  fi
23360
23361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23364  # "foo.exe" is OK but "foo" is an error.
23365  #
23366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23367  # It is also a way to make sure we got the proper file name for the real test later on.
23368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23369  if test "x$test_shortpath" = x; then
23370    # Short path failed, file does not exist as specified.
23371    # Try adding .exe or .cmd
23372    if test -f "${new_path}.exe"; then
23373       input_to_shortpath="${new_path}.exe"
23374    elif test -f "${new_path}.cmd"; then
23375       input_to_shortpath="${new_path}.cmd"
23376    else
23377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23378$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23381      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23382    fi
23383  else
23384    input_to_shortpath="$new_path"
23385  fi
23386
23387  # Call helper function which possibly converts this using DOS-style short mode.
23388  # If so, the updated path is stored in $new_path.
23389  new_path="$input_to_shortpath"
23390
23391  input_path="$input_to_shortpath"
23392  # Check if we need to convert this using DOS-style short mode. If the path
23393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23394  # take no chances and rewrite it.
23395  # Note: m4 eats our [], so we need to use [ and ] instead.
23396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23397  if test "x$has_forbidden_chars" != x; then
23398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23402      # Going to short mode and back again did indeed matter. Since short mode is
23403      # case insensitive, let's make it lowercase to improve readability.
23404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23405      # Now convert it back to Unix-stile (cygpath)
23406      input_path=`$CYGPATH -u "$shortmode_path"`
23407      new_path="$input_path"
23408    fi
23409  fi
23410
23411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23412  if test "x$test_cygdrive_prefix" = x; then
23413    # As a simple fix, exclude /usr/bin since it's not a real path.
23414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23416      # a path prefixed by /cygdrive for fixpath to work.
23417      new_path="$CYGWIN_ROOT_PATH$input_path"
23418    fi
23419  fi
23420
23421  # remove trailing .exe if any
23422  new_path="${new_path/%.exe/}"
23423
23424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23425
23426  # First separate the path from the arguments. This will split at the first
23427  # space.
23428  complete="$AS"
23429  path="${complete%% *}"
23430  tmp="$complete EOL"
23431  arguments="${tmp#* }"
23432
23433  # Input might be given as Windows format, start by converting to
23434  # unix format.
23435  new_path="$path"
23436
23437  windows_path="$new_path"
23438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23439    unix_path=`$CYGPATH -u "$windows_path"`
23440    new_path="$unix_path"
23441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23443    new_path="$unix_path"
23444  fi
23445
23446
23447  # Now try to locate executable using which
23448  new_path=`$WHICH "$new_path" 2> /dev/null`
23449
23450  if test "x$new_path" = x; then
23451    # Oops. Which didn't find the executable.
23452    # The splitting of arguments from the executable at a space might have been incorrect,
23453    # since paths with space are more likely in Windows. Give it another try with the whole
23454    # argument.
23455    path="$complete"
23456    arguments="EOL"
23457    new_path="$path"
23458
23459  windows_path="$new_path"
23460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23461    unix_path=`$CYGPATH -u "$windows_path"`
23462    new_path="$unix_path"
23463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23465    new_path="$unix_path"
23466  fi
23467
23468
23469    new_path=`$WHICH "$new_path" 2> /dev/null`
23470
23471    if test "x$new_path" = x; then
23472      # It's still not found. Now this is an unrecoverable error.
23473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23474$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23475      has_space=`$ECHO "$complete" | $GREP " "`
23476      if test "x$has_space" != x; then
23477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23479      fi
23480      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23481    fi
23482  fi
23483
23484  # Now new_path has a complete unix path to the binary
23485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23486    # Keep paths in /bin as-is, but remove trailing .exe if any
23487    new_path="${new_path/%.exe/}"
23488    # Do not save /bin paths to all_fixpath_prefixes!
23489  else
23490    # Not in mixed or Windows style, start by that.
23491    new_path=`cmd //c echo $new_path`
23492
23493  input_path="$new_path"
23494  # Check if we need to convert this using DOS-style short mode. If the path
23495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23496  # take no chances and rewrite it.
23497  # Note: m4 eats our [], so we need to use [ and ] instead.
23498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23499  if test "x$has_forbidden_chars" != x; then
23500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23502  fi
23503
23504    # Output is in $new_path
23505
23506  windows_path="$new_path"
23507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23508    unix_path=`$CYGPATH -u "$windows_path"`
23509    new_path="$unix_path"
23510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23512    new_path="$unix_path"
23513  fi
23514
23515    # remove trailing .exe if any
23516    new_path="${new_path/%.exe/}"
23517
23518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23520  fi
23521
23522  else
23523    # We're on a posix platform. Hooray! :)
23524    # First separate the path from the arguments. This will split at the first
23525    # space.
23526    complete="$AS"
23527    path="${complete%% *}"
23528    tmp="$complete EOL"
23529    arguments="${tmp#* }"
23530
23531    new_path=`$WHICH $path 2> /dev/null`
23532    if test "x$new_path" = x; then
23533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23534      if test "x$is_absolute_path" != x; then
23535        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23536$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23537        new_path="$path"
23538      else
23539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23540$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23541        has_space=`$ECHO "$complete" | $GREP " "`
23542        if test "x$has_space" != x; then
23543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23545        fi
23546        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23547      fi
23548    fi
23549  fi
23550
23551  # Now join together the path and the arguments once again
23552  if test "x$arguments" != xEOL; then
23553      new_complete="$new_path ${arguments% *}"
23554  else
23555      new_complete="$new_path"
23556  fi
23557
23558  if test "x$complete" != "x$new_complete"; then
23559    AS="$new_complete"
23560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23561$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23562  fi
23563
23564else
23565    AS="$CC -c"
23566fi
23567
23568
23569if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23570    for ac_prog in gnm nm
23571do
23572  # Extract the first word of "$ac_prog", so it can be a program name with args.
23573set dummy $ac_prog; ac_word=$2
23574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23575$as_echo_n "checking for $ac_word... " >&6; }
23576if test "${ac_cv_path_NM+set}" = set; then :
23577  $as_echo_n "(cached) " >&6
23578else
23579  case $NM in
23580  [\\/]* | ?:[\\/]*)
23581  ac_cv_path_NM="$NM" # Let the user override the test with a path.
23582  ;;
23583  *)
23584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23585for as_dir in $PATH
23586do
23587  IFS=$as_save_IFS
23588  test -z "$as_dir" && as_dir=.
23589    for ac_exec_ext in '' $ac_executable_extensions; do
23590  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23591    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
23592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23593    break 2
23594  fi
23595done
23596  done
23597IFS=$as_save_IFS
23598
23599  ;;
23600esac
23601fi
23602NM=$ac_cv_path_NM
23603if test -n "$NM"; then
23604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
23605$as_echo "$NM" >&6; }
23606else
23607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23608$as_echo "no" >&6; }
23609fi
23610
23611
23612  test -n "$NM" && break
23613done
23614
23615
23616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23617
23618  # First separate the path from the arguments. This will split at the first
23619  # space.
23620  complete="$NM"
23621  path="${complete%% *}"
23622  tmp="$complete EOL"
23623  arguments="${tmp#* }"
23624
23625  # Input might be given as Windows format, start by converting to
23626  # unix format.
23627  new_path=`$CYGPATH -u "$path"`
23628
23629  # Now try to locate executable using which
23630  new_path=`$WHICH "$new_path" 2> /dev/null`
23631  if test "x$new_path" = x; then
23632    # Oops. Which didn't find the executable.
23633    # The splitting of arguments from the executable at a space might have been incorrect,
23634    # since paths with space are more likely in Windows. Give it another try with the whole
23635    # argument.
23636    path="$complete"
23637    arguments="EOL"
23638    new_path=`$CYGPATH -u "$path"`
23639    new_path=`$WHICH "$new_path" 2> /dev/null`
23640    if test "x$new_path" = x; then
23641      # It's still not found. Now this is an unrecoverable error.
23642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23643$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23644      has_space=`$ECHO "$complete" | $GREP " "`
23645      if test "x$has_space" != x; then
23646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23648      fi
23649      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23650    fi
23651  fi
23652
23653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23656  # "foo.exe" is OK but "foo" is an error.
23657  #
23658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23659  # It is also a way to make sure we got the proper file name for the real test later on.
23660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23661  if test "x$test_shortpath" = x; then
23662    # Short path failed, file does not exist as specified.
23663    # Try adding .exe or .cmd
23664    if test -f "${new_path}.exe"; then
23665       input_to_shortpath="${new_path}.exe"
23666    elif test -f "${new_path}.cmd"; then
23667       input_to_shortpath="${new_path}.cmd"
23668    else
23669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
23670$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
23671      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23672$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23673      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23674    fi
23675  else
23676    input_to_shortpath="$new_path"
23677  fi
23678
23679  # Call helper function which possibly converts this using DOS-style short mode.
23680  # If so, the updated path is stored in $new_path.
23681  new_path="$input_to_shortpath"
23682
23683  input_path="$input_to_shortpath"
23684  # Check if we need to convert this using DOS-style short mode. If the path
23685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23686  # take no chances and rewrite it.
23687  # Note: m4 eats our [], so we need to use [ and ] instead.
23688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23689  if test "x$has_forbidden_chars" != x; then
23690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23694      # Going to short mode and back again did indeed matter. Since short mode is
23695      # case insensitive, let's make it lowercase to improve readability.
23696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23697      # Now convert it back to Unix-stile (cygpath)
23698      input_path=`$CYGPATH -u "$shortmode_path"`
23699      new_path="$input_path"
23700    fi
23701  fi
23702
23703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23704  if test "x$test_cygdrive_prefix" = x; then
23705    # As a simple fix, exclude /usr/bin since it's not a real path.
23706    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23708      # a path prefixed by /cygdrive for fixpath to work.
23709      new_path="$CYGWIN_ROOT_PATH$input_path"
23710    fi
23711  fi
23712
23713  # remove trailing .exe if any
23714  new_path="${new_path/%.exe/}"
23715
23716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23717
23718  # First separate the path from the arguments. This will split at the first
23719  # space.
23720  complete="$NM"
23721  path="${complete%% *}"
23722  tmp="$complete EOL"
23723  arguments="${tmp#* }"
23724
23725  # Input might be given as Windows format, start by converting to
23726  # unix format.
23727  new_path="$path"
23728
23729  windows_path="$new_path"
23730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23731    unix_path=`$CYGPATH -u "$windows_path"`
23732    new_path="$unix_path"
23733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23735    new_path="$unix_path"
23736  fi
23737
23738
23739  # Now try to locate executable using which
23740  new_path=`$WHICH "$new_path" 2> /dev/null`
23741
23742  if test "x$new_path" = x; then
23743    # Oops. Which didn't find the executable.
23744    # The splitting of arguments from the executable at a space might have been incorrect,
23745    # since paths with space are more likely in Windows. Give it another try with the whole
23746    # argument.
23747    path="$complete"
23748    arguments="EOL"
23749    new_path="$path"
23750
23751  windows_path="$new_path"
23752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23753    unix_path=`$CYGPATH -u "$windows_path"`
23754    new_path="$unix_path"
23755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23757    new_path="$unix_path"
23758  fi
23759
23760
23761    new_path=`$WHICH "$new_path" 2> /dev/null`
23762
23763    if test "x$new_path" = x; then
23764      # It's still not found. Now this is an unrecoverable error.
23765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23766$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23767      has_space=`$ECHO "$complete" | $GREP " "`
23768      if test "x$has_space" != x; then
23769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23771      fi
23772      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23773    fi
23774  fi
23775
23776  # Now new_path has a complete unix path to the binary
23777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23778    # Keep paths in /bin as-is, but remove trailing .exe if any
23779    new_path="${new_path/%.exe/}"
23780    # Do not save /bin paths to all_fixpath_prefixes!
23781  else
23782    # Not in mixed or Windows style, start by that.
23783    new_path=`cmd //c echo $new_path`
23784
23785  input_path="$new_path"
23786  # Check if we need to convert this using DOS-style short mode. If the path
23787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23788  # take no chances and rewrite it.
23789  # Note: m4 eats our [], so we need to use [ and ] instead.
23790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23791  if test "x$has_forbidden_chars" != x; then
23792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23794  fi
23795
23796    # Output is in $new_path
23797
23798  windows_path="$new_path"
23799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23800    unix_path=`$CYGPATH -u "$windows_path"`
23801    new_path="$unix_path"
23802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23804    new_path="$unix_path"
23805  fi
23806
23807    # remove trailing .exe if any
23808    new_path="${new_path/%.exe/}"
23809
23810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23812  fi
23813
23814  else
23815    # We're on a posix platform. Hooray! :)
23816    # First separate the path from the arguments. This will split at the first
23817    # space.
23818    complete="$NM"
23819    path="${complete%% *}"
23820    tmp="$complete EOL"
23821    arguments="${tmp#* }"
23822
23823    new_path=`$WHICH $path 2> /dev/null`
23824    if test "x$new_path" = x; then
23825      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23826      if test "x$is_absolute_path" != x; then
23827        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
23828$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
23829        new_path="$path"
23830      else
23831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
23832$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
23833        has_space=`$ECHO "$complete" | $GREP " "`
23834        if test "x$has_space" != x; then
23835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23837        fi
23838        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
23839      fi
23840    fi
23841  fi
23842
23843  # Now join together the path and the arguments once again
23844  if test "x$arguments" != xEOL; then
23845      new_complete="$new_path ${arguments% *}"
23846  else
23847      new_complete="$new_path"
23848  fi
23849
23850  if test "x$complete" != "x$new_complete"; then
23851    NM="$new_complete"
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
23853$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
23854  fi
23855
23856    # Extract the first word of "strip", so it can be a program name with args.
23857set dummy strip; ac_word=$2
23858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23859$as_echo_n "checking for $ac_word... " >&6; }
23860if test "${ac_cv_path_STRIP+set}" = set; then :
23861  $as_echo_n "(cached) " >&6
23862else
23863  case $STRIP in
23864  [\\/]* | ?:[\\/]*)
23865  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
23866  ;;
23867  *)
23868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23869for as_dir in $PATH
23870do
23871  IFS=$as_save_IFS
23872  test -z "$as_dir" && as_dir=.
23873    for ac_exec_ext in '' $ac_executable_extensions; do
23874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23875    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
23876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23877    break 2
23878  fi
23879done
23880  done
23881IFS=$as_save_IFS
23882
23883  ;;
23884esac
23885fi
23886STRIP=$ac_cv_path_STRIP
23887if test -n "$STRIP"; then
23888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
23889$as_echo "$STRIP" >&6; }
23890else
23891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23892$as_echo "no" >&6; }
23893fi
23894
23895
23896
23897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23898
23899  # First separate the path from the arguments. This will split at the first
23900  # space.
23901  complete="$STRIP"
23902  path="${complete%% *}"
23903  tmp="$complete EOL"
23904  arguments="${tmp#* }"
23905
23906  # Input might be given as Windows format, start by converting to
23907  # unix format.
23908  new_path=`$CYGPATH -u "$path"`
23909
23910  # Now try to locate executable using which
23911  new_path=`$WHICH "$new_path" 2> /dev/null`
23912  if test "x$new_path" = x; then
23913    # Oops. Which didn't find the executable.
23914    # The splitting of arguments from the executable at a space might have been incorrect,
23915    # since paths with space are more likely in Windows. Give it another try with the whole
23916    # argument.
23917    path="$complete"
23918    arguments="EOL"
23919    new_path=`$CYGPATH -u "$path"`
23920    new_path=`$WHICH "$new_path" 2> /dev/null`
23921    if test "x$new_path" = x; then
23922      # It's still not found. Now this is an unrecoverable error.
23923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
23924$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
23925      has_space=`$ECHO "$complete" | $GREP " "`
23926      if test "x$has_space" != x; then
23927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23929      fi
23930      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
23931    fi
23932  fi
23933
23934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23937  # "foo.exe" is OK but "foo" is an error.
23938  #
23939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23940  # It is also a way to make sure we got the proper file name for the real test later on.
23941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23942  if test "x$test_shortpath" = x; then
23943    # Short path failed, file does not exist as specified.
23944    # Try adding .exe or .cmd
23945    if test -f "${new_path}.exe"; then
23946       input_to_shortpath="${new_path}.exe"
23947    elif test -f "${new_path}.cmd"; then
23948       input_to_shortpath="${new_path}.cmd"
23949    else
23950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
23951$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
23952      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23953$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23954      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
23955    fi
23956  else
23957    input_to_shortpath="$new_path"
23958  fi
23959
23960  # Call helper function which possibly converts this using DOS-style short mode.
23961  # If so, the updated path is stored in $new_path.
23962  new_path="$input_to_shortpath"
23963
23964  input_path="$input_to_shortpath"
23965  # Check if we need to convert this using DOS-style short mode. If the path
23966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23967  # take no chances and rewrite it.
23968  # Note: m4 eats our [], so we need to use [ and ] instead.
23969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23970  if test "x$has_forbidden_chars" != x; then
23971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23975      # Going to short mode and back again did indeed matter. Since short mode is
23976      # case insensitive, let's make it lowercase to improve readability.
23977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23978      # Now convert it back to Unix-stile (cygpath)
23979      input_path=`$CYGPATH -u "$shortmode_path"`
23980      new_path="$input_path"
23981    fi
23982  fi
23983
23984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23985  if test "x$test_cygdrive_prefix" = x; then
23986    # As a simple fix, exclude /usr/bin since it's not a real path.
23987    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23989      # a path prefixed by /cygdrive for fixpath to work.
23990      new_path="$CYGWIN_ROOT_PATH$input_path"
23991    fi
23992  fi
23993
23994  # remove trailing .exe if any
23995  new_path="${new_path/%.exe/}"
23996
23997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23998
23999  # First separate the path from the arguments. This will split at the first
24000  # space.
24001  complete="$STRIP"
24002  path="${complete%% *}"
24003  tmp="$complete EOL"
24004  arguments="${tmp#* }"
24005
24006  # Input might be given as Windows format, start by converting to
24007  # unix format.
24008  new_path="$path"
24009
24010  windows_path="$new_path"
24011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24012    unix_path=`$CYGPATH -u "$windows_path"`
24013    new_path="$unix_path"
24014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24016    new_path="$unix_path"
24017  fi
24018
24019
24020  # Now try to locate executable using which
24021  new_path=`$WHICH "$new_path" 2> /dev/null`
24022
24023  if test "x$new_path" = x; then
24024    # Oops. Which didn't find the executable.
24025    # The splitting of arguments from the executable at a space might have been incorrect,
24026    # since paths with space are more likely in Windows. Give it another try with the whole
24027    # argument.
24028    path="$complete"
24029    arguments="EOL"
24030    new_path="$path"
24031
24032  windows_path="$new_path"
24033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24034    unix_path=`$CYGPATH -u "$windows_path"`
24035    new_path="$unix_path"
24036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24038    new_path="$unix_path"
24039  fi
24040
24041
24042    new_path=`$WHICH "$new_path" 2> /dev/null`
24043
24044    if test "x$new_path" = x; then
24045      # It's still not found. Now this is an unrecoverable error.
24046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24047$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24048      has_space=`$ECHO "$complete" | $GREP " "`
24049      if test "x$has_space" != x; then
24050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24052      fi
24053      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24054    fi
24055  fi
24056
24057  # Now new_path has a complete unix path to the binary
24058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24059    # Keep paths in /bin as-is, but remove trailing .exe if any
24060    new_path="${new_path/%.exe/}"
24061    # Do not save /bin paths to all_fixpath_prefixes!
24062  else
24063    # Not in mixed or Windows style, start by that.
24064    new_path=`cmd //c echo $new_path`
24065
24066  input_path="$new_path"
24067  # Check if we need to convert this using DOS-style short mode. If the path
24068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24069  # take no chances and rewrite it.
24070  # Note: m4 eats our [], so we need to use [ and ] instead.
24071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24072  if test "x$has_forbidden_chars" != x; then
24073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24075  fi
24076
24077    # Output is in $new_path
24078
24079  windows_path="$new_path"
24080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24081    unix_path=`$CYGPATH -u "$windows_path"`
24082    new_path="$unix_path"
24083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24085    new_path="$unix_path"
24086  fi
24087
24088    # remove trailing .exe if any
24089    new_path="${new_path/%.exe/}"
24090
24091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24093  fi
24094
24095  else
24096    # We're on a posix platform. Hooray! :)
24097    # First separate the path from the arguments. This will split at the first
24098    # space.
24099    complete="$STRIP"
24100    path="${complete%% *}"
24101    tmp="$complete EOL"
24102    arguments="${tmp#* }"
24103
24104    new_path=`$WHICH $path 2> /dev/null`
24105    if test "x$new_path" = x; then
24106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24107      if test "x$is_absolute_path" != x; then
24108        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24109$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24110        new_path="$path"
24111      else
24112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24113$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24114        has_space=`$ECHO "$complete" | $GREP " "`
24115        if test "x$has_space" != x; then
24116          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24118        fi
24119        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24120      fi
24121    fi
24122  fi
24123
24124  # Now join together the path and the arguments once again
24125  if test "x$arguments" != xEOL; then
24126      new_complete="$new_path ${arguments% *}"
24127  else
24128      new_complete="$new_path"
24129  fi
24130
24131  if test "x$complete" != "x$new_complete"; then
24132    STRIP="$new_complete"
24133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24134$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24135  fi
24136
24137    # Extract the first word of "mcs", so it can be a program name with args.
24138set dummy mcs; ac_word=$2
24139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24140$as_echo_n "checking for $ac_word... " >&6; }
24141if test "${ac_cv_path_MCS+set}" = set; then :
24142  $as_echo_n "(cached) " >&6
24143else
24144  case $MCS in
24145  [\\/]* | ?:[\\/]*)
24146  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24147  ;;
24148  *)
24149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24150for as_dir in $PATH
24151do
24152  IFS=$as_save_IFS
24153  test -z "$as_dir" && as_dir=.
24154    for ac_exec_ext in '' $ac_executable_extensions; do
24155  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24156    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24158    break 2
24159  fi
24160done
24161  done
24162IFS=$as_save_IFS
24163
24164  ;;
24165esac
24166fi
24167MCS=$ac_cv_path_MCS
24168if test -n "$MCS"; then
24169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24170$as_echo "$MCS" >&6; }
24171else
24172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24173$as_echo "no" >&6; }
24174fi
24175
24176
24177
24178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24179
24180  # First separate the path from the arguments. This will split at the first
24181  # space.
24182  complete="$MCS"
24183  path="${complete%% *}"
24184  tmp="$complete EOL"
24185  arguments="${tmp#* }"
24186
24187  # Input might be given as Windows format, start by converting to
24188  # unix format.
24189  new_path=`$CYGPATH -u "$path"`
24190
24191  # Now try to locate executable using which
24192  new_path=`$WHICH "$new_path" 2> /dev/null`
24193  if test "x$new_path" = x; then
24194    # Oops. Which didn't find the executable.
24195    # The splitting of arguments from the executable at a space might have been incorrect,
24196    # since paths with space are more likely in Windows. Give it another try with the whole
24197    # argument.
24198    path="$complete"
24199    arguments="EOL"
24200    new_path=`$CYGPATH -u "$path"`
24201    new_path=`$WHICH "$new_path" 2> /dev/null`
24202    if test "x$new_path" = x; then
24203      # It's still not found. Now this is an unrecoverable error.
24204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24205$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24206      has_space=`$ECHO "$complete" | $GREP " "`
24207      if test "x$has_space" != x; then
24208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24210      fi
24211      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24212    fi
24213  fi
24214
24215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24218  # "foo.exe" is OK but "foo" is an error.
24219  #
24220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24221  # It is also a way to make sure we got the proper file name for the real test later on.
24222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24223  if test "x$test_shortpath" = x; then
24224    # Short path failed, file does not exist as specified.
24225    # Try adding .exe or .cmd
24226    if test -f "${new_path}.exe"; then
24227       input_to_shortpath="${new_path}.exe"
24228    elif test -f "${new_path}.cmd"; then
24229       input_to_shortpath="${new_path}.cmd"
24230    else
24231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24232$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24233      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24234$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24235      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24236    fi
24237  else
24238    input_to_shortpath="$new_path"
24239  fi
24240
24241  # Call helper function which possibly converts this using DOS-style short mode.
24242  # If so, the updated path is stored in $new_path.
24243  new_path="$input_to_shortpath"
24244
24245  input_path="$input_to_shortpath"
24246  # Check if we need to convert this using DOS-style short mode. If the path
24247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24248  # take no chances and rewrite it.
24249  # Note: m4 eats our [], so we need to use [ and ] instead.
24250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24251  if test "x$has_forbidden_chars" != x; then
24252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24256      # Going to short mode and back again did indeed matter. Since short mode is
24257      # case insensitive, let's make it lowercase to improve readability.
24258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24259      # Now convert it back to Unix-stile (cygpath)
24260      input_path=`$CYGPATH -u "$shortmode_path"`
24261      new_path="$input_path"
24262    fi
24263  fi
24264
24265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24266  if test "x$test_cygdrive_prefix" = x; then
24267    # As a simple fix, exclude /usr/bin since it's not a real path.
24268    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24270      # a path prefixed by /cygdrive for fixpath to work.
24271      new_path="$CYGWIN_ROOT_PATH$input_path"
24272    fi
24273  fi
24274
24275  # remove trailing .exe if any
24276  new_path="${new_path/%.exe/}"
24277
24278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24279
24280  # First separate the path from the arguments. This will split at the first
24281  # space.
24282  complete="$MCS"
24283  path="${complete%% *}"
24284  tmp="$complete EOL"
24285  arguments="${tmp#* }"
24286
24287  # Input might be given as Windows format, start by converting to
24288  # unix format.
24289  new_path="$path"
24290
24291  windows_path="$new_path"
24292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24293    unix_path=`$CYGPATH -u "$windows_path"`
24294    new_path="$unix_path"
24295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24297    new_path="$unix_path"
24298  fi
24299
24300
24301  # Now try to locate executable using which
24302  new_path=`$WHICH "$new_path" 2> /dev/null`
24303
24304  if test "x$new_path" = x; then
24305    # Oops. Which didn't find the executable.
24306    # The splitting of arguments from the executable at a space might have been incorrect,
24307    # since paths with space are more likely in Windows. Give it another try with the whole
24308    # argument.
24309    path="$complete"
24310    arguments="EOL"
24311    new_path="$path"
24312
24313  windows_path="$new_path"
24314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24315    unix_path=`$CYGPATH -u "$windows_path"`
24316    new_path="$unix_path"
24317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24319    new_path="$unix_path"
24320  fi
24321
24322
24323    new_path=`$WHICH "$new_path" 2> /dev/null`
24324
24325    if test "x$new_path" = x; then
24326      # It's still not found. Now this is an unrecoverable error.
24327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24328$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24329      has_space=`$ECHO "$complete" | $GREP " "`
24330      if test "x$has_space" != x; then
24331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24333      fi
24334      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24335    fi
24336  fi
24337
24338  # Now new_path has a complete unix path to the binary
24339  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24340    # Keep paths in /bin as-is, but remove trailing .exe if any
24341    new_path="${new_path/%.exe/}"
24342    # Do not save /bin paths to all_fixpath_prefixes!
24343  else
24344    # Not in mixed or Windows style, start by that.
24345    new_path=`cmd //c echo $new_path`
24346
24347  input_path="$new_path"
24348  # Check if we need to convert this using DOS-style short mode. If the path
24349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24350  # take no chances and rewrite it.
24351  # Note: m4 eats our [], so we need to use [ and ] instead.
24352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24353  if test "x$has_forbidden_chars" != x; then
24354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24356  fi
24357
24358    # Output is in $new_path
24359
24360  windows_path="$new_path"
24361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24362    unix_path=`$CYGPATH -u "$windows_path"`
24363    new_path="$unix_path"
24364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24366    new_path="$unix_path"
24367  fi
24368
24369    # remove trailing .exe if any
24370    new_path="${new_path/%.exe/}"
24371
24372    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24373    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24374  fi
24375
24376  else
24377    # We're on a posix platform. Hooray! :)
24378    # First separate the path from the arguments. This will split at the first
24379    # space.
24380    complete="$MCS"
24381    path="${complete%% *}"
24382    tmp="$complete EOL"
24383    arguments="${tmp#* }"
24384
24385    new_path=`$WHICH $path 2> /dev/null`
24386    if test "x$new_path" = x; then
24387      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24388      if test "x$is_absolute_path" != x; then
24389        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24390$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24391        new_path="$path"
24392      else
24393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24394$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24395        has_space=`$ECHO "$complete" | $GREP " "`
24396        if test "x$has_space" != x; then
24397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24399        fi
24400        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24401      fi
24402    fi
24403  fi
24404
24405  # Now join together the path and the arguments once again
24406  if test "x$arguments" != xEOL; then
24407      new_complete="$new_path ${arguments% *}"
24408  else
24409      new_complete="$new_path"
24410  fi
24411
24412  if test "x$complete" != "x$new_complete"; then
24413    MCS="$new_complete"
24414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24415$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24416  fi
24417
24418elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24419    if test -n "$ac_tool_prefix"; then
24420  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24421set dummy ${ac_tool_prefix}nm; ac_word=$2
24422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24423$as_echo_n "checking for $ac_word... " >&6; }
24424if test "${ac_cv_prog_NM+set}" = set; then :
24425  $as_echo_n "(cached) " >&6
24426else
24427  if test -n "$NM"; then
24428  ac_cv_prog_NM="$NM" # Let the user override the test.
24429else
24430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24431for as_dir in $PATH
24432do
24433  IFS=$as_save_IFS
24434  test -z "$as_dir" && as_dir=.
24435    for ac_exec_ext in '' $ac_executable_extensions; do
24436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24437    ac_cv_prog_NM="${ac_tool_prefix}nm"
24438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24439    break 2
24440  fi
24441done
24442  done
24443IFS=$as_save_IFS
24444
24445fi
24446fi
24447NM=$ac_cv_prog_NM
24448if test -n "$NM"; then
24449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24450$as_echo "$NM" >&6; }
24451else
24452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24453$as_echo "no" >&6; }
24454fi
24455
24456
24457fi
24458if test -z "$ac_cv_prog_NM"; then
24459  ac_ct_NM=$NM
24460  # Extract the first word of "nm", so it can be a program name with args.
24461set dummy nm; ac_word=$2
24462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24463$as_echo_n "checking for $ac_word... " >&6; }
24464if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24465  $as_echo_n "(cached) " >&6
24466else
24467  if test -n "$ac_ct_NM"; then
24468  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24469else
24470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24471for as_dir in $PATH
24472do
24473  IFS=$as_save_IFS
24474  test -z "$as_dir" && as_dir=.
24475    for ac_exec_ext in '' $ac_executable_extensions; do
24476  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24477    ac_cv_prog_ac_ct_NM="nm"
24478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24479    break 2
24480  fi
24481done
24482  done
24483IFS=$as_save_IFS
24484
24485fi
24486fi
24487ac_ct_NM=$ac_cv_prog_ac_ct_NM
24488if test -n "$ac_ct_NM"; then
24489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24490$as_echo "$ac_ct_NM" >&6; }
24491else
24492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24493$as_echo "no" >&6; }
24494fi
24495
24496  if test "x$ac_ct_NM" = x; then
24497    NM=""
24498  else
24499    case $cross_compiling:$ac_tool_warned in
24500yes:)
24501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24503ac_tool_warned=yes ;;
24504esac
24505    NM=$ac_ct_NM
24506  fi
24507else
24508  NM="$ac_cv_prog_NM"
24509fi
24510
24511
24512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24513
24514  # First separate the path from the arguments. This will split at the first
24515  # space.
24516  complete="$NM"
24517  path="${complete%% *}"
24518  tmp="$complete EOL"
24519  arguments="${tmp#* }"
24520
24521  # Input might be given as Windows format, start by converting to
24522  # unix format.
24523  new_path=`$CYGPATH -u "$path"`
24524
24525  # Now try to locate executable using which
24526  new_path=`$WHICH "$new_path" 2> /dev/null`
24527  if test "x$new_path" = x; then
24528    # Oops. Which didn't find the executable.
24529    # The splitting of arguments from the executable at a space might have been incorrect,
24530    # since paths with space are more likely in Windows. Give it another try with the whole
24531    # argument.
24532    path="$complete"
24533    arguments="EOL"
24534    new_path=`$CYGPATH -u "$path"`
24535    new_path=`$WHICH "$new_path" 2> /dev/null`
24536    if test "x$new_path" = x; then
24537      # It's still not found. Now this is an unrecoverable error.
24538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24539$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24540      has_space=`$ECHO "$complete" | $GREP " "`
24541      if test "x$has_space" != x; then
24542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24544      fi
24545      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24546    fi
24547  fi
24548
24549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24552  # "foo.exe" is OK but "foo" is an error.
24553  #
24554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24555  # It is also a way to make sure we got the proper file name for the real test later on.
24556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24557  if test "x$test_shortpath" = x; then
24558    # Short path failed, file does not exist as specified.
24559    # Try adding .exe or .cmd
24560    if test -f "${new_path}.exe"; then
24561       input_to_shortpath="${new_path}.exe"
24562    elif test -f "${new_path}.cmd"; then
24563       input_to_shortpath="${new_path}.cmd"
24564    else
24565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24566$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24569      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24570    fi
24571  else
24572    input_to_shortpath="$new_path"
24573  fi
24574
24575  # Call helper function which possibly converts this using DOS-style short mode.
24576  # If so, the updated path is stored in $new_path.
24577  new_path="$input_to_shortpath"
24578
24579  input_path="$input_to_shortpath"
24580  # Check if we need to convert this using DOS-style short mode. If the path
24581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24582  # take no chances and rewrite it.
24583  # Note: m4 eats our [], so we need to use [ and ] instead.
24584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24585  if test "x$has_forbidden_chars" != x; then
24586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24590      # Going to short mode and back again did indeed matter. Since short mode is
24591      # case insensitive, let's make it lowercase to improve readability.
24592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24593      # Now convert it back to Unix-stile (cygpath)
24594      input_path=`$CYGPATH -u "$shortmode_path"`
24595      new_path="$input_path"
24596    fi
24597  fi
24598
24599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24600  if test "x$test_cygdrive_prefix" = x; then
24601    # As a simple fix, exclude /usr/bin since it's not a real path.
24602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24604      # a path prefixed by /cygdrive for fixpath to work.
24605      new_path="$CYGWIN_ROOT_PATH$input_path"
24606    fi
24607  fi
24608
24609  # remove trailing .exe if any
24610  new_path="${new_path/%.exe/}"
24611
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613
24614  # First separate the path from the arguments. This will split at the first
24615  # space.
24616  complete="$NM"
24617  path="${complete%% *}"
24618  tmp="$complete EOL"
24619  arguments="${tmp#* }"
24620
24621  # Input might be given as Windows format, start by converting to
24622  # unix format.
24623  new_path="$path"
24624
24625  windows_path="$new_path"
24626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24627    unix_path=`$CYGPATH -u "$windows_path"`
24628    new_path="$unix_path"
24629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24631    new_path="$unix_path"
24632  fi
24633
24634
24635  # Now try to locate executable using which
24636  new_path=`$WHICH "$new_path" 2> /dev/null`
24637
24638  if test "x$new_path" = x; then
24639    # Oops. Which didn't find the executable.
24640    # The splitting of arguments from the executable at a space might have been incorrect,
24641    # since paths with space are more likely in Windows. Give it another try with the whole
24642    # argument.
24643    path="$complete"
24644    arguments="EOL"
24645    new_path="$path"
24646
24647  windows_path="$new_path"
24648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24649    unix_path=`$CYGPATH -u "$windows_path"`
24650    new_path="$unix_path"
24651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24653    new_path="$unix_path"
24654  fi
24655
24656
24657    new_path=`$WHICH "$new_path" 2> /dev/null`
24658
24659    if test "x$new_path" = x; then
24660      # It's still not found. Now this is an unrecoverable error.
24661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24662$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24663      has_space=`$ECHO "$complete" | $GREP " "`
24664      if test "x$has_space" != x; then
24665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24667      fi
24668      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24669    fi
24670  fi
24671
24672  # Now new_path has a complete unix path to the binary
24673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24674    # Keep paths in /bin as-is, but remove trailing .exe if any
24675    new_path="${new_path/%.exe/}"
24676    # Do not save /bin paths to all_fixpath_prefixes!
24677  else
24678    # Not in mixed or Windows style, start by that.
24679    new_path=`cmd //c echo $new_path`
24680
24681  input_path="$new_path"
24682  # Check if we need to convert this using DOS-style short mode. If the path
24683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24684  # take no chances and rewrite it.
24685  # Note: m4 eats our [], so we need to use [ and ] instead.
24686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24687  if test "x$has_forbidden_chars" != x; then
24688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24690  fi
24691
24692    # Output is in $new_path
24693
24694  windows_path="$new_path"
24695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24696    unix_path=`$CYGPATH -u "$windows_path"`
24697    new_path="$unix_path"
24698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24700    new_path="$unix_path"
24701  fi
24702
24703    # remove trailing .exe if any
24704    new_path="${new_path/%.exe/}"
24705
24706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24708  fi
24709
24710  else
24711    # We're on a posix platform. Hooray! :)
24712    # First separate the path from the arguments. This will split at the first
24713    # space.
24714    complete="$NM"
24715    path="${complete%% *}"
24716    tmp="$complete EOL"
24717    arguments="${tmp#* }"
24718
24719    new_path=`$WHICH $path 2> /dev/null`
24720    if test "x$new_path" = x; then
24721      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24722      if test "x$is_absolute_path" != x; then
24723        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24724$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24725        new_path="$path"
24726      else
24727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24728$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24729        has_space=`$ECHO "$complete" | $GREP " "`
24730        if test "x$has_space" != x; then
24731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24733        fi
24734        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24735      fi
24736    fi
24737  fi
24738
24739  # Now join together the path and the arguments once again
24740  if test "x$arguments" != xEOL; then
24741      new_complete="$new_path ${arguments% *}"
24742  else
24743      new_complete="$new_path"
24744  fi
24745
24746  if test "x$complete" != "x$new_complete"; then
24747    NM="$new_complete"
24748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24749$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24750  fi
24751
24752    if test -n "$ac_tool_prefix"; then
24753  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
24754set dummy ${ac_tool_prefix}strip; ac_word=$2
24755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24756$as_echo_n "checking for $ac_word... " >&6; }
24757if test "${ac_cv_prog_STRIP+set}" = set; then :
24758  $as_echo_n "(cached) " >&6
24759else
24760  if test -n "$STRIP"; then
24761  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
24762else
24763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24764for as_dir in $PATH
24765do
24766  IFS=$as_save_IFS
24767  test -z "$as_dir" && as_dir=.
24768    for ac_exec_ext in '' $ac_executable_extensions; do
24769  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24770    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
24771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24772    break 2
24773  fi
24774done
24775  done
24776IFS=$as_save_IFS
24777
24778fi
24779fi
24780STRIP=$ac_cv_prog_STRIP
24781if test -n "$STRIP"; then
24782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24783$as_echo "$STRIP" >&6; }
24784else
24785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24786$as_echo "no" >&6; }
24787fi
24788
24789
24790fi
24791if test -z "$ac_cv_prog_STRIP"; then
24792  ac_ct_STRIP=$STRIP
24793  # Extract the first word of "strip", so it can be a program name with args.
24794set dummy strip; ac_word=$2
24795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24796$as_echo_n "checking for $ac_word... " >&6; }
24797if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
24798  $as_echo_n "(cached) " >&6
24799else
24800  if test -n "$ac_ct_STRIP"; then
24801  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
24802else
24803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24804for as_dir in $PATH
24805do
24806  IFS=$as_save_IFS
24807  test -z "$as_dir" && as_dir=.
24808    for ac_exec_ext in '' $ac_executable_extensions; do
24809  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24810    ac_cv_prog_ac_ct_STRIP="strip"
24811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24812    break 2
24813  fi
24814done
24815  done
24816IFS=$as_save_IFS
24817
24818fi
24819fi
24820ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
24821if test -n "$ac_ct_STRIP"; then
24822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
24823$as_echo "$ac_ct_STRIP" >&6; }
24824else
24825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24826$as_echo "no" >&6; }
24827fi
24828
24829  if test "x$ac_ct_STRIP" = x; then
24830    STRIP=""
24831  else
24832    case $cross_compiling:$ac_tool_warned in
24833yes:)
24834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24836ac_tool_warned=yes ;;
24837esac
24838    STRIP=$ac_ct_STRIP
24839  fi
24840else
24841  STRIP="$ac_cv_prog_STRIP"
24842fi
24843
24844
24845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846
24847  # First separate the path from the arguments. This will split at the first
24848  # space.
24849  complete="$STRIP"
24850  path="${complete%% *}"
24851  tmp="$complete EOL"
24852  arguments="${tmp#* }"
24853
24854  # Input might be given as Windows format, start by converting to
24855  # unix format.
24856  new_path=`$CYGPATH -u "$path"`
24857
24858  # Now try to locate executable using which
24859  new_path=`$WHICH "$new_path" 2> /dev/null`
24860  if test "x$new_path" = x; then
24861    # Oops. Which didn't find the executable.
24862    # The splitting of arguments from the executable at a space might have been incorrect,
24863    # since paths with space are more likely in Windows. Give it another try with the whole
24864    # argument.
24865    path="$complete"
24866    arguments="EOL"
24867    new_path=`$CYGPATH -u "$path"`
24868    new_path=`$WHICH "$new_path" 2> /dev/null`
24869    if test "x$new_path" = x; then
24870      # It's still not found. Now this is an unrecoverable error.
24871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24872$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24873      has_space=`$ECHO "$complete" | $GREP " "`
24874      if test "x$has_space" != x; then
24875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24877      fi
24878      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24879    fi
24880  fi
24881
24882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24885  # "foo.exe" is OK but "foo" is an error.
24886  #
24887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24888  # It is also a way to make sure we got the proper file name for the real test later on.
24889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24890  if test "x$test_shortpath" = x; then
24891    # Short path failed, file does not exist as specified.
24892    # Try adding .exe or .cmd
24893    if test -f "${new_path}.exe"; then
24894       input_to_shortpath="${new_path}.exe"
24895    elif test -f "${new_path}.cmd"; then
24896       input_to_shortpath="${new_path}.cmd"
24897    else
24898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24899$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24902      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24903    fi
24904  else
24905    input_to_shortpath="$new_path"
24906  fi
24907
24908  # Call helper function which possibly converts this using DOS-style short mode.
24909  # If so, the updated path is stored in $new_path.
24910  new_path="$input_to_shortpath"
24911
24912  input_path="$input_to_shortpath"
24913  # Check if we need to convert this using DOS-style short mode. If the path
24914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24915  # take no chances and rewrite it.
24916  # Note: m4 eats our [], so we need to use [ and ] instead.
24917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24918  if test "x$has_forbidden_chars" != x; then
24919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24923      # Going to short mode and back again did indeed matter. Since short mode is
24924      # case insensitive, let's make it lowercase to improve readability.
24925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926      # Now convert it back to Unix-stile (cygpath)
24927      input_path=`$CYGPATH -u "$shortmode_path"`
24928      new_path="$input_path"
24929    fi
24930  fi
24931
24932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24933  if test "x$test_cygdrive_prefix" = x; then
24934    # As a simple fix, exclude /usr/bin since it's not a real path.
24935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24937      # a path prefixed by /cygdrive for fixpath to work.
24938      new_path="$CYGWIN_ROOT_PATH$input_path"
24939    fi
24940  fi
24941
24942  # remove trailing .exe if any
24943  new_path="${new_path/%.exe/}"
24944
24945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24946
24947  # First separate the path from the arguments. This will split at the first
24948  # space.
24949  complete="$STRIP"
24950  path="${complete%% *}"
24951  tmp="$complete EOL"
24952  arguments="${tmp#* }"
24953
24954  # Input might be given as Windows format, start by converting to
24955  # unix format.
24956  new_path="$path"
24957
24958  windows_path="$new_path"
24959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960    unix_path=`$CYGPATH -u "$windows_path"`
24961    new_path="$unix_path"
24962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964    new_path="$unix_path"
24965  fi
24966
24967
24968  # Now try to locate executable using which
24969  new_path=`$WHICH "$new_path" 2> /dev/null`
24970
24971  if test "x$new_path" = x; then
24972    # Oops. Which didn't find the executable.
24973    # The splitting of arguments from the executable at a space might have been incorrect,
24974    # since paths with space are more likely in Windows. Give it another try with the whole
24975    # argument.
24976    path="$complete"
24977    arguments="EOL"
24978    new_path="$path"
24979
24980  windows_path="$new_path"
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982    unix_path=`$CYGPATH -u "$windows_path"`
24983    new_path="$unix_path"
24984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24986    new_path="$unix_path"
24987  fi
24988
24989
24990    new_path=`$WHICH "$new_path" 2> /dev/null`
24991
24992    if test "x$new_path" = x; then
24993      # It's still not found. Now this is an unrecoverable error.
24994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24995$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24996      has_space=`$ECHO "$complete" | $GREP " "`
24997      if test "x$has_space" != x; then
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25000      fi
25001      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25002    fi
25003  fi
25004
25005  # Now new_path has a complete unix path to the binary
25006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25007    # Keep paths in /bin as-is, but remove trailing .exe if any
25008    new_path="${new_path/%.exe/}"
25009    # Do not save /bin paths to all_fixpath_prefixes!
25010  else
25011    # Not in mixed or Windows style, start by that.
25012    new_path=`cmd //c echo $new_path`
25013
25014  input_path="$new_path"
25015  # Check if we need to convert this using DOS-style short mode. If the path
25016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25017  # take no chances and rewrite it.
25018  # Note: m4 eats our [], so we need to use [ and ] instead.
25019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25020  if test "x$has_forbidden_chars" != x; then
25021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25023  fi
25024
25025    # Output is in $new_path
25026
25027  windows_path="$new_path"
25028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25029    unix_path=`$CYGPATH -u "$windows_path"`
25030    new_path="$unix_path"
25031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25033    new_path="$unix_path"
25034  fi
25035
25036    # remove trailing .exe if any
25037    new_path="${new_path/%.exe/}"
25038
25039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25041  fi
25042
25043  else
25044    # We're on a posix platform. Hooray! :)
25045    # First separate the path from the arguments. This will split at the first
25046    # space.
25047    complete="$STRIP"
25048    path="${complete%% *}"
25049    tmp="$complete EOL"
25050    arguments="${tmp#* }"
25051
25052    new_path=`$WHICH $path 2> /dev/null`
25053    if test "x$new_path" = x; then
25054      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25055      if test "x$is_absolute_path" != x; then
25056        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25057$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25058        new_path="$path"
25059      else
25060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25061$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25062        has_space=`$ECHO "$complete" | $GREP " "`
25063        if test "x$has_space" != x; then
25064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25066        fi
25067        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25068      fi
25069    fi
25070  fi
25071
25072  # Now join together the path and the arguments once again
25073  if test "x$arguments" != xEOL; then
25074      new_complete="$new_path ${arguments% *}"
25075  else
25076      new_complete="$new_path"
25077  fi
25078
25079  if test "x$complete" != "x$new_complete"; then
25080    STRIP="$new_complete"
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25082$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25083  fi
25084
25085fi
25086
25087# objcopy is used for moving debug symbols to separate files when
25088# full debug symbols are enabled.
25089if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25090    if test -n "$ac_tool_prefix"; then
25091  for ac_prog in gobjcopy objcopy
25092  do
25093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25096$as_echo_n "checking for $ac_word... " >&6; }
25097if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25098  $as_echo_n "(cached) " >&6
25099else
25100  if test -n "$OBJCOPY"; then
25101  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25102else
25103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25104for as_dir in $PATH
25105do
25106  IFS=$as_save_IFS
25107  test -z "$as_dir" && as_dir=.
25108    for ac_exec_ext in '' $ac_executable_extensions; do
25109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25110    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25112    break 2
25113  fi
25114done
25115  done
25116IFS=$as_save_IFS
25117
25118fi
25119fi
25120OBJCOPY=$ac_cv_prog_OBJCOPY
25121if test -n "$OBJCOPY"; then
25122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25123$as_echo "$OBJCOPY" >&6; }
25124else
25125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25126$as_echo "no" >&6; }
25127fi
25128
25129
25130    test -n "$OBJCOPY" && break
25131  done
25132fi
25133if test -z "$OBJCOPY"; then
25134  ac_ct_OBJCOPY=$OBJCOPY
25135  for ac_prog in gobjcopy objcopy
25136do
25137  # Extract the first word of "$ac_prog", so it can be a program name with args.
25138set dummy $ac_prog; ac_word=$2
25139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25140$as_echo_n "checking for $ac_word... " >&6; }
25141if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25142  $as_echo_n "(cached) " >&6
25143else
25144  if test -n "$ac_ct_OBJCOPY"; then
25145  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25146else
25147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25148for as_dir in $PATH
25149do
25150  IFS=$as_save_IFS
25151  test -z "$as_dir" && as_dir=.
25152    for ac_exec_ext in '' $ac_executable_extensions; do
25153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25154    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25156    break 2
25157  fi
25158done
25159  done
25160IFS=$as_save_IFS
25161
25162fi
25163fi
25164ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25165if test -n "$ac_ct_OBJCOPY"; then
25166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25167$as_echo "$ac_ct_OBJCOPY" >&6; }
25168else
25169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25170$as_echo "no" >&6; }
25171fi
25172
25173
25174  test -n "$ac_ct_OBJCOPY" && break
25175done
25176
25177  if test "x$ac_ct_OBJCOPY" = x; then
25178    OBJCOPY=""
25179  else
25180    case $cross_compiling:$ac_tool_warned in
25181yes:)
25182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25184ac_tool_warned=yes ;;
25185esac
25186    OBJCOPY=$ac_ct_OBJCOPY
25187  fi
25188fi
25189
25190
25191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25192
25193  # First separate the path from the arguments. This will split at the first
25194  # space.
25195  complete="$OBJCOPY"
25196  path="${complete%% *}"
25197  tmp="$complete EOL"
25198  arguments="${tmp#* }"
25199
25200  # Input might be given as Windows format, start by converting to
25201  # unix format.
25202  new_path=`$CYGPATH -u "$path"`
25203
25204  # Now try to locate executable using which
25205  new_path=`$WHICH "$new_path" 2> /dev/null`
25206  if test "x$new_path" = x; then
25207    # Oops. Which didn't find the executable.
25208    # The splitting of arguments from the executable at a space might have been incorrect,
25209    # since paths with space are more likely in Windows. Give it another try with the whole
25210    # argument.
25211    path="$complete"
25212    arguments="EOL"
25213    new_path=`$CYGPATH -u "$path"`
25214    new_path=`$WHICH "$new_path" 2> /dev/null`
25215    if test "x$new_path" = x; then
25216      # It's still not found. Now this is an unrecoverable error.
25217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25218$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25219      has_space=`$ECHO "$complete" | $GREP " "`
25220      if test "x$has_space" != x; then
25221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25223      fi
25224      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25225    fi
25226  fi
25227
25228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25231  # "foo.exe" is OK but "foo" is an error.
25232  #
25233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25234  # It is also a way to make sure we got the proper file name for the real test later on.
25235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25236  if test "x$test_shortpath" = x; then
25237    # Short path failed, file does not exist as specified.
25238    # Try adding .exe or .cmd
25239    if test -f "${new_path}.exe"; then
25240       input_to_shortpath="${new_path}.exe"
25241    elif test -f "${new_path}.cmd"; then
25242       input_to_shortpath="${new_path}.cmd"
25243    else
25244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25245$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25248      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25249    fi
25250  else
25251    input_to_shortpath="$new_path"
25252  fi
25253
25254  # Call helper function which possibly converts this using DOS-style short mode.
25255  # If so, the updated path is stored in $new_path.
25256  new_path="$input_to_shortpath"
25257
25258  input_path="$input_to_shortpath"
25259  # Check if we need to convert this using DOS-style short mode. If the path
25260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25261  # take no chances and rewrite it.
25262  # Note: m4 eats our [], so we need to use [ and ] instead.
25263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25264  if test "x$has_forbidden_chars" != x; then
25265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25269      # Going to short mode and back again did indeed matter. Since short mode is
25270      # case insensitive, let's make it lowercase to improve readability.
25271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25272      # Now convert it back to Unix-stile (cygpath)
25273      input_path=`$CYGPATH -u "$shortmode_path"`
25274      new_path="$input_path"
25275    fi
25276  fi
25277
25278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25279  if test "x$test_cygdrive_prefix" = x; then
25280    # As a simple fix, exclude /usr/bin since it's not a real path.
25281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25283      # a path prefixed by /cygdrive for fixpath to work.
25284      new_path="$CYGWIN_ROOT_PATH$input_path"
25285    fi
25286  fi
25287
25288  # remove trailing .exe if any
25289  new_path="${new_path/%.exe/}"
25290
25291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25292
25293  # First separate the path from the arguments. This will split at the first
25294  # space.
25295  complete="$OBJCOPY"
25296  path="${complete%% *}"
25297  tmp="$complete EOL"
25298  arguments="${tmp#* }"
25299
25300  # Input might be given as Windows format, start by converting to
25301  # unix format.
25302  new_path="$path"
25303
25304  windows_path="$new_path"
25305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25306    unix_path=`$CYGPATH -u "$windows_path"`
25307    new_path="$unix_path"
25308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25310    new_path="$unix_path"
25311  fi
25312
25313
25314  # Now try to locate executable using which
25315  new_path=`$WHICH "$new_path" 2> /dev/null`
25316
25317  if test "x$new_path" = x; then
25318    # Oops. Which didn't find the executable.
25319    # The splitting of arguments from the executable at a space might have been incorrect,
25320    # since paths with space are more likely in Windows. Give it another try with the whole
25321    # argument.
25322    path="$complete"
25323    arguments="EOL"
25324    new_path="$path"
25325
25326  windows_path="$new_path"
25327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25328    unix_path=`$CYGPATH -u "$windows_path"`
25329    new_path="$unix_path"
25330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25332    new_path="$unix_path"
25333  fi
25334
25335
25336    new_path=`$WHICH "$new_path" 2> /dev/null`
25337
25338    if test "x$new_path" = x; then
25339      # It's still not found. Now this is an unrecoverable error.
25340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25341$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25342      has_space=`$ECHO "$complete" | $GREP " "`
25343      if test "x$has_space" != x; then
25344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25346      fi
25347      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25348    fi
25349  fi
25350
25351  # Now new_path has a complete unix path to the binary
25352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25353    # Keep paths in /bin as-is, but remove trailing .exe if any
25354    new_path="${new_path/%.exe/}"
25355    # Do not save /bin paths to all_fixpath_prefixes!
25356  else
25357    # Not in mixed or Windows style, start by that.
25358    new_path=`cmd //c echo $new_path`
25359
25360  input_path="$new_path"
25361  # Check if we need to convert this using DOS-style short mode. If the path
25362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25363  # take no chances and rewrite it.
25364  # Note: m4 eats our [], so we need to use [ and ] instead.
25365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25366  if test "x$has_forbidden_chars" != x; then
25367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25369  fi
25370
25371    # Output is in $new_path
25372
25373  windows_path="$new_path"
25374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25375    unix_path=`$CYGPATH -u "$windows_path"`
25376    new_path="$unix_path"
25377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25379    new_path="$unix_path"
25380  fi
25381
25382    # remove trailing .exe if any
25383    new_path="${new_path/%.exe/}"
25384
25385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25387  fi
25388
25389  else
25390    # We're on a posix platform. Hooray! :)
25391    # First separate the path from the arguments. This will split at the first
25392    # space.
25393    complete="$OBJCOPY"
25394    path="${complete%% *}"
25395    tmp="$complete EOL"
25396    arguments="${tmp#* }"
25397
25398    new_path=`$WHICH $path 2> /dev/null`
25399    if test "x$new_path" = x; then
25400      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25401      if test "x$is_absolute_path" != x; then
25402        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25403$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25404        new_path="$path"
25405      else
25406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25407$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25408        has_space=`$ECHO "$complete" | $GREP " "`
25409        if test "x$has_space" != x; then
25410          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25411$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25412        fi
25413        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25414      fi
25415    fi
25416  fi
25417
25418  # Now join together the path and the arguments once again
25419  if test "x$arguments" != xEOL; then
25420      new_complete="$new_path ${arguments% *}"
25421  else
25422      new_complete="$new_path"
25423  fi
25424
25425  if test "x$complete" != "x$new_complete"; then
25426    OBJCOPY="$new_complete"
25427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25428$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25429  fi
25430
25431fi
25432
25433if test -n "$ac_tool_prefix"; then
25434  for ac_prog in gobjdump objdump
25435  do
25436    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25437set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25439$as_echo_n "checking for $ac_word... " >&6; }
25440if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25441  $as_echo_n "(cached) " >&6
25442else
25443  if test -n "$OBJDUMP"; then
25444  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25445else
25446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25447for as_dir in $PATH
25448do
25449  IFS=$as_save_IFS
25450  test -z "$as_dir" && as_dir=.
25451    for ac_exec_ext in '' $ac_executable_extensions; do
25452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25453    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25455    break 2
25456  fi
25457done
25458  done
25459IFS=$as_save_IFS
25460
25461fi
25462fi
25463OBJDUMP=$ac_cv_prog_OBJDUMP
25464if test -n "$OBJDUMP"; then
25465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25466$as_echo "$OBJDUMP" >&6; }
25467else
25468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25469$as_echo "no" >&6; }
25470fi
25471
25472
25473    test -n "$OBJDUMP" && break
25474  done
25475fi
25476if test -z "$OBJDUMP"; then
25477  ac_ct_OBJDUMP=$OBJDUMP
25478  for ac_prog in gobjdump objdump
25479do
25480  # Extract the first word of "$ac_prog", so it can be a program name with args.
25481set dummy $ac_prog; ac_word=$2
25482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25483$as_echo_n "checking for $ac_word... " >&6; }
25484if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
25485  $as_echo_n "(cached) " >&6
25486else
25487  if test -n "$ac_ct_OBJDUMP"; then
25488  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
25489else
25490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25491for as_dir in $PATH
25492do
25493  IFS=$as_save_IFS
25494  test -z "$as_dir" && as_dir=.
25495    for ac_exec_ext in '' $ac_executable_extensions; do
25496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25497    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
25498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25499    break 2
25500  fi
25501done
25502  done
25503IFS=$as_save_IFS
25504
25505fi
25506fi
25507ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
25508if test -n "$ac_ct_OBJDUMP"; then
25509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
25510$as_echo "$ac_ct_OBJDUMP" >&6; }
25511else
25512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25513$as_echo "no" >&6; }
25514fi
25515
25516
25517  test -n "$ac_ct_OBJDUMP" && break
25518done
25519
25520  if test "x$ac_ct_OBJDUMP" = x; then
25521    OBJDUMP=""
25522  else
25523    case $cross_compiling:$ac_tool_warned in
25524yes:)
25525{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25526$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25527ac_tool_warned=yes ;;
25528esac
25529    OBJDUMP=$ac_ct_OBJDUMP
25530  fi
25531fi
25532
25533if test "x$OBJDUMP" != x; then
25534  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
25535
25536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25537
25538  # First separate the path from the arguments. This will split at the first
25539  # space.
25540  complete="$OBJDUMP"
25541  path="${complete%% *}"
25542  tmp="$complete EOL"
25543  arguments="${tmp#* }"
25544
25545  # Input might be given as Windows format, start by converting to
25546  # unix format.
25547  new_path=`$CYGPATH -u "$path"`
25548
25549  # Now try to locate executable using which
25550  new_path=`$WHICH "$new_path" 2> /dev/null`
25551  if test "x$new_path" = x; then
25552    # Oops. Which didn't find the executable.
25553    # The splitting of arguments from the executable at a space might have been incorrect,
25554    # since paths with space are more likely in Windows. Give it another try with the whole
25555    # argument.
25556    path="$complete"
25557    arguments="EOL"
25558    new_path=`$CYGPATH -u "$path"`
25559    new_path=`$WHICH "$new_path" 2> /dev/null`
25560    if test "x$new_path" = x; then
25561      # It's still not found. Now this is an unrecoverable error.
25562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25563$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25564      has_space=`$ECHO "$complete" | $GREP " "`
25565      if test "x$has_space" != x; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25568      fi
25569      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25570    fi
25571  fi
25572
25573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25576  # "foo.exe" is OK but "foo" is an error.
25577  #
25578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25579  # It is also a way to make sure we got the proper file name for the real test later on.
25580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25581  if test "x$test_shortpath" = x; then
25582    # Short path failed, file does not exist as specified.
25583    # Try adding .exe or .cmd
25584    if test -f "${new_path}.exe"; then
25585       input_to_shortpath="${new_path}.exe"
25586    elif test -f "${new_path}.cmd"; then
25587       input_to_shortpath="${new_path}.cmd"
25588    else
25589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
25590$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
25591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25593      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25594    fi
25595  else
25596    input_to_shortpath="$new_path"
25597  fi
25598
25599  # Call helper function which possibly converts this using DOS-style short mode.
25600  # If so, the updated path is stored in $new_path.
25601  new_path="$input_to_shortpath"
25602
25603  input_path="$input_to_shortpath"
25604  # Check if we need to convert this using DOS-style short mode. If the path
25605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25606  # take no chances and rewrite it.
25607  # Note: m4 eats our [], so we need to use [ and ] instead.
25608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25609  if test "x$has_forbidden_chars" != x; then
25610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25614      # Going to short mode and back again did indeed matter. Since short mode is
25615      # case insensitive, let's make it lowercase to improve readability.
25616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25617      # Now convert it back to Unix-stile (cygpath)
25618      input_path=`$CYGPATH -u "$shortmode_path"`
25619      new_path="$input_path"
25620    fi
25621  fi
25622
25623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25624  if test "x$test_cygdrive_prefix" = x; then
25625    # As a simple fix, exclude /usr/bin since it's not a real path.
25626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25628      # a path prefixed by /cygdrive for fixpath to work.
25629      new_path="$CYGWIN_ROOT_PATH$input_path"
25630    fi
25631  fi
25632
25633  # remove trailing .exe if any
25634  new_path="${new_path/%.exe/}"
25635
25636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25637
25638  # First separate the path from the arguments. This will split at the first
25639  # space.
25640  complete="$OBJDUMP"
25641  path="${complete%% *}"
25642  tmp="$complete EOL"
25643  arguments="${tmp#* }"
25644
25645  # Input might be given as Windows format, start by converting to
25646  # unix format.
25647  new_path="$path"
25648
25649  windows_path="$new_path"
25650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25651    unix_path=`$CYGPATH -u "$windows_path"`
25652    new_path="$unix_path"
25653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25655    new_path="$unix_path"
25656  fi
25657
25658
25659  # Now try to locate executable using which
25660  new_path=`$WHICH "$new_path" 2> /dev/null`
25661
25662  if test "x$new_path" = x; then
25663    # Oops. Which didn't find the executable.
25664    # The splitting of arguments from the executable at a space might have been incorrect,
25665    # since paths with space are more likely in Windows. Give it another try with the whole
25666    # argument.
25667    path="$complete"
25668    arguments="EOL"
25669    new_path="$path"
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680
25681    new_path=`$WHICH "$new_path" 2> /dev/null`
25682
25683    if test "x$new_path" = x; then
25684      # It's still not found. Now this is an unrecoverable error.
25685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25686$as_echo "$as_me: The path of OBJDUMP, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25691      fi
25692      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25693    fi
25694  fi
25695
25696  # Now new_path has a complete unix path to the binary
25697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25698    # Keep paths in /bin as-is, but remove trailing .exe if any
25699    new_path="${new_path/%.exe/}"
25700    # Do not save /bin paths to all_fixpath_prefixes!
25701  else
25702    # Not in mixed or Windows style, start by that.
25703    new_path=`cmd //c echo $new_path`
25704
25705  input_path="$new_path"
25706  # Check if we need to convert this using DOS-style short mode. If the path
25707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25708  # take no chances and rewrite it.
25709  # Note: m4 eats our [], so we need to use [ and ] instead.
25710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25711  if test "x$has_forbidden_chars" != x; then
25712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25714  fi
25715
25716    # Output is in $new_path
25717
25718  windows_path="$new_path"
25719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25720    unix_path=`$CYGPATH -u "$windows_path"`
25721    new_path="$unix_path"
25722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25724    new_path="$unix_path"
25725  fi
25726
25727    # remove trailing .exe if any
25728    new_path="${new_path/%.exe/}"
25729
25730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25732  fi
25733
25734  else
25735    # We're on a posix platform. Hooray! :)
25736    # First separate the path from the arguments. This will split at the first
25737    # space.
25738    complete="$OBJDUMP"
25739    path="${complete%% *}"
25740    tmp="$complete EOL"
25741    arguments="${tmp#* }"
25742
25743    new_path=`$WHICH $path 2> /dev/null`
25744    if test "x$new_path" = x; then
25745      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25746      if test "x$is_absolute_path" != x; then
25747        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
25748$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
25749        new_path="$path"
25750      else
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
25752$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
25753        has_space=`$ECHO "$complete" | $GREP " "`
25754        if test "x$has_space" != x; then
25755          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25756$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25757        fi
25758        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
25759      fi
25760    fi
25761  fi
25762
25763  # Now join together the path and the arguments once again
25764  if test "x$arguments" != xEOL; then
25765      new_complete="$new_path ${arguments% *}"
25766  else
25767      new_complete="$new_path"
25768  fi
25769
25770  if test "x$complete" != "x$new_complete"; then
25771    OBJDUMP="$new_complete"
25772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
25773$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
25774  fi
25775
25776fi
25777
25778if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
25779   # Extract the first word of "lipo", so it can be a program name with args.
25780set dummy lipo; ac_word=$2
25781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25782$as_echo_n "checking for $ac_word... " >&6; }
25783if test "${ac_cv_path_LIPO+set}" = set; then :
25784  $as_echo_n "(cached) " >&6
25785else
25786  case $LIPO in
25787  [\\/]* | ?:[\\/]*)
25788  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
25789  ;;
25790  *)
25791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25792for as_dir in $PATH
25793do
25794  IFS=$as_save_IFS
25795  test -z "$as_dir" && as_dir=.
25796    for ac_exec_ext in '' $ac_executable_extensions; do
25797  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25798    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
25799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25800    break 2
25801  fi
25802done
25803  done
25804IFS=$as_save_IFS
25805
25806  ;;
25807esac
25808fi
25809LIPO=$ac_cv_path_LIPO
25810if test -n "$LIPO"; then
25811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
25812$as_echo "$LIPO" >&6; }
25813else
25814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25815$as_echo "no" >&6; }
25816fi
25817
25818
25819
25820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # First separate the path from the arguments. This will split at the first
25823  # space.
25824  complete="$LIPO"
25825  path="${complete%% *}"
25826  tmp="$complete EOL"
25827  arguments="${tmp#* }"
25828
25829  # Input might be given as Windows format, start by converting to
25830  # unix format.
25831  new_path=`$CYGPATH -u "$path"`
25832
25833  # Now try to locate executable using which
25834  new_path=`$WHICH "$new_path" 2> /dev/null`
25835  if test "x$new_path" = x; then
25836    # Oops. Which didn't find the executable.
25837    # The splitting of arguments from the executable at a space might have been incorrect,
25838    # since paths with space are more likely in Windows. Give it another try with the whole
25839    # argument.
25840    path="$complete"
25841    arguments="EOL"
25842    new_path=`$CYGPATH -u "$path"`
25843    new_path=`$WHICH "$new_path" 2> /dev/null`
25844    if test "x$new_path" = x; then
25845      # It's still not found. Now this is an unrecoverable error.
25846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
25847$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
25848      has_space=`$ECHO "$complete" | $GREP " "`
25849      if test "x$has_space" != x; then
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25852      fi
25853      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25854    fi
25855  fi
25856
25857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25860  # "foo.exe" is OK but "foo" is an error.
25861  #
25862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25863  # It is also a way to make sure we got the proper file name for the real test later on.
25864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25865  if test "x$test_shortpath" = x; then
25866    # Short path failed, file does not exist as specified.
25867    # Try adding .exe or .cmd
25868    if test -f "${new_path}.exe"; then
25869       input_to_shortpath="${new_path}.exe"
25870    elif test -f "${new_path}.cmd"; then
25871       input_to_shortpath="${new_path}.cmd"
25872    else
25873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
25874$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
25875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25877      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25878    fi
25879  else
25880    input_to_shortpath="$new_path"
25881  fi
25882
25883  # Call helper function which possibly converts this using DOS-style short mode.
25884  # If so, the updated path is stored in $new_path.
25885  new_path="$input_to_shortpath"
25886
25887  input_path="$input_to_shortpath"
25888  # Check if we need to convert this using DOS-style short mode. If the path
25889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25890  # take no chances and rewrite it.
25891  # Note: m4 eats our [], so we need to use [ and ] instead.
25892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25893  if test "x$has_forbidden_chars" != x; then
25894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25898      # Going to short mode and back again did indeed matter. Since short mode is
25899      # case insensitive, let's make it lowercase to improve readability.
25900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25901      # Now convert it back to Unix-stile (cygpath)
25902      input_path=`$CYGPATH -u "$shortmode_path"`
25903      new_path="$input_path"
25904    fi
25905  fi
25906
25907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25908  if test "x$test_cygdrive_prefix" = x; then
25909    # As a simple fix, exclude /usr/bin since it's not a real path.
25910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25912      # a path prefixed by /cygdrive for fixpath to work.
25913      new_path="$CYGWIN_ROOT_PATH$input_path"
25914    fi
25915  fi
25916
25917  # remove trailing .exe if any
25918  new_path="${new_path/%.exe/}"
25919
25920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25921
25922  # First separate the path from the arguments. This will split at the first
25923  # space.
25924  complete="$LIPO"
25925  path="${complete%% *}"
25926  tmp="$complete EOL"
25927  arguments="${tmp#* }"
25928
25929  # Input might be given as Windows format, start by converting to
25930  # unix format.
25931  new_path="$path"
25932
25933  windows_path="$new_path"
25934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25935    unix_path=`$CYGPATH -u "$windows_path"`
25936    new_path="$unix_path"
25937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25939    new_path="$unix_path"
25940  fi
25941
25942
25943  # Now try to locate executable using which
25944  new_path=`$WHICH "$new_path" 2> /dev/null`
25945
25946  if test "x$new_path" = x; then
25947    # Oops. Which didn't find the executable.
25948    # The splitting of arguments from the executable at a space might have been incorrect,
25949    # since paths with space are more likely in Windows. Give it another try with the whole
25950    # argument.
25951    path="$complete"
25952    arguments="EOL"
25953    new_path="$path"
25954
25955  windows_path="$new_path"
25956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25957    unix_path=`$CYGPATH -u "$windows_path"`
25958    new_path="$unix_path"
25959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25961    new_path="$unix_path"
25962  fi
25963
25964
25965    new_path=`$WHICH "$new_path" 2> /dev/null`
25966
25967    if test "x$new_path" = x; then
25968      # It's still not found. Now this is an unrecoverable error.
25969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
25970$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
25971      has_space=`$ECHO "$complete" | $GREP " "`
25972      if test "x$has_space" != x; then
25973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25975      fi
25976      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
25977    fi
25978  fi
25979
25980  # Now new_path has a complete unix path to the binary
25981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25982    # Keep paths in /bin as-is, but remove trailing .exe if any
25983    new_path="${new_path/%.exe/}"
25984    # Do not save /bin paths to all_fixpath_prefixes!
25985  else
25986    # Not in mixed or Windows style, start by that.
25987    new_path=`cmd //c echo $new_path`
25988
25989  input_path="$new_path"
25990  # Check if we need to convert this using DOS-style short mode. If the path
25991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25992  # take no chances and rewrite it.
25993  # Note: m4 eats our [], so we need to use [ and ] instead.
25994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25995  if test "x$has_forbidden_chars" != x; then
25996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998  fi
25999
26000    # Output is in $new_path
26001
26002  windows_path="$new_path"
26003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26004    unix_path=`$CYGPATH -u "$windows_path"`
26005    new_path="$unix_path"
26006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26008    new_path="$unix_path"
26009  fi
26010
26011    # remove trailing .exe if any
26012    new_path="${new_path/%.exe/}"
26013
26014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26016  fi
26017
26018  else
26019    # We're on a posix platform. Hooray! :)
26020    # First separate the path from the arguments. This will split at the first
26021    # space.
26022    complete="$LIPO"
26023    path="${complete%% *}"
26024    tmp="$complete EOL"
26025    arguments="${tmp#* }"
26026
26027    new_path=`$WHICH $path 2> /dev/null`
26028    if test "x$new_path" = x; then
26029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26030      if test "x$is_absolute_path" != x; then
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26032$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26033        new_path="$path"
26034      else
26035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26036$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26037        has_space=`$ECHO "$complete" | $GREP " "`
26038        if test "x$has_space" != x; then
26039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26041        fi
26042        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26043      fi
26044    fi
26045  fi
26046
26047  # Now join together the path and the arguments once again
26048  if test "x$arguments" != xEOL; then
26049      new_complete="$new_path ${arguments% *}"
26050  else
26051      new_complete="$new_path"
26052  fi
26053
26054  if test "x$complete" != "x$new_complete"; then
26055    LIPO="$new_complete"
26056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26057$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26058  fi
26059
26060fi
26061
26062# Restore old path without tools dir
26063PATH="$OLD_PATH"
26064
26065
26066# FIXME: Currently we must test this after paths but before flags. Fix!
26067
26068# And we can test some aspects on the target using configure macros.
26069
26070
26071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26072$as_echo_n "checking for ANSI C header files... " >&6; }
26073if test "${ac_cv_header_stdc+set}" = set; then :
26074  $as_echo_n "(cached) " >&6
26075else
26076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26077/* end confdefs.h.  */
26078#include <stdlib.h>
26079#include <stdarg.h>
26080#include <string.h>
26081#include <float.h>
26082
26083int
26084main ()
26085{
26086
26087  ;
26088  return 0;
26089}
26090_ACEOF
26091if ac_fn_cxx_try_compile "$LINENO"; then :
26092  ac_cv_header_stdc=yes
26093else
26094  ac_cv_header_stdc=no
26095fi
26096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26097
26098if test $ac_cv_header_stdc = yes; then
26099  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26101/* end confdefs.h.  */
26102#include <string.h>
26103
26104_ACEOF
26105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26106  $EGREP "memchr" >/dev/null 2>&1; then :
26107
26108else
26109  ac_cv_header_stdc=no
26110fi
26111rm -f conftest*
26112
26113fi
26114
26115if test $ac_cv_header_stdc = yes; then
26116  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26118/* end confdefs.h.  */
26119#include <stdlib.h>
26120
26121_ACEOF
26122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26123  $EGREP "free" >/dev/null 2>&1; then :
26124
26125else
26126  ac_cv_header_stdc=no
26127fi
26128rm -f conftest*
26129
26130fi
26131
26132if test $ac_cv_header_stdc = yes; then
26133  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26134  if test "$cross_compiling" = yes; then :
26135  :
26136else
26137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26138/* end confdefs.h.  */
26139#include <ctype.h>
26140#include <stdlib.h>
26141#if ((' ' & 0x0FF) == 0x020)
26142# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26143# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26144#else
26145# define ISLOWER(c) \
26146		   (('a' <= (c) && (c) <= 'i') \
26147		     || ('j' <= (c) && (c) <= 'r') \
26148		     || ('s' <= (c) && (c) <= 'z'))
26149# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26150#endif
26151
26152#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26153int
26154main ()
26155{
26156  int i;
26157  for (i = 0; i < 256; i++)
26158    if (XOR (islower (i), ISLOWER (i))
26159	|| toupper (i) != TOUPPER (i))
26160      return 2;
26161  return 0;
26162}
26163_ACEOF
26164if ac_fn_cxx_try_run "$LINENO"; then :
26165
26166else
26167  ac_cv_header_stdc=no
26168fi
26169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26170  conftest.$ac_objext conftest.beam conftest.$ac_ext
26171fi
26172
26173fi
26174fi
26175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26176$as_echo "$ac_cv_header_stdc" >&6; }
26177if test $ac_cv_header_stdc = yes; then
26178
26179$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26180
26181fi
26182
26183# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26184for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26185		  inttypes.h stdint.h unistd.h
26186do :
26187  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26188ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26189"
26190if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26191  cat >>confdefs.h <<_ACEOF
26192#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26193_ACEOF
26194
26195fi
26196
26197done
26198
26199
26200
26201###############################################################################
26202#
26203# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26204# (The JVM can use 32 or 64 bit Java pointers but that decision
26205# is made at runtime.)
26206#
26207if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26208  # Always specify -m flags on Solaris
26209
26210  # keep track of c/cxx flags that we added outselves...
26211  #   to prevent emitting warning...
26212  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26213  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26214  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26215
26216  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26217  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26218  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26219
26220  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26221  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26222  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26223
26224elif test "x$COMPILE_TYPE" = xreduced; then
26225  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26226    # Specify -m if running reduced on other Posix platforms
26227
26228  # keep track of c/cxx flags that we added outselves...
26229  #   to prevent emitting warning...
26230  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26231  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26232  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26233
26234  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26235  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26236  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26237
26238  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26239  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26240  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26241
26242  fi
26243fi
26244
26245# Make compilation sanity check
26246for ac_header in stdio.h
26247do :
26248  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26249if test "x$ac_cv_header_stdio_h" = x""yes; then :
26250  cat >>confdefs.h <<_ACEOF
26251#define HAVE_STDIO_H 1
26252_ACEOF
26253
26254else
26255
26256  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26257$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26258  if test "x$COMPILE_TYPE" = xreduced; then
26259    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26260$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26261  elif test "x$COMPILE_TYPE" = xcross; then
26262    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26263$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26264  fi
26265  as_fn_error $? "Cannot continue." "$LINENO" 5
26266
26267fi
26268
26269done
26270
26271
26272# The cast to long int works around a bug in the HP C Compiler
26273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26275# This bug is HP SR number 8606223364.
26276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26277$as_echo_n "checking size of int *... " >&6; }
26278if test "${ac_cv_sizeof_int_p+set}" = set; then :
26279  $as_echo_n "(cached) " >&6
26280else
26281  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26282
26283else
26284  if test "$ac_cv_type_int_p" = yes; then
26285     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26287as_fn_error 77 "cannot compute sizeof (int *)
26288See \`config.log' for more details" "$LINENO" 5 ; }
26289   else
26290     ac_cv_sizeof_int_p=0
26291   fi
26292fi
26293
26294fi
26295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26296$as_echo "$ac_cv_sizeof_int_p" >&6; }
26297
26298
26299
26300cat >>confdefs.h <<_ACEOF
26301#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26302_ACEOF
26303
26304
26305
26306if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26307  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26308  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26309fi
26310
26311if test "x$SIZEOF_INT_P" = x; then
26312    # The test failed, lets stick to the assumed value.
26313    { $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
26314$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26315else
26316    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26317
26318    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26319        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
26320    fi
26321fi
26322
26323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26324$as_echo_n "checking for target address size... " >&6; }
26325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26326$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26327
26328
26329###############################################################################
26330#
26331# Is the target little of big endian?
26332#
26333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26334$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26335if test "${ac_cv_c_bigendian+set}" = set; then :
26336  $as_echo_n "(cached) " >&6
26337else
26338  ac_cv_c_bigendian=unknown
26339    # See if we're dealing with a universal compiler.
26340    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26341/* end confdefs.h.  */
26342#ifndef __APPLE_CC__
26343	       not a universal capable compiler
26344	     #endif
26345	     typedef int dummy;
26346
26347_ACEOF
26348if ac_fn_cxx_try_compile "$LINENO"; then :
26349
26350	# Check for potential -arch flags.  It is not universal unless
26351	# there are at least two -arch flags with different values.
26352	ac_arch=
26353	ac_prev=
26354	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26355	 if test -n "$ac_prev"; then
26356	   case $ac_word in
26357	     i?86 | x86_64 | ppc | ppc64)
26358	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26359		 ac_arch=$ac_word
26360	       else
26361		 ac_cv_c_bigendian=universal
26362		 break
26363	       fi
26364	       ;;
26365	   esac
26366	   ac_prev=
26367	 elif test "x$ac_word" = "x-arch"; then
26368	   ac_prev=arch
26369	 fi
26370       done
26371fi
26372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26373    if test $ac_cv_c_bigendian = unknown; then
26374      # See if sys/param.h defines the BYTE_ORDER macro.
26375      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26376/* end confdefs.h.  */
26377#include <sys/types.h>
26378	     #include <sys/param.h>
26379
26380int
26381main ()
26382{
26383#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26384		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26385		     && LITTLE_ENDIAN)
26386	      bogus endian macros
26387	     #endif
26388
26389  ;
26390  return 0;
26391}
26392_ACEOF
26393if ac_fn_cxx_try_compile "$LINENO"; then :
26394  # It does; now see whether it defined to BIG_ENDIAN or not.
26395	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26396/* end confdefs.h.  */
26397#include <sys/types.h>
26398		#include <sys/param.h>
26399
26400int
26401main ()
26402{
26403#if BYTE_ORDER != BIG_ENDIAN
26404		 not big endian
26405		#endif
26406
26407  ;
26408  return 0;
26409}
26410_ACEOF
26411if ac_fn_cxx_try_compile "$LINENO"; then :
26412  ac_cv_c_bigendian=yes
26413else
26414  ac_cv_c_bigendian=no
26415fi
26416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26417fi
26418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26419    fi
26420    if test $ac_cv_c_bigendian = unknown; then
26421      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26422      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26423/* end confdefs.h.  */
26424#include <limits.h>
26425
26426int
26427main ()
26428{
26429#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26430	      bogus endian macros
26431	     #endif
26432
26433  ;
26434  return 0;
26435}
26436_ACEOF
26437if ac_fn_cxx_try_compile "$LINENO"; then :
26438  # It does; now see whether it defined to _BIG_ENDIAN or not.
26439	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440/* end confdefs.h.  */
26441#include <limits.h>
26442
26443int
26444main ()
26445{
26446#ifndef _BIG_ENDIAN
26447		 not big endian
26448		#endif
26449
26450  ;
26451  return 0;
26452}
26453_ACEOF
26454if ac_fn_cxx_try_compile "$LINENO"; then :
26455  ac_cv_c_bigendian=yes
26456else
26457  ac_cv_c_bigendian=no
26458fi
26459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26460fi
26461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26462    fi
26463    if test $ac_cv_c_bigendian = unknown; then
26464      # Compile a test program.
26465      if test "$cross_compiling" = yes; then :
26466  # Try to guess by grepping values from an object file.
26467	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26468/* end confdefs.h.  */
26469short int ascii_mm[] =
26470		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
26471		short int ascii_ii[] =
26472		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
26473		int use_ascii (int i) {
26474		  return ascii_mm[i] + ascii_ii[i];
26475		}
26476		short int ebcdic_ii[] =
26477		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
26478		short int ebcdic_mm[] =
26479		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
26480		int use_ebcdic (int i) {
26481		  return ebcdic_mm[i] + ebcdic_ii[i];
26482		}
26483		extern int foo;
26484
26485int
26486main ()
26487{
26488return use_ascii (foo) == use_ebcdic (foo);
26489  ;
26490  return 0;
26491}
26492_ACEOF
26493if ac_fn_cxx_try_compile "$LINENO"; then :
26494  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
26495	      ac_cv_c_bigendian=yes
26496	    fi
26497	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
26498	      if test "$ac_cv_c_bigendian" = unknown; then
26499		ac_cv_c_bigendian=no
26500	      else
26501		# finding both strings is unlikely to happen, but who knows?
26502		ac_cv_c_bigendian=unknown
26503	      fi
26504	    fi
26505fi
26506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26507else
26508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26509/* end confdefs.h.  */
26510$ac_includes_default
26511int
26512main ()
26513{
26514
26515	     /* Are we little or big endian?  From Harbison&Steele.  */
26516	     union
26517	     {
26518	       long int l;
26519	       char c[sizeof (long int)];
26520	     } u;
26521	     u.l = 1;
26522	     return u.c[sizeof (long int) - 1] == 1;
26523
26524  ;
26525  return 0;
26526}
26527_ACEOF
26528if ac_fn_cxx_try_run "$LINENO"; then :
26529  ac_cv_c_bigendian=no
26530else
26531  ac_cv_c_bigendian=yes
26532fi
26533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26534  conftest.$ac_objext conftest.beam conftest.$ac_ext
26535fi
26536
26537    fi
26538fi
26539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
26540$as_echo "$ac_cv_c_bigendian" >&6; }
26541 case $ac_cv_c_bigendian in #(
26542   yes)
26543     ENDIAN="big";; #(
26544   no)
26545     ENDIAN="little" ;; #(
26546   universal)
26547     ENDIAN="universal_endianness"
26548     ;; #(
26549   *)
26550     ENDIAN="unknown" ;;
26551 esac
26552
26553
26554if test "x$ENDIAN" = xuniversal_endianness; then
26555    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
26556fi
26557if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
26558    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
26559fi
26560
26561
26562# Configure flags for the tools
26563
26564
26565###############################################################################
26566#
26567# How to compile shared libraries.
26568#
26569
26570if test "x$GCC" = xyes; then
26571    COMPILER_NAME=gcc
26572    PICFLAG="-fPIC"
26573    LIBRARY_PREFIX=lib
26574    SHARED_LIBRARY='lib$1.so'
26575    STATIC_LIBRARY='lib$1.a'
26576    SHARED_LIBRARY_FLAGS="-shared"
26577    SHARED_LIBRARY_SUFFIX='.so'
26578    STATIC_LIBRARY_SUFFIX='.a'
26579    OBJ_SUFFIX='.o'
26580    EXE_SUFFIX=''
26581    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
26582    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
26583    C_FLAG_REORDER=''
26584    CXX_FLAG_REORDER=''
26585    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
26586    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
26587    LD="$CC"
26588    LDEXE="$CC"
26589    LDCXX="$CXX"
26590    LDEXECXX="$CXX"
26591    POST_STRIP_CMD="$STRIP -g"
26592
26593    # Linking is different on MacOSX
26594    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26595        # Might change in the future to clang.
26596        COMPILER_NAME=gcc
26597        SHARED_LIBRARY='lib$1.dylib'
26598        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
26599        SHARED_LIBRARY_SUFFIX='.dylib'
26600        EXE_SUFFIX=''
26601        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
26602        SET_SHARED_LIBRARY_MAPFILE=''
26603        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
26604        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
26605        POST_STRIP_CMD="$STRIP -S"
26606    fi
26607else
26608    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26609        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
26610        COMPILER_NAME=ossc
26611        PICFLAG="-KPIC"
26612        LIBRARY_PREFIX=lib
26613        SHARED_LIBRARY='lib$1.so'
26614        STATIC_LIBRARY='lib$1.a'
26615        SHARED_LIBRARY_FLAGS="-G"
26616        SHARED_LIBRARY_SUFFIX='.so'
26617        STATIC_LIBRARY_SUFFIX='.a'
26618        OBJ_SUFFIX='.o'
26619        EXE_SUFFIX=''
26620        SET_SHARED_LIBRARY_NAME=''
26621        SET_SHARED_LIBRARY_MAPFILE='-M$1'
26622	C_FLAG_REORDER='-xF'
26623	CXX_FLAG_REORDER='-xF'
26624        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
26625        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
26626        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
26627        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
26628        CFLAGS_JDKLIB_EXTRA='-xstrconst'
26629        POST_STRIP_CMD="$STRIP -x"
26630        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
26631    fi
26632    if test "x$OPENJDK_TARGET_OS" = xwindows; then
26633        # If it is not gcc, then assume it is the MS Visual Studio compiler
26634        COMPILER_NAME=cl
26635        PICFLAG=""
26636        LIBRARY_PREFIX=
26637        SHARED_LIBRARY='$1.dll'
26638        STATIC_LIBRARY='$1.lib'
26639        SHARED_LIBRARY_FLAGS="-LD"
26640        SHARED_LIBRARY_SUFFIX='.dll'
26641        STATIC_LIBRARY_SUFFIX='.lib'
26642        OBJ_SUFFIX='.obj'
26643        EXE_SUFFIX='.exe'
26644        SET_SHARED_LIBRARY_NAME=''
26645        SET_SHARED_LIBRARY_MAPFILE=''
26646        SET_SHARED_LIBRARY_ORIGIN=''
26647        SET_EXECUTABLE_ORIGIN=''
26648    fi
26649fi
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668# The (cross) compiler is now configured, we can now test capabilities
26669# of the target platform.
26670
26671
26672
26673###############################################################################
26674#
26675# Setup the opt flags for different compilers
26676# and different operating systems.
26677#
26678
26679#
26680# NOTE: check for -mstackrealign needs to be below potential addition of -m32
26681#
26682if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
26683    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
26684    # While waiting for a better solution, the current workaround is to use -mstackrealign.
26685    CFLAGS="$CFLAGS -mstackrealign"
26686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
26687$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
26688    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26689/* end confdefs.h.  */
26690int main() { return 0; }
26691_ACEOF
26692if ac_fn_cxx_try_link "$LINENO"; then :
26693
26694		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26695$as_echo "yes" >&6; }
26696
26697else
26698
26699		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26700$as_echo "no" >&6; }
26701	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
26702
26703fi
26704rm -f core conftest.err conftest.$ac_objext \
26705    conftest$ac_exeext conftest.$ac_ext
26706fi
26707
26708C_FLAG_DEPS="-MMD -MF"
26709CXX_FLAG_DEPS="-MMD -MF"
26710
26711case $COMPILER_TYPE in
26712  CC )
26713    D_FLAG="-g"
26714    case $COMPILER_NAME in
26715      gcc )
26716      	case $OPENJDK_TARGET_OS in
26717	  macosx )
26718	    # On MacOSX we optimize for size, something
26719	    # we should do for all platforms?
26720	    C_O_FLAG_HI="-Os"
26721	    C_O_FLAG_NORM="-Os"
26722	    C_O_FLAG_NONE=""
26723	    ;;
26724	  *)
26725	    C_O_FLAG_HI="-O3"
26726	    C_O_FLAG_NORM="-O2"
26727	    C_O_FLAG_NONE="-O0"
26728	    CFLAGS_DEBUG_SYMBOLS="-g"
26729	    CXXFLAGS_DEBUG_SYMBOLS="-g"
26730	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
26731	       CFLAGS_DEBUG_SYMBOLS="-g1"
26732	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
26733	    fi
26734	    ;;
26735	esac
26736        CXX_O_FLAG_HI="$C_O_FLAG_HI"
26737        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
26738        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
26739        ;;
26740      ossc )
26741        #
26742        # Forte has different names for this with their C++ compiler...
26743        #
26744        C_FLAG_DEPS="-xMMD -xMF"
26745        CXX_FLAG_DEPS="-xMMD -xMF"
26746
26747        # Extra options used with HIGHEST
26748        #
26749        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
26750        #          done with care, there are some assumptions below that need to
26751        #          be understood about the use of pointers, and IEEE behavior.
26752        #
26753        # Use non-standard floating point mode (not IEEE 754)
26754        CC_HIGHEST="$CC_HIGHEST -fns"
26755        # Do some simplification of floating point arithmetic (not IEEE 754)
26756        CC_HIGHEST="$CC_HIGHEST -fsimple"
26757        # Use single precision floating point with 'float'
26758        CC_HIGHEST="$CC_HIGHEST -fsingle"
26759        # Assume memory references via basic pointer types do not alias
26760        #   (Source with excessing pointer casting and data access with mixed
26761        #    pointer types are not recommended)
26762        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
26763        # Use intrinsic or inline versions for math/std functions
26764        #   (If you expect perfect errno behavior, do not use this)
26765        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
26766        # Loop data dependency optimizations (need -xO3 or higher)
26767        CC_HIGHEST="$CC_HIGHEST -xdepend"
26768        # Pointer parameters to functions do not overlap
26769        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
26770        #    If you pass in multiple pointers to the same data, do not use this)
26771        CC_HIGHEST="$CC_HIGHEST -xrestrict"
26772        # Inline some library routines
26773        #   (If you expect perfect errno behavior, do not use this)
26774        CC_HIGHEST="$CC_HIGHEST -xlibmil"
26775        # Use optimized math routines
26776        #   (If you expect perfect errno behavior, do not use this)
26777        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
26778        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
26779
26780        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
26781          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
26782          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
26783        fi
26784
26785        case $OPENJDK_TARGET_CPU_ARCH in
26786          x86)
26787            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
26788            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
26789            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
26790            C_O_FLAG_NONE="-xregs=no%frameptr"
26791            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
26792            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
26793            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
26794            CXX_O_FLAG_NONE="-xregs=no%frameptr"
26795            if test "x$OPENJDK_TARGET_CPU" = xx86; then
26796               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
26797               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
26798            fi
26799            ;;
26800          sparc)
26801            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
26802            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
26803            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
26804            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
26805            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
26806            C_O_FLAG_NONE=""
26807            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
26808            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
26809            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
26810            CXX_O_FLAG_NONE=""
26811            ;;
26812        esac
26813
26814    CFLAGS_DEBUG_SYMBOLS="-g -xs"
26815    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
26816    esac
26817    ;;
26818  CL )
26819    D_FLAG=
26820    C_O_FLAG_HIGHEST="-O2"
26821    C_O_FLAG_HI="-O1"
26822    C_O_FLAG_NORM="-O1"
26823    C_O_FLAG_NONE="-Od"
26824    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
26825    CXX_O_FLAG_HI="$C_O_FLAG_HI"
26826    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
26827    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
26828    ;;
26829esac
26830
26831if test -z "$C_O_FLAG_HIGHEST"; then
26832   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
26833fi
26834
26835if test -z "$CXX_O_FLAG_HIGHEST"; then
26836   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
26837fi
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
26853   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
26854$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
26855fi
26856
26857if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
26858   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
26859$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
26860fi
26861
26862if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
26863   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
26864$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
26865fi
26866
26867
26868# Check whether --with-extra-cflags was given.
26869if test "${with_extra_cflags+set}" = set; then :
26870  withval=$with_extra_cflags;
26871fi
26872
26873
26874
26875# Check whether --with-extra-cxxflags was given.
26876if test "${with_extra_cxxflags+set}" = set; then :
26877  withval=$with_extra_cxxflags;
26878fi
26879
26880
26881
26882# Check whether --with-extra-ldflags was given.
26883if test "${with_extra_ldflags+set}" = set; then :
26884  withval=$with_extra_ldflags;
26885fi
26886
26887
26888CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
26889CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
26890LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
26891
26892# Hotspot needs these set in their legacy form
26893LEGACY_EXTRA_CFLAGS=$with_extra_cflags
26894LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
26895LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
26896
26897
26898
26899
26900
26901###############################################################################
26902#
26903# Now setup the CFLAGS and LDFLAGS for the JDK build.
26904# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
26905#
26906case $COMPILER_NAME in
26907      gcc )
26908      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
26909                          -pipe \
26910                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
26911	  case $OPENJDK_TARGET_CPU_ARCH in
26912	  arm )
26913            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
26914	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
26915	  ;;
26916	  ppc )
26917            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
26918	  ;;
26919	  * )
26920	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
26921	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
26922          ;;
26923	  esac
26924          ;;
26925      ossc )
26926          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
26927          case $OPENJDK_TARGET_CPU_ARCH in
26928          x86 )
26929            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
26930       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
26931          ;;
26932          esac
26933
26934      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
26935      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
26936
26937          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
26938          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
26939          ;;
26940      cl )
26941          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
26942               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
26943	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
26944	       -DWIN32 -DIAL"
26945          case $OPENJDK_TARGET_CPU in
26946              x86 )
26947                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
26948                  ;;
26949              x86_64 )
26950                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
26951                  ;;
26952          esac
26953          ;;
26954esac
26955
26956###############################################################################
26957
26958CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
26959
26960# The package path is used only on macosx?
26961PACKAGE_PATH=/opt/local
26962
26963
26964if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
26965    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
26966    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
26967    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
26968    #   Note: -Dmacro         is the same as    #define macro 1
26969    #         -Dmacro=	    is the same as    #define macro
26970    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26971        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
26972    else
26973        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
26974    fi
26975else
26976    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
26977fi
26978if test "x$OPENJDK_TARGET_OS" = xlinux; then
26979    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
26980fi
26981if test "x$OPENJDK_TARGET_OS" = xwindows; then
26982    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
26983fi
26984if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26985    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
26986fi
26987if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26988    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
26989fi
26990if test "x$OPENJDK_TARGET_OS" = xbsd; then
26991    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
26992fi
26993if test "x$DEBUG_LEVEL" = xrelease; then
26994    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
26995    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26996        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
26997    fi
26998else
26999    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27000fi
27001
27002CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27003CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27004
27005CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27006        -I${JDK_OUTPUTDIR}/include \
27007        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27008        -I${JDK_TOPDIR}/src/share/javavm/export \
27009        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27010        -I${JDK_TOPDIR}/src/share/native/common \
27011        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27012
27013# The shared libraries are compiled using the picflag.
27014CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27015CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27016
27017# Executable flags
27018CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27019CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27020
27021# Now this is odd. The JDK native libraries have to link against libjvm.so
27022# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27023# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27024# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27025# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27026# libraries will link to whatever is in memory. Yuck.
27027#
27028# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27029if test "x$COMPILER_NAME" = xcl; then
27030    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27031    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27032        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27033    fi
27034    # TODO: make -debug optional "--disable-full-debug-symbols"
27035    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27036    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27037    LDFLAGS_JDKLIB_SUFFIX=""
27038    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27039        LDFLAGS_STACK_SIZE=1048576
27040    else
27041        LDFLAGS_STACK_SIZE=327680
27042    fi
27043    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27044else
27045    if test "x$COMPILER_NAME" = xgcc; then
27046        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27047        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27048        if test -n "$HAS_GNU_HASH"; then
27049            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27050        fi
27051        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27052          # And since we now know that the linker is gnu, then add -z defs, to forbid
27053          # undefined symbols in object files.
27054          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27055          if test "x$DEBUG_LEVEL" = "xrelease"; then
27056              # When building release libraries, tell the linker optimize them.
27057              # Should this be supplied to the OSS linker as well?
27058              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27059          fi
27060        fi
27061    fi
27062    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27063                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
27064                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
27065                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27066
27067    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27068    if test "x$COMPILER_NAME" = xossc; then
27069        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27070    fi
27071
27072    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27073    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27074        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27075    fi
27076fi
27077
27078# Adjust flags according to debug level.
27079case $DEBUG_LEVEL in
27080      fastdebug )
27081              CFLAGS="$CFLAGS $D_FLAG"
27082              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27083              ;;
27084      slowdebug )
27085              CFLAGS="$CFLAGS $D_FLAG"
27086	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27087	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27088	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27089	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27090              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27091              ;;
27092esac
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108# Setup debug symbols (need objcopy from the toolchain for that)
27109
27110#
27111# ENABLE_DEBUG_SYMBOLS
27112# This must be done after the toolchain is setup, since we're looking at objcopy.
27113#
27114ENABLE_DEBUG_SYMBOLS=default
27115
27116# default on macosx is no...
27117if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27118   ENABLE_DEBUG_SYMBOLS=no
27119fi
27120
27121# Check whether --enable-debug-symbols was given.
27122if test "${enable_debug_symbols+set}" = set; then :
27123  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27124fi
27125
27126
27127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27128$as_echo_n "checking if we should generate debug symbols... " >&6; }
27129
27130if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27131   # explicit enabling of enable-debug-symbols and can't find objcopy
27132   #   this is an error
27133   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27134fi
27135
27136if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27137  # Default is on if objcopy is found, otherwise off
27138  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27139     ENABLE_DEBUG_SYMBOLS=yes
27140  else
27141     ENABLE_DEBUG_SYMBOLS=no
27142  fi
27143fi
27144
27145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27146$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27147
27148#
27149# ZIP_DEBUGINFO_FILES
27150#
27151ZIP_DEBUGINFO_FILES=yes
27152
27153# Check whether --enable-zip-debug-info was given.
27154if test "${enable_zip_debug_info+set}" = set; then :
27155  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27156fi
27157
27158
27159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27160$as_echo_n "checking if we should zip debug-info files... " >&6; }
27161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27162$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27163
27164# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27165#   use that...
27166if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27167   ZIP_DEBUGINFO_FILES=1
27168else
27169   ZIP_DEBUGINFO_FILES=0
27170fi
27171
27172
27173
27174
27175
27176
27177
27178###############################################################################
27179#
27180# Check dependencies for external and internal libraries.
27181#
27182###############################################################################
27183
27184
27185
27186###############################################################################
27187#
27188# OS specific settings that we never will need to probe.
27189#
27190if test "x$OPENJDK_TARGET_OS" = xlinux; then
27191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27192$as_echo_n "checking what is not needed on Linux?... " >&6; }
27193    PULSE_NOT_NEEDED=yes
27194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27195$as_echo "pulse" >&6; }
27196fi
27197
27198if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27200$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27201    ALSA_NOT_NEEDED=yes
27202    PULSE_NOT_NEEDED=yes
27203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27204$as_echo "alsa pulse" >&6; }
27205fi
27206
27207if test "x$OPENJDK_TARGET_OS" = xwindows; then
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27209$as_echo_n "checking what is not needed on Windows?... " >&6; }
27210    CUPS_NOT_NEEDED=yes
27211    ALSA_NOT_NEEDED=yes
27212    PULSE_NOT_NEEDED=yes
27213    X11_NOT_NEEDED=yes
27214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27215$as_echo "alsa cups pulse x11" >&6; }
27216fi
27217
27218if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27220$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27221    ALSA_NOT_NEEDED=yes
27222    PULSE_NOT_NEEDED=yes
27223    X11_NOT_NEEDED=yes
27224    FREETYPE2_NOT_NEEDED=yes
27225    # If the java runtime framework is disabled, then we need X11.
27226    # This will be adjusted below.
27227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27228$as_echo "alsa pulse x11" >&6; }
27229fi
27230
27231if test "x$OPENJDK_TARGET_OS" = xbsd; then
27232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27233$as_echo_n "checking what is not needed on bsd?... " >&6; }
27234    ALSA_NOT_NEEDED=yes
27235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27236$as_echo "alsa" >&6; }
27237fi
27238
27239if test "x$OPENJDK" = "xfalse"; then
27240    FREETYPE2_NOT_NEEDED=yes
27241fi
27242
27243if test "x$SUPPORT_HEADFUL" = xno; then
27244    X11_NOT_NEEDED=yes
27245fi
27246
27247###############################################################################
27248#
27249# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27250# that uses this API.
27251#
27252# Check whether --enable-macosx-runtime-support was given.
27253if test "${enable_macosx_runtime_support+set}" = set; then :
27254  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27255else
27256  MACOSX_RUNTIME_SUPPORT="no"
27257fi
27258
27259
27260USE_MACOSX_RUNTIME_SUPPORT=no
27261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27262$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27263if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27264    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27265        MACOSX_RUNTIME_SUPPORT=yes
27266        USE_MACOSX_RUNTIME_SUPPORT=yes
27267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27268$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27269    else
27270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27271$as_echo "yes, but explicitly disabled." >&6; }
27272    fi
27273else
27274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27275$as_echo "no" >&6; }
27276fi
27277
27278if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27280$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27281    X11_NOT_NEEDED=
27282    FREETYPE2_NOT_NEEDED=
27283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27284$as_echo "alsa pulse" >&6; }
27285fi
27286
27287
27288
27289
27290###############################################################################
27291#
27292# Check for X Windows
27293#
27294
27295# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27296# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27297# --x-libraries for the sysroot, if that seems to be correct.
27298if test "x$SYS_ROOT" != "x/"; then
27299  if test "x$x_includes" = xNONE; then
27300    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27301      x_includes="$SYS_ROOT/usr/X11R6/include"
27302    fi
27303  fi
27304  if test "x$x_libraries" = xNONE; then
27305    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27306      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27307    fi
27308  fi
27309fi
27310
27311# Now let autoconf do it's magic
27312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27313$as_echo_n "checking for X... " >&6; }
27314
27315
27316# Check whether --with-x was given.
27317if test "${with_x+set}" = set; then :
27318  withval=$with_x;
27319fi
27320
27321# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27322if test "x$with_x" = xno; then
27323  # The user explicitly disabled X.
27324  have_x=disabled
27325else
27326  case $x_includes,$x_libraries in #(
27327    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27328    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27329  $as_echo_n "(cached) " >&6
27330else
27331  # One or both of the vars are not set, and there is no cached value.
27332ac_x_includes=no ac_x_libraries=no
27333rm -f -r conftest.dir
27334if mkdir conftest.dir; then
27335  cd conftest.dir
27336  cat >Imakefile <<'_ACEOF'
27337incroot:
27338	@echo incroot='${INCROOT}'
27339usrlibdir:
27340	@echo usrlibdir='${USRLIBDIR}'
27341libdir:
27342	@echo libdir='${LIBDIR}'
27343_ACEOF
27344  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27345    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27346    for ac_var in incroot usrlibdir libdir; do
27347      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27348    done
27349    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27350    for ac_extension in a so sl dylib la dll; do
27351      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27352	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27353	ac_im_usrlibdir=$ac_im_libdir; break
27354      fi
27355    done
27356    # Screen out bogus values from the imake configuration.  They are
27357    # bogus both because they are the default anyway, and because
27358    # using them would break gcc on systems where it needs fixed includes.
27359    case $ac_im_incroot in
27360	/usr/include) ac_x_includes= ;;
27361	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27362    esac
27363    case $ac_im_usrlibdir in
27364	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27365	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27366    esac
27367  fi
27368  cd ..
27369  rm -f -r conftest.dir
27370fi
27371
27372# Standard set of common directories for X headers.
27373# Check X11 before X11Rn because it is often a symlink to the current release.
27374ac_x_header_dirs='
27375/usr/X11/include
27376/usr/X11R7/include
27377/usr/X11R6/include
27378/usr/X11R5/include
27379/usr/X11R4/include
27380
27381/usr/include/X11
27382/usr/include/X11R7
27383/usr/include/X11R6
27384/usr/include/X11R5
27385/usr/include/X11R4
27386
27387/usr/local/X11/include
27388/usr/local/X11R7/include
27389/usr/local/X11R6/include
27390/usr/local/X11R5/include
27391/usr/local/X11R4/include
27392
27393/usr/local/include/X11
27394/usr/local/include/X11R7
27395/usr/local/include/X11R6
27396/usr/local/include/X11R5
27397/usr/local/include/X11R4
27398
27399/usr/X386/include
27400/usr/x386/include
27401/usr/XFree86/include/X11
27402
27403/usr/include
27404/usr/local/include
27405/usr/unsupported/include
27406/usr/athena/include
27407/usr/local/x11r5/include
27408/usr/lpp/Xamples/include
27409
27410/usr/openwin/include
27411/usr/openwin/share/include'
27412
27413if test "$ac_x_includes" = no; then
27414  # Guess where to find include files, by looking for Xlib.h.
27415  # First, try using that file with no special directory specified.
27416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27417/* end confdefs.h.  */
27418#include <X11/Xlib.h>
27419_ACEOF
27420if ac_fn_cxx_try_cpp "$LINENO"; then :
27421  # We can compile using X headers with no special include directory.
27422ac_x_includes=
27423else
27424  for ac_dir in $ac_x_header_dirs; do
27425  if test -r "$ac_dir/X11/Xlib.h"; then
27426    ac_x_includes=$ac_dir
27427    break
27428  fi
27429done
27430fi
27431rm -f conftest.err conftest.i conftest.$ac_ext
27432fi # $ac_x_includes = no
27433
27434if test "$ac_x_libraries" = no; then
27435  # Check for the libraries.
27436  # See if we find them without any special options.
27437  # Don't add to $LIBS permanently.
27438  ac_save_LIBS=$LIBS
27439  LIBS="-lX11 $LIBS"
27440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27441/* end confdefs.h.  */
27442#include <X11/Xlib.h>
27443int
27444main ()
27445{
27446XrmInitialize ()
27447  ;
27448  return 0;
27449}
27450_ACEOF
27451if ac_fn_cxx_try_link "$LINENO"; then :
27452  LIBS=$ac_save_LIBS
27453# We can link X programs with no special library path.
27454ac_x_libraries=
27455else
27456  LIBS=$ac_save_LIBS
27457for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
27458do
27459  # Don't even attempt the hair of trying to link an X program!
27460  for ac_extension in a so sl dylib la dll; do
27461    if test -r "$ac_dir/libX11.$ac_extension"; then
27462      ac_x_libraries=$ac_dir
27463      break 2
27464    fi
27465  done
27466done
27467fi
27468rm -f core conftest.err conftest.$ac_objext \
27469    conftest$ac_exeext conftest.$ac_ext
27470fi # $ac_x_libraries = no
27471
27472case $ac_x_includes,$ac_x_libraries in #(
27473  no,* | *,no | *\'*)
27474    # Didn't find X, or a directory has "'" in its name.
27475    ac_cv_have_x="have_x=no";; #(
27476  *)
27477    # Record where we found X for the cache.
27478    ac_cv_have_x="have_x=yes\
27479	ac_x_includes='$ac_x_includes'\
27480	ac_x_libraries='$ac_x_libraries'"
27481esac
27482fi
27483;; #(
27484    *) have_x=yes;;
27485  esac
27486  eval "$ac_cv_have_x"
27487fi # $with_x != no
27488
27489if test "$have_x" != yes; then
27490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
27491$as_echo "$have_x" >&6; }
27492  no_x=yes
27493else
27494  # If each of the values was on the command line, it overrides each guess.
27495  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
27496  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
27497  # Update the cache value to reflect the command line values.
27498  ac_cv_have_x="have_x=yes\
27499	ac_x_includes='$x_includes'\
27500	ac_x_libraries='$x_libraries'"
27501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
27502$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
27503fi
27504
27505if test "$no_x" = yes; then
27506  # Not all programs may use this symbol, but it does not hurt to define it.
27507
27508$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
27509
27510  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
27511else
27512  if test -n "$x_includes"; then
27513    X_CFLAGS="$X_CFLAGS -I$x_includes"
27514  fi
27515
27516  # It would also be nice to do this for all -L options, not just this one.
27517  if test -n "$x_libraries"; then
27518    X_LIBS="$X_LIBS -L$x_libraries"
27519    # For Solaris; some versions of Sun CC require a space after -R and
27520    # others require no space.  Words are not sufficient . . . .
27521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
27522$as_echo_n "checking whether -R must be followed by a space... " >&6; }
27523    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
27524    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
27525    ac_cxx_werror_flag=yes
27526    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27527/* end confdefs.h.  */
27528
27529int
27530main ()
27531{
27532
27533  ;
27534  return 0;
27535}
27536_ACEOF
27537if ac_fn_cxx_try_link "$LINENO"; then :
27538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27539$as_echo "no" >&6; }
27540       X_LIBS="$X_LIBS -R$x_libraries"
27541else
27542  LIBS="$ac_xsave_LIBS -R $x_libraries"
27543       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27544/* end confdefs.h.  */
27545
27546int
27547main ()
27548{
27549
27550  ;
27551  return 0;
27552}
27553_ACEOF
27554if ac_fn_cxx_try_link "$LINENO"; then :
27555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27556$as_echo "yes" >&6; }
27557	  X_LIBS="$X_LIBS -R $x_libraries"
27558else
27559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
27560$as_echo "neither works" >&6; }
27561fi
27562rm -f core conftest.err conftest.$ac_objext \
27563    conftest$ac_exeext conftest.$ac_ext
27564fi
27565rm -f core conftest.err conftest.$ac_objext \
27566    conftest$ac_exeext conftest.$ac_ext
27567    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
27568    LIBS=$ac_xsave_LIBS
27569  fi
27570
27571  # Check for system-dependent libraries X programs must link with.
27572  # Do this before checking for the system-independent R6 libraries
27573  # (-lICE), since we may need -lsocket or whatever for X linking.
27574
27575  if test "$ISC" = yes; then
27576    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
27577  else
27578    # Martyn Johnson says this is needed for Ultrix, if the X
27579    # libraries were built with DECnet support.  And Karl Berry says
27580    # the Alpha needs dnet_stub (dnet does not exist).
27581    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
27582    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27583/* end confdefs.h.  */
27584
27585/* Override any GCC internal prototype to avoid an error.
27586   Use char because int might match the return type of a GCC
27587   builtin and then its argument prototype would still apply.  */
27588#ifdef __cplusplus
27589extern "C"
27590#endif
27591char XOpenDisplay ();
27592int
27593main ()
27594{
27595return XOpenDisplay ();
27596  ;
27597  return 0;
27598}
27599_ACEOF
27600if ac_fn_cxx_try_link "$LINENO"; then :
27601
27602else
27603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
27604$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
27605if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
27606  $as_echo_n "(cached) " >&6
27607else
27608  ac_check_lib_save_LIBS=$LIBS
27609LIBS="-ldnet  $LIBS"
27610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27611/* end confdefs.h.  */
27612
27613/* Override any GCC internal prototype to avoid an error.
27614   Use char because int might match the return type of a GCC
27615   builtin and then its argument prototype would still apply.  */
27616#ifdef __cplusplus
27617extern "C"
27618#endif
27619char dnet_ntoa ();
27620int
27621main ()
27622{
27623return dnet_ntoa ();
27624  ;
27625  return 0;
27626}
27627_ACEOF
27628if ac_fn_cxx_try_link "$LINENO"; then :
27629  ac_cv_lib_dnet_dnet_ntoa=yes
27630else
27631  ac_cv_lib_dnet_dnet_ntoa=no
27632fi
27633rm -f core conftest.err conftest.$ac_objext \
27634    conftest$ac_exeext conftest.$ac_ext
27635LIBS=$ac_check_lib_save_LIBS
27636fi
27637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
27638$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
27639if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
27640  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
27641fi
27642
27643    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
27644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
27645$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
27646if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
27647  $as_echo_n "(cached) " >&6
27648else
27649  ac_check_lib_save_LIBS=$LIBS
27650LIBS="-ldnet_stub  $LIBS"
27651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652/* end confdefs.h.  */
27653
27654/* Override any GCC internal prototype to avoid an error.
27655   Use char because int might match the return type of a GCC
27656   builtin and then its argument prototype would still apply.  */
27657#ifdef __cplusplus
27658extern "C"
27659#endif
27660char dnet_ntoa ();
27661int
27662main ()
27663{
27664return dnet_ntoa ();
27665  ;
27666  return 0;
27667}
27668_ACEOF
27669if ac_fn_cxx_try_link "$LINENO"; then :
27670  ac_cv_lib_dnet_stub_dnet_ntoa=yes
27671else
27672  ac_cv_lib_dnet_stub_dnet_ntoa=no
27673fi
27674rm -f core conftest.err conftest.$ac_objext \
27675    conftest$ac_exeext conftest.$ac_ext
27676LIBS=$ac_check_lib_save_LIBS
27677fi
27678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
27679$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
27680if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
27681  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
27682fi
27683
27684    fi
27685fi
27686rm -f core conftest.err conftest.$ac_objext \
27687    conftest$ac_exeext conftest.$ac_ext
27688    LIBS="$ac_xsave_LIBS"
27689
27690    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
27691    # to get the SysV transport functions.
27692    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
27693    # needs -lnsl.
27694    # The nsl library prevents programs from opening the X display
27695    # on Irix 5.2, according to T.E. Dickey.
27696    # The functions gethostbyname, getservbyname, and inet_addr are
27697    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
27698    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
27699if test "x$ac_cv_func_gethostbyname" = x""yes; then :
27700
27701fi
27702
27703    if test $ac_cv_func_gethostbyname = no; then
27704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
27705$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
27706if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
27707  $as_echo_n "(cached) " >&6
27708else
27709  ac_check_lib_save_LIBS=$LIBS
27710LIBS="-lnsl  $LIBS"
27711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27712/* end confdefs.h.  */
27713
27714/* Override any GCC internal prototype to avoid an error.
27715   Use char because int might match the return type of a GCC
27716   builtin and then its argument prototype would still apply.  */
27717#ifdef __cplusplus
27718extern "C"
27719#endif
27720char gethostbyname ();
27721int
27722main ()
27723{
27724return gethostbyname ();
27725  ;
27726  return 0;
27727}
27728_ACEOF
27729if ac_fn_cxx_try_link "$LINENO"; then :
27730  ac_cv_lib_nsl_gethostbyname=yes
27731else
27732  ac_cv_lib_nsl_gethostbyname=no
27733fi
27734rm -f core conftest.err conftest.$ac_objext \
27735    conftest$ac_exeext conftest.$ac_ext
27736LIBS=$ac_check_lib_save_LIBS
27737fi
27738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
27739$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
27740if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
27741  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
27742fi
27743
27744      if test $ac_cv_lib_nsl_gethostbyname = no; then
27745	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
27746$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
27747if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
27748  $as_echo_n "(cached) " >&6
27749else
27750  ac_check_lib_save_LIBS=$LIBS
27751LIBS="-lbsd  $LIBS"
27752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27753/* end confdefs.h.  */
27754
27755/* Override any GCC internal prototype to avoid an error.
27756   Use char because int might match the return type of a GCC
27757   builtin and then its argument prototype would still apply.  */
27758#ifdef __cplusplus
27759extern "C"
27760#endif
27761char gethostbyname ();
27762int
27763main ()
27764{
27765return gethostbyname ();
27766  ;
27767  return 0;
27768}
27769_ACEOF
27770if ac_fn_cxx_try_link "$LINENO"; then :
27771  ac_cv_lib_bsd_gethostbyname=yes
27772else
27773  ac_cv_lib_bsd_gethostbyname=no
27774fi
27775rm -f core conftest.err conftest.$ac_objext \
27776    conftest$ac_exeext conftest.$ac_ext
27777LIBS=$ac_check_lib_save_LIBS
27778fi
27779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
27780$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
27781if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
27782  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
27783fi
27784
27785      fi
27786    fi
27787
27788    # lieder@skyler.mavd.honeywell.com says without -lsocket,
27789    # socket/setsockopt and other routines are undefined under SCO ODT
27790    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
27791    # on later versions), says Simon Leinen: it contains gethostby*
27792    # variants that don't use the name server (or something).  -lsocket
27793    # must be given before -lnsl if both are needed.  We assume that
27794    # if connect needs -lnsl, so does gethostbyname.
27795    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
27796if test "x$ac_cv_func_connect" = x""yes; then :
27797
27798fi
27799
27800    if test $ac_cv_func_connect = no; then
27801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
27802$as_echo_n "checking for connect in -lsocket... " >&6; }
27803if test "${ac_cv_lib_socket_connect+set}" = set; then :
27804  $as_echo_n "(cached) " >&6
27805else
27806  ac_check_lib_save_LIBS=$LIBS
27807LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
27808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27809/* end confdefs.h.  */
27810
27811/* Override any GCC internal prototype to avoid an error.
27812   Use char because int might match the return type of a GCC
27813   builtin and then its argument prototype would still apply.  */
27814#ifdef __cplusplus
27815extern "C"
27816#endif
27817char connect ();
27818int
27819main ()
27820{
27821return connect ();
27822  ;
27823  return 0;
27824}
27825_ACEOF
27826if ac_fn_cxx_try_link "$LINENO"; then :
27827  ac_cv_lib_socket_connect=yes
27828else
27829  ac_cv_lib_socket_connect=no
27830fi
27831rm -f core conftest.err conftest.$ac_objext \
27832    conftest$ac_exeext conftest.$ac_ext
27833LIBS=$ac_check_lib_save_LIBS
27834fi
27835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
27836$as_echo "$ac_cv_lib_socket_connect" >&6; }
27837if test "x$ac_cv_lib_socket_connect" = x""yes; then :
27838  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
27839fi
27840
27841    fi
27842
27843    # Guillermo Gomez says -lposix is necessary on A/UX.
27844    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
27845if test "x$ac_cv_func_remove" = x""yes; then :
27846
27847fi
27848
27849    if test $ac_cv_func_remove = no; then
27850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
27851$as_echo_n "checking for remove in -lposix... " >&6; }
27852if test "${ac_cv_lib_posix_remove+set}" = set; then :
27853  $as_echo_n "(cached) " >&6
27854else
27855  ac_check_lib_save_LIBS=$LIBS
27856LIBS="-lposix  $LIBS"
27857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27858/* end confdefs.h.  */
27859
27860/* Override any GCC internal prototype to avoid an error.
27861   Use char because int might match the return type of a GCC
27862   builtin and then its argument prototype would still apply.  */
27863#ifdef __cplusplus
27864extern "C"
27865#endif
27866char remove ();
27867int
27868main ()
27869{
27870return remove ();
27871  ;
27872  return 0;
27873}
27874_ACEOF
27875if ac_fn_cxx_try_link "$LINENO"; then :
27876  ac_cv_lib_posix_remove=yes
27877else
27878  ac_cv_lib_posix_remove=no
27879fi
27880rm -f core conftest.err conftest.$ac_objext \
27881    conftest$ac_exeext conftest.$ac_ext
27882LIBS=$ac_check_lib_save_LIBS
27883fi
27884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
27885$as_echo "$ac_cv_lib_posix_remove" >&6; }
27886if test "x$ac_cv_lib_posix_remove" = x""yes; then :
27887  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
27888fi
27889
27890    fi
27891
27892    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
27893    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
27894if test "x$ac_cv_func_shmat" = x""yes; then :
27895
27896fi
27897
27898    if test $ac_cv_func_shmat = no; then
27899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
27900$as_echo_n "checking for shmat in -lipc... " >&6; }
27901if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
27902  $as_echo_n "(cached) " >&6
27903else
27904  ac_check_lib_save_LIBS=$LIBS
27905LIBS="-lipc  $LIBS"
27906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27907/* end confdefs.h.  */
27908
27909/* Override any GCC internal prototype to avoid an error.
27910   Use char because int might match the return type of a GCC
27911   builtin and then its argument prototype would still apply.  */
27912#ifdef __cplusplus
27913extern "C"
27914#endif
27915char shmat ();
27916int
27917main ()
27918{
27919return shmat ();
27920  ;
27921  return 0;
27922}
27923_ACEOF
27924if ac_fn_cxx_try_link "$LINENO"; then :
27925  ac_cv_lib_ipc_shmat=yes
27926else
27927  ac_cv_lib_ipc_shmat=no
27928fi
27929rm -f core conftest.err conftest.$ac_objext \
27930    conftest$ac_exeext conftest.$ac_ext
27931LIBS=$ac_check_lib_save_LIBS
27932fi
27933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
27934$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
27935if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
27936  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
27937fi
27938
27939    fi
27940  fi
27941
27942  # Check for libraries that X11R6 Xt/Xaw programs need.
27943  ac_save_LDFLAGS=$LDFLAGS
27944  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
27945  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
27946  # check for ICE first), but we must link in the order -lSM -lICE or
27947  # we get undefined symbols.  So assume we have SM if we have ICE.
27948  # These have to be linked with before -lX11, unlike the other
27949  # libraries we check for below, so use a different variable.
27950  # John Interrante, Karl Berry
27951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
27952$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
27953if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
27954  $as_echo_n "(cached) " >&6
27955else
27956  ac_check_lib_save_LIBS=$LIBS
27957LIBS="-lICE $X_EXTRA_LIBS $LIBS"
27958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27959/* end confdefs.h.  */
27960
27961/* Override any GCC internal prototype to avoid an error.
27962   Use char because int might match the return type of a GCC
27963   builtin and then its argument prototype would still apply.  */
27964#ifdef __cplusplus
27965extern "C"
27966#endif
27967char IceConnectionNumber ();
27968int
27969main ()
27970{
27971return IceConnectionNumber ();
27972  ;
27973  return 0;
27974}
27975_ACEOF
27976if ac_fn_cxx_try_link "$LINENO"; then :
27977  ac_cv_lib_ICE_IceConnectionNumber=yes
27978else
27979  ac_cv_lib_ICE_IceConnectionNumber=no
27980fi
27981rm -f core conftest.err conftest.$ac_objext \
27982    conftest$ac_exeext conftest.$ac_ext
27983LIBS=$ac_check_lib_save_LIBS
27984fi
27985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
27986$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
27987if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
27988  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
27989fi
27990
27991  LDFLAGS=$ac_save_LDFLAGS
27992
27993fi
27994
27995
27996if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
27997
27998    # Print a helpful message on how to acquire the necessary build dependency.
27999    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28000    MISSING_DEPENDENCY=x11
28001    PKGHANDLER_COMMAND=
28002
28003    case $PKGHANDLER in
28004	apt-get)
28005                apt_help     $MISSING_DEPENDENCY ;;
28006    yum)
28007                yum_help     $MISSING_DEPENDENCY ;;
28008	port)
28009                port_help    $MISSING_DEPENDENCY ;;
28010	pkgutil)
28011                pkgutil_help $MISSING_DEPENDENCY ;;
28012	pkgadd)
28013                pkgadd_help  $MISSING_DEPENDENCY ;;
28014    * )
28015      break ;;
28016    esac
28017
28018    if test "x$PKGHANDLER_COMMAND" != x; then
28019        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28020    fi
28021
28022    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28023fi
28024
28025# Some of the old makefiles require a setting of OPENWIN_HOME
28026# Since the X11R6 directory has disappeared on later Linuxes,
28027# we need to probe for it.
28028if test "x$OPENJDK_TARGET_OS" = xlinux; then
28029    if test -d "$SYS_ROOT/usr/X11R6"; then
28030        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28031    fi
28032    if test -d "$SYS_ROOT/usr/include/X11"; then
28033        OPENWIN_HOME="$SYS_ROOT/usr"
28034    fi
28035fi
28036if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28037    OPENWIN_HOME="/usr/openwin"
28038fi
28039
28040
28041
28042#
28043# Weird Sol10 something check...TODO change to try compile
28044#
28045if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28046  if test "`uname -r`" = "5.10"; then
28047     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28048     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28049     fi
28050  fi
28051fi
28052
28053ac_ext=c
28054ac_cpp='$CPP $CPPFLAGS'
28055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28057ac_compiler_gnu=$ac_cv_c_compiler_gnu
28058
28059OLD_CFLAGS="$CFLAGS"
28060CFLAGS="$CFLAGS $X_CFLAGS"
28061
28062# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28063for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28064do :
28065  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28066ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28067                   # include <X11/Xutil.h>
28068
28069"
28070if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28071  cat >>confdefs.h <<_ACEOF
28072#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28073_ACEOF
28074 X11_A_OK=yes
28075else
28076  X11_A_OK=no
28077fi
28078
28079done
28080
28081
28082CFLAGS="$OLD_CFLAGS"
28083ac_ext=cpp
28084ac_cpp='$CXXCPP $CPPFLAGS'
28085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28088
28089
28090if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28091
28092    # Print a helpful message on how to acquire the necessary build dependency.
28093    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28094    MISSING_DEPENDENCY=x11
28095    PKGHANDLER_COMMAND=
28096
28097    case $PKGHANDLER in
28098	apt-get)
28099                apt_help     $MISSING_DEPENDENCY ;;
28100    yum)
28101                yum_help     $MISSING_DEPENDENCY ;;
28102	port)
28103                port_help    $MISSING_DEPENDENCY ;;
28104	pkgutil)
28105                pkgutil_help $MISSING_DEPENDENCY ;;
28106	pkgadd)
28107                pkgadd_help  $MISSING_DEPENDENCY ;;
28108    * )
28109      break ;;
28110    esac
28111
28112    if test "x$PKGHANDLER_COMMAND" != x; then
28113        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28114    fi
28115
28116    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28117fi
28118
28119
28120
28121
28122
28123
28124###############################################################################
28125#
28126# The common unix printing system cups is used to print from java.
28127#
28128
28129# Check whether --with-cups was given.
28130if test "${with_cups+set}" = set; then :
28131  withval=$with_cups;
28132fi
28133
28134
28135# Check whether --with-cups-include was given.
28136if test "${with_cups_include+set}" = set; then :
28137  withval=$with_cups_include;
28138fi
28139
28140
28141if test "x$CUPS_NOT_NEEDED" = xyes; then
28142	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28143		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28144$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28145	fi
28146	CUPS_CFLAGS=
28147else
28148	CUPS_FOUND=no
28149
28150	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28151	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28152	fi
28153
28154	if test "x${with_cups}" != x; then
28155	    CUPS_CFLAGS="-I${with_cups}/include"
28156	    CUPS_FOUND=yes
28157	fi
28158	if test "x${with_cups_include}" != x; then
28159	    CUPS_CFLAGS="-I${with_cups_include}"
28160	    CUPS_FOUND=yes
28161	fi
28162	if test "x$CUPS_FOUND" = xno; then
28163
28164
28165    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28166        # Source the builddeps file again, to make sure it uses the latest variables!
28167        . $builddepsfile
28168        # Look for a target and build machine specific resource!
28169        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28170        if test "x$resource" = x; then
28171            # Ok, lets instead look for a target specific resource
28172            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28173        fi
28174        if test "x$resource" = x; then
28175            # Ok, lets instead look for a build specific resource
28176            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28177        fi
28178        if test "x$resource" = x; then
28179            # Ok, lets instead look for a generic resource
28180            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28181            resource=${builddep_cups}
28182        fi
28183        if test "x$resource" != x; then
28184            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28185$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28186	    # If the resource in the builddeps.conf file is an existing directory,
28187	    # for example /java/linux/cups
28188	    if test -d ${resource}; then
28189	       depdir=${resource}
28190	    else
28191
28192# cups is for example mymodule
28193# $resource is for example libs/general/libmymod_1_2_3.zip
28194# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28195# $with_builddeps_dir is for example /localhome/builddeps
28196# depdir is the name of the variable into which we store the depdir, eg MYMOD
28197# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28198# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28199    filename=`basename $resource`
28200    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28201    filebase=${filename%%.*}
28202    extension=${filename#*.}
28203    installdir=$with_builddeps_dir/$filebase
28204    if test ! -f $installdir/$filename.unpacked; then
28205        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28206$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28207        if test ! -d $installdir; then
28208            mkdir -p $installdir
28209        fi
28210        if test ! -d $installdir; then
28211            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28212        fi
28213        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28214        touch $tmpfile
28215        if test ! -f $tmpfile; then
28216            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28217        fi
28218
28219    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28220    # $tmpfile is the local file name for the downloaded file.
28221    VALID_TOOL=no
28222    if test "x$BDEPS_FTP" = xwget; then
28223       VALID_TOOL=yes
28224       wget -O $tmpfile $with_builddeps_server/$resource
28225    fi
28226    if test "x$BDEPS_FTP" = xlftp; then
28227       VALID_TOOL=yes
28228       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28229    fi
28230    if test "x$BDEPS_FTP" = xftp; then
28231        VALID_TOOL=yes
28232        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28233        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28234        FTPUSERPWD=${FTPSERVER%%@*}
28235        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28236            FTPUSER=${userpwd%%:*}
28237            FTPPWD=${userpwd#*@}
28238            FTPSERVER=${FTPSERVER#*@}
28239        else
28240            FTPUSER=ftp
28241            FTPPWD=ftp
28242        fi
28243        # the "pass" command does not work on some
28244        # ftp clients (read ftp.exe) but if it works,
28245        # passive mode is better!
28246        (\
28247            echo "user $FTPUSER $FTPPWD"        ;\
28248            echo "pass"                         ;\
28249            echo "bin"                          ;\
28250            echo "get $FTPPATH $tmpfile"              ;\
28251        ) | ftp -in $FTPSERVER
28252    fi
28253    if test "x$VALID_TOOL" != xyes; then
28254       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28255    fi
28256
28257        mv $tmpfile $installdir/$filename
28258        if test ! -s $installdir/$filename; then
28259            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28260        fi
28261        case "$extension" in
28262            zip)  echo "Unzipping $installdir/$filename..."
28263               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28264            ;;
28265            tar.gz) echo "Untaring $installdir/$filename..."
28266               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28267            ;;
28268            tgz) echo "Untaring $installdir/$filename..."
28269               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28270            ;;
28271            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28272            ;;
28273        esac
28274    fi
28275    if test -f $installdir/$filename.unpacked; then
28276        depdir=$installdir
28277    fi
28278
28279	    fi
28280            # Source the builddeps file again, because in the previous command, the depdir
28281            # was updated to point at the current build dependency install directory.
28282            . $builddepsfile
28283            # Now extract variables from the builddeps.conf files.
28284            theroot=${builddep_cups_ROOT}
28285            thecflags=${builddep_cups_CFLAGS}
28286            thelibs=${builddep_cups_LIBS}
28287            if test "x$depdir" = x; then
28288                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28289            fi
28290            CUPS=$depdir
28291            if test "x$theroot" != x; then
28292               CUPS="$theroot"
28293            fi
28294            if test "x$thecflags" != x; then
28295               CUPS_CFLAGS="$thecflags"
28296            fi
28297            if test "x$thelibs" != x; then
28298               CUPS_LIBS="$thelibs"
28299            fi
28300            CUPS_FOUND=yes
28301
28302        fi
28303
28304    fi
28305
28306	fi
28307	if test "x$CUPS_FOUND" = xno; then
28308	    # Are the cups headers installed in the default /usr/include location?
28309	    for ac_header in cups/cups.h cups/ppd.h
28310do :
28311  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28312ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28313if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28314  cat >>confdefs.h <<_ACEOF
28315#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28316_ACEOF
28317 CUPS_FOUND=yes
28318	                      CUPS_CFLAGS=
28319	                      DEFAULT_CUPS=yes
28320fi
28321
28322done
28323
28324	fi
28325	if test "x$CUPS_FOUND" = xno; then
28326	    # Getting nervous now? Lets poke around for standard Solaris third-party
28327	    # package installation locations.
28328	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28329$as_echo_n "checking for cups headers... " >&6; }
28330	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28331	       # An SFW package seems to be installed!
28332	       CUPS_FOUND=yes
28333	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28334	    elif test -s /opt/csw/include/cups/cups.h; then
28335	       # A CSW package seems to be installed!
28336	       CUPS_FOUND=yes
28337	       CUPS_CFLAGS="-I/opt/csw/include"
28338	    fi
28339	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28340$as_echo "$CUPS_FOUND" >&6; }
28341	fi
28342	if test "x$CUPS_FOUND" = xno; then
28343
28344    # Print a helpful message on how to acquire the necessary build dependency.
28345    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28346    MISSING_DEPENDENCY=cups
28347    PKGHANDLER_COMMAND=
28348
28349    case $PKGHANDLER in
28350	apt-get)
28351                apt_help     $MISSING_DEPENDENCY ;;
28352    yum)
28353                yum_help     $MISSING_DEPENDENCY ;;
28354	port)
28355                port_help    $MISSING_DEPENDENCY ;;
28356	pkgutil)
28357                pkgutil_help $MISSING_DEPENDENCY ;;
28358	pkgadd)
28359                pkgadd_help  $MISSING_DEPENDENCY ;;
28360    * )
28361      break ;;
28362    esac
28363
28364    if test "x$PKGHANDLER_COMMAND" != x; then
28365        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28366    fi
28367
28368	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28369	fi
28370fi
28371
28372
28373
28374
28375
28376
28377###############################################################################
28378#
28379# The ubiquitous freetype2 library is used to render fonts.
28380#
28381
28382# Check whether --with-freetype was given.
28383if test "${with_freetype+set}" = set; then :
28384  withval=$with_freetype;
28385fi
28386
28387
28388# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28389USING_SYSTEM_FT_LIB=false
28390
28391if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28392	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28393		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28394$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28395	fi
28396	FREETYPE2_CFLAGS=
28397	FREETYPE2_LIBS=
28398        FREETYPE2_LIB_PATH=
28399else
28400	FREETYPE2_FOUND=no
28401
28402	if test "x$with_freetype" != x; then
28403
28404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28405
28406  # Input might be given as Windows format, start by converting to
28407  # unix format.
28408  path="$with_freetype"
28409  new_path=`$CYGPATH -u "$path"`
28410
28411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28414  # "foo.exe" is OK but "foo" is an error.
28415  #
28416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28417  # It is also a way to make sure we got the proper file name for the real test later on.
28418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28419  if test "x$test_shortpath" = x; then
28420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28421$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28422    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28423  fi
28424
28425  # Call helper function which possibly converts this using DOS-style short mode.
28426  # If so, the updated path is stored in $new_path.
28427
28428  input_path="$new_path"
28429  # Check if we need to convert this using DOS-style short mode. If the path
28430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28431  # take no chances and rewrite it.
28432  # Note: m4 eats our [], so we need to use [ and ] instead.
28433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28434  if test "x$has_forbidden_chars" != x; then
28435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28439      # Going to short mode and back again did indeed matter. Since short mode is
28440      # case insensitive, let's make it lowercase to improve readability.
28441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28442      # Now convert it back to Unix-stile (cygpath)
28443      input_path=`$CYGPATH -u "$shortmode_path"`
28444      new_path="$input_path"
28445    fi
28446  fi
28447
28448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28449  if test "x$test_cygdrive_prefix" = x; then
28450    # As a simple fix, exclude /usr/bin since it's not a real path.
28451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28453      # a path prefixed by /cygdrive for fixpath to work.
28454      new_path="$CYGWIN_ROOT_PATH$input_path"
28455    fi
28456  fi
28457
28458
28459  if test "x$path" != "x$new_path"; then
28460    with_freetype="$new_path"
28461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28462$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28463  fi
28464
28465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28466
28467  path="$with_freetype"
28468  has_colon=`$ECHO $path | $GREP ^.:`
28469  new_path="$path"
28470  if test "x$has_colon" = x; then
28471    # Not in mixed or Windows style, start by that.
28472    new_path=`cmd //c echo $path`
28473  fi
28474
28475
28476  input_path="$new_path"
28477  # Check if we need to convert this using DOS-style short mode. If the path
28478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28479  # take no chances and rewrite it.
28480  # Note: m4 eats our [], so we need to use [ and ] instead.
28481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28482  if test "x$has_forbidden_chars" != x; then
28483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28485  fi
28486
28487
28488  windows_path="$new_path"
28489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28490    unix_path=`$CYGPATH -u "$windows_path"`
28491    new_path="$unix_path"
28492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28494    new_path="$unix_path"
28495  fi
28496
28497  if test "x$path" != "x$new_path"; then
28498    with_freetype="$new_path"
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28500$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28501  fi
28502
28503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28505
28506  else
28507    # We're on a posix platform. Hooray! :)
28508    path="$with_freetype"
28509
28510    if test ! -f "$path" && test ! -d "$path"; then
28511      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
28512    fi
28513
28514    has_space=`$ECHO "$path" | $GREP " "`
28515    if test "x$has_space" != x; then
28516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28517$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28519    fi
28520  fi
28521
28522	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
28523            FREETYPE2_LIB_PATH="$with_freetype/lib"
28524            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
28525                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
28526                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
28527            fi
28528            if test "x$OPENJDK_TARGET_OS" = xwindows; then
28529                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
28530            fi
28531	    FREETYPE2_CFLAGS="-I$with_freetype/include"
28532            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
28533                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
28534            fi
28535 	    FREETYPE2_FOUND=yes
28536   	    if test "x$FREETYPE2_FOUND" = xyes; then
28537	        # Verify that the directories exist
28538                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
28539		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
28540		fi
28541	        # List the contents of the lib.
28542		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
28543                if test "x$FREETYPELIB" = x; then
28544		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
28545		fi
28546	        # Check one h-file
28547                if ! test -s "$with_freetype/include/ft2build.h"; then
28548		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
28549		fi
28550            fi
28551        fi
28552	if test "x$FREETYPE2_FOUND" = xno; then
28553
28554
28555    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28556        # Source the builddeps file again, to make sure it uses the latest variables!
28557        . $builddepsfile
28558        # Look for a target and build machine specific resource!
28559        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28560        if test "x$resource" = x; then
28561            # Ok, lets instead look for a target specific resource
28562            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
28563        fi
28564        if test "x$resource" = x; then
28565            # Ok, lets instead look for a build specific resource
28566            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
28567        fi
28568        if test "x$resource" = x; then
28569            # Ok, lets instead look for a generic resource
28570            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
28571            resource=${builddep_freetype2}
28572        fi
28573        if test "x$resource" != x; then
28574            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
28575$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
28576	    # If the resource in the builddeps.conf file is an existing directory,
28577	    # for example /java/linux/cups
28578	    if test -d ${resource}; then
28579	       depdir=${resource}
28580	    else
28581
28582# freetype2 is for example mymodule
28583# $resource is for example libs/general/libmymod_1_2_3.zip
28584# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28585# $with_builddeps_dir is for example /localhome/builddeps
28586# depdir is the name of the variable into which we store the depdir, eg MYMOD
28587# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28588# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28589    filename=`basename $resource`
28590    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28591    filebase=${filename%%.*}
28592    extension=${filename#*.}
28593    installdir=$with_builddeps_dir/$filebase
28594    if test ! -f $installdir/$filename.unpacked; then
28595        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
28596$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28597        if test ! -d $installdir; then
28598            mkdir -p $installdir
28599        fi
28600        if test ! -d $installdir; then
28601            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28602        fi
28603        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
28604        touch $tmpfile
28605        if test ! -f $tmpfile; then
28606            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28607        fi
28608
28609    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28610    # $tmpfile is the local file name for the downloaded file.
28611    VALID_TOOL=no
28612    if test "x$BDEPS_FTP" = xwget; then
28613       VALID_TOOL=yes
28614       wget -O $tmpfile $with_builddeps_server/$resource
28615    fi
28616    if test "x$BDEPS_FTP" = xlftp; then
28617       VALID_TOOL=yes
28618       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28619    fi
28620    if test "x$BDEPS_FTP" = xftp; then
28621        VALID_TOOL=yes
28622        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28623        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28624        FTPUSERPWD=${FTPSERVER%%@*}
28625        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28626            FTPUSER=${userpwd%%:*}
28627            FTPPWD=${userpwd#*@}
28628            FTPSERVER=${FTPSERVER#*@}
28629        else
28630            FTPUSER=ftp
28631            FTPPWD=ftp
28632        fi
28633        # the "pass" command does not work on some
28634        # ftp clients (read ftp.exe) but if it works,
28635        # passive mode is better!
28636        (\
28637            echo "user $FTPUSER $FTPPWD"        ;\
28638            echo "pass"                         ;\
28639            echo "bin"                          ;\
28640            echo "get $FTPPATH $tmpfile"              ;\
28641        ) | ftp -in $FTPSERVER
28642    fi
28643    if test "x$VALID_TOOL" != xyes; then
28644       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28645    fi
28646
28647        mv $tmpfile $installdir/$filename
28648        if test ! -s $installdir/$filename; then
28649            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28650        fi
28651        case "$extension" in
28652            zip)  echo "Unzipping $installdir/$filename..."
28653               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28654            ;;
28655            tar.gz) echo "Untaring $installdir/$filename..."
28656               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28657            ;;
28658            tgz) echo "Untaring $installdir/$filename..."
28659               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28660            ;;
28661            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28662            ;;
28663        esac
28664    fi
28665    if test -f $installdir/$filename.unpacked; then
28666        depdir=$installdir
28667    fi
28668
28669	    fi
28670            # Source the builddeps file again, because in the previous command, the depdir
28671            # was updated to point at the current build dependency install directory.
28672            . $builddepsfile
28673            # Now extract variables from the builddeps.conf files.
28674            theroot=${builddep_freetype2_ROOT}
28675            thecflags=${builddep_freetype2_CFLAGS}
28676            thelibs=${builddep_freetype2_LIBS}
28677            if test "x$depdir" = x; then
28678                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
28679            fi
28680            FREETYPE2=$depdir
28681            if test "x$theroot" != x; then
28682               FREETYPE2="$theroot"
28683            fi
28684            if test "x$thecflags" != x; then
28685               FREETYPE2_CFLAGS="$thecflags"
28686            fi
28687            if test "x$thelibs" != x; then
28688               FREETYPE2_LIBS="$thelibs"
28689            fi
28690            FREETYPE2_FOUND=yes
28691            else FREETYPE2_FOUND=no
28692
28693        fi
28694        else FREETYPE2_FOUND=no
28695
28696    fi
28697
28698            USING_SYSTEM_FT_LIB=true
28699	fi
28700	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
28701            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
28702
28703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704
28705  # Input might be given as Windows format, start by converting to
28706  # unix format.
28707  path="$FREETYPELOCATION"
28708  new_path=`$CYGPATH -u "$path"`
28709
28710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28713  # "foo.exe" is OK but "foo" is an error.
28714  #
28715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28716  # It is also a way to make sure we got the proper file name for the real test later on.
28717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28718  if test "x$test_shortpath" = x; then
28719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
28720$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
28721    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
28722  fi
28723
28724  # Call helper function which possibly converts this using DOS-style short mode.
28725  # If so, the updated path is stored in $new_path.
28726
28727  input_path="$new_path"
28728  # Check if we need to convert this using DOS-style short mode. If the path
28729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28730  # take no chances and rewrite it.
28731  # Note: m4 eats our [], so we need to use [ and ] instead.
28732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28733  if test "x$has_forbidden_chars" != x; then
28734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28738      # Going to short mode and back again did indeed matter. Since short mode is
28739      # case insensitive, let's make it lowercase to improve readability.
28740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28741      # Now convert it back to Unix-stile (cygpath)
28742      input_path=`$CYGPATH -u "$shortmode_path"`
28743      new_path="$input_path"
28744    fi
28745  fi
28746
28747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28748  if test "x$test_cygdrive_prefix" = x; then
28749    # As a simple fix, exclude /usr/bin since it's not a real path.
28750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28752      # a path prefixed by /cygdrive for fixpath to work.
28753      new_path="$CYGWIN_ROOT_PATH$input_path"
28754    fi
28755  fi
28756
28757
28758  if test "x$path" != "x$new_path"; then
28759    FREETYPELOCATION="$new_path"
28760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
28761$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
28762  fi
28763
28764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28765
28766  path="$FREETYPELOCATION"
28767  has_colon=`$ECHO $path | $GREP ^.:`
28768  new_path="$path"
28769  if test "x$has_colon" = x; then
28770    # Not in mixed or Windows style, start by that.
28771    new_path=`cmd //c echo $path`
28772  fi
28773
28774
28775  input_path="$new_path"
28776  # Check if we need to convert this using DOS-style short mode. If the path
28777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28778  # take no chances and rewrite it.
28779  # Note: m4 eats our [], so we need to use [ and ] instead.
28780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28781  if test "x$has_forbidden_chars" != x; then
28782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28784  fi
28785
28786
28787  windows_path="$new_path"
28788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28789    unix_path=`$CYGPATH -u "$windows_path"`
28790    new_path="$unix_path"
28791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28793    new_path="$unix_path"
28794  fi
28795
28796  if test "x$path" != "x$new_path"; then
28797    FREETYPELOCATION="$new_path"
28798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
28799$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
28800  fi
28801
28802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28804
28805  else
28806    # We're on a posix platform. Hooray! :)
28807    path="$FREETYPELOCATION"
28808
28809    if test ! -f "$path" && test ! -d "$path"; then
28810      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
28811    fi
28812
28813    has_space=`$ECHO "$path" | $GREP " "`
28814    if test "x$has_space" != x; then
28815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
28816$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
28817      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28818    fi
28819  fi
28820
28821	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
28822$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
28823	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
28824	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
28825	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
28826 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
28827                if ! test -s "$FREETYPE2_LIBS"; then
28828		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
28829		fi
28830                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
28831		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
28832		fi
28833                USING_SYSTEM_FT_LIB=true
28834                FREETYPE2_FOUND=yes
28835	    fi
28836	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
28837$as_echo "$FREETYPE2_FOUND" >&6; }
28838        fi
28839	if test "x$FREETYPE2_FOUND" = xno; then
28840
28841pkg_failed=no
28842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
28843$as_echo_n "checking for FREETYPE2... " >&6; }
28844
28845if test -n "$FREETYPE2_CFLAGS"; then
28846    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
28847 elif test -n "$PKG_CONFIG"; then
28848    if test -n "$PKG_CONFIG" && \
28849    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
28850  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
28851  ac_status=$?
28852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28853  test $ac_status = 0; }; then
28854  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
28855else
28856  pkg_failed=yes
28857fi
28858 else
28859    pkg_failed=untried
28860fi
28861if test -n "$FREETYPE2_LIBS"; then
28862    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
28863 elif test -n "$PKG_CONFIG"; then
28864    if test -n "$PKG_CONFIG" && \
28865    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
28866  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
28867  ac_status=$?
28868  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28869  test $ac_status = 0; }; then
28870  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
28871else
28872  pkg_failed=yes
28873fi
28874 else
28875    pkg_failed=untried
28876fi
28877
28878
28879
28880if test $pkg_failed = yes; then
28881
28882if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
28883        _pkg_short_errors_supported=yes
28884else
28885        _pkg_short_errors_supported=no
28886fi
28887        if test $_pkg_short_errors_supported = yes; then
28888	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
28889        else
28890	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
28891        fi
28892	# Put the nasty error message in config.log where it belongs
28893	echo "$FREETYPE2_PKG_ERRORS" >&5
28894
28895	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28896$as_echo "no" >&6; }
28897                FREETYPE2_FOUND=no
28898elif test $pkg_failed = untried; then
28899	FREETYPE2_FOUND=no
28900else
28901	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
28902	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
28903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28904$as_echo "yes" >&6; }
28905	FREETYPE2_FOUND=yes
28906fi
28907            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
28908            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
28909            USING_SYSTEM_FT_LIB=true
28910            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
28911            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
28912              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
28913            fi
28914	fi
28915	if test "x$FREETYPE2_FOUND" = xno; then
28916	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
28917$as_echo_n "checking for freetype in some standard locations... " >&6; }
28918
28919	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
28920	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
28921	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
28922	    fi
28923	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
28924	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
28925	        DEFAULT_FREETYPE_LIBS="-lfreetype"
28926	    fi
28927
28928	    PREV_CXXCFLAGS="$CXXFLAGS"
28929	    PREV_LDFLAGS="$LDFLAGS"
28930	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
28931	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
28932	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28933/* end confdefs.h.  */
28934#include<ft2build.h>
28935	                    #include FT_FREETYPE_H
28936	                   int main() { return 0; }
28937
28938_ACEOF
28939if ac_fn_cxx_try_link "$LINENO"; then :
28940
28941	                      # Yes, the default cflags and libs did the trick.
28942	                      FREETYPE2_FOUND=yes
28943	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
28944	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
28945
28946else
28947
28948	                      FREETYPE2_FOUND=no
28949
28950fi
28951rm -f core conftest.err conftest.$ac_objext \
28952    conftest$ac_exeext conftest.$ac_ext
28953            CXXCFLAGS="$PREV_CXXFLAGS"
28954	    LDFLAGS="$PREV_LDFLAGS"
28955	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
28956$as_echo "$FREETYPE2_FOUND" >&6; }
28957            USING_SYSTEM_FT_LIB=true
28958	fi
28959	if test "x$FREETYPE2_FOUND" = xno; then
28960
28961    # Print a helpful message on how to acquire the necessary build dependency.
28962    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
28963    MISSING_DEPENDENCY=freetype2
28964    PKGHANDLER_COMMAND=
28965
28966    case $PKGHANDLER in
28967	apt-get)
28968                apt_help     $MISSING_DEPENDENCY ;;
28969    yum)
28970                yum_help     $MISSING_DEPENDENCY ;;
28971	port)
28972                port_help    $MISSING_DEPENDENCY ;;
28973	pkgutil)
28974                pkgutil_help $MISSING_DEPENDENCY ;;
28975	pkgadd)
28976                pkgadd_help  $MISSING_DEPENDENCY ;;
28977    * )
28978      break ;;
28979    esac
28980
28981    if test "x$PKGHANDLER_COMMAND" != x; then
28982        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28983    fi
28984
28985		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
28986	fi
28987
28988        if test "x$OPENJDK_TARGET_OS" != xwindows; then
28989            # AC_CHECK_LIB does not support use of cl.exe
28990            PREV_LDFLAGS="$LDFLAGS"
28991            LDFLAGS="$FREETYPE2_LIBS"
28992            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
28993$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
28994if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
28995  $as_echo_n "(cached) " >&6
28996else
28997  ac_check_lib_save_LIBS=$LIBS
28998LIBS="-lfreetype  $LIBS"
28999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29000/* end confdefs.h.  */
29001
29002/* Override any GCC internal prototype to avoid an error.
29003   Use char because int might match the return type of a GCC
29004   builtin and then its argument prototype would still apply.  */
29005#ifdef __cplusplus
29006extern "C"
29007#endif
29008char FT_Init_FreeType ();
29009int
29010main ()
29011{
29012return FT_Init_FreeType ();
29013  ;
29014  return 0;
29015}
29016_ACEOF
29017if ac_fn_cxx_try_link "$LINENO"; then :
29018  ac_cv_lib_freetype_FT_Init_FreeType=yes
29019else
29020  ac_cv_lib_freetype_FT_Init_FreeType=no
29021fi
29022rm -f core conftest.err conftest.$ac_objext \
29023    conftest$ac_exeext conftest.$ac_ext
29024LIBS=$ac_check_lib_save_LIBS
29025fi
29026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29027$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29028if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29029  cat >>confdefs.h <<_ACEOF
29030#define HAVE_LIBFREETYPE 1
29031_ACEOF
29032
29033  LIBS="-lfreetype $LIBS"
29034
29035else
29036  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29037fi
29038
29039            LDFLAGS="$PREV_LDFLAGS"
29040        fi
29041fi
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051###############################################################################
29052#
29053# Check for alsa headers and libraries. Used on Linux/GNU systems.
29054#
29055
29056# Check whether --with-alsa was given.
29057if test "${with_alsa+set}" = set; then :
29058  withval=$with_alsa;
29059fi
29060
29061
29062# Check whether --with-alsa-include was given.
29063if test "${with_alsa_include+set}" = set; then :
29064  withval=$with_alsa_include;
29065fi
29066
29067
29068# Check whether --with-alsa-lib was given.
29069if test "${with_alsa_lib+set}" = set; then :
29070  withval=$with_alsa_lib;
29071fi
29072
29073
29074if test "x$ALSA_NOT_NEEDED" = xyes; then
29075	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29076		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29077$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29078	fi
29079	ALSA_CFLAGS=
29080	ALSA_LIBS=
29081else
29082	ALSA_FOUND=no
29083
29084	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29085	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29086	fi
29087
29088	if test "x${with_alsa}" != x; then
29089	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29090	    ALSA_CFLAGS="-I${with_alsa}/include"
29091	    ALSA_FOUND=yes
29092	fi
29093	if test "x${with_alsa_include}" != x; then
29094	    ALSA_CFLAGS="-I${with_alsa_include}"
29095	    ALSA_FOUND=yes
29096	fi
29097	if test "x${with_alsa_lib}" != x; then
29098	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29099	    ALSA_FOUND=yes
29100	fi
29101	if test "x$ALSA_FOUND" = xno; then
29102
29103
29104    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29105        # Source the builddeps file again, to make sure it uses the latest variables!
29106        . $builddepsfile
29107        # Look for a target and build machine specific resource!
29108        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29109        if test "x$resource" = x; then
29110            # Ok, lets instead look for a target specific resource
29111            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29112        fi
29113        if test "x$resource" = x; then
29114            # Ok, lets instead look for a build specific resource
29115            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29116        fi
29117        if test "x$resource" = x; then
29118            # Ok, lets instead look for a generic resource
29119            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29120            resource=${builddep_alsa}
29121        fi
29122        if test "x$resource" != x; then
29123            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29124$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29125	    # If the resource in the builddeps.conf file is an existing directory,
29126	    # for example /java/linux/cups
29127	    if test -d ${resource}; then
29128	       depdir=${resource}
29129	    else
29130
29131# alsa is for example mymodule
29132# $resource is for example libs/general/libmymod_1_2_3.zip
29133# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29134# $with_builddeps_dir is for example /localhome/builddeps
29135# depdir is the name of the variable into which we store the depdir, eg MYMOD
29136# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29137# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29138    filename=`basename $resource`
29139    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29140    filebase=${filename%%.*}
29141    extension=${filename#*.}
29142    installdir=$with_builddeps_dir/$filebase
29143    if test ! -f $installdir/$filename.unpacked; then
29144        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29145$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29146        if test ! -d $installdir; then
29147            mkdir -p $installdir
29148        fi
29149        if test ! -d $installdir; then
29150            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29151        fi
29152        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29153        touch $tmpfile
29154        if test ! -f $tmpfile; then
29155            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29156        fi
29157
29158    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29159    # $tmpfile is the local file name for the downloaded file.
29160    VALID_TOOL=no
29161    if test "x$BDEPS_FTP" = xwget; then
29162       VALID_TOOL=yes
29163       wget -O $tmpfile $with_builddeps_server/$resource
29164    fi
29165    if test "x$BDEPS_FTP" = xlftp; then
29166       VALID_TOOL=yes
29167       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29168    fi
29169    if test "x$BDEPS_FTP" = xftp; then
29170        VALID_TOOL=yes
29171        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29172        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29173        FTPUSERPWD=${FTPSERVER%%@*}
29174        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29175            FTPUSER=${userpwd%%:*}
29176            FTPPWD=${userpwd#*@}
29177            FTPSERVER=${FTPSERVER#*@}
29178        else
29179            FTPUSER=ftp
29180            FTPPWD=ftp
29181        fi
29182        # the "pass" command does not work on some
29183        # ftp clients (read ftp.exe) but if it works,
29184        # passive mode is better!
29185        (\
29186            echo "user $FTPUSER $FTPPWD"        ;\
29187            echo "pass"                         ;\
29188            echo "bin"                          ;\
29189            echo "get $FTPPATH $tmpfile"              ;\
29190        ) | ftp -in $FTPSERVER
29191    fi
29192    if test "x$VALID_TOOL" != xyes; then
29193       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29194    fi
29195
29196        mv $tmpfile $installdir/$filename
29197        if test ! -s $installdir/$filename; then
29198            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29199        fi
29200        case "$extension" in
29201            zip)  echo "Unzipping $installdir/$filename..."
29202               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29203            ;;
29204            tar.gz) echo "Untaring $installdir/$filename..."
29205               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29206            ;;
29207            tgz) echo "Untaring $installdir/$filename..."
29208               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29209            ;;
29210            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29211            ;;
29212        esac
29213    fi
29214    if test -f $installdir/$filename.unpacked; then
29215        depdir=$installdir
29216    fi
29217
29218	    fi
29219            # Source the builddeps file again, because in the previous command, the depdir
29220            # was updated to point at the current build dependency install directory.
29221            . $builddepsfile
29222            # Now extract variables from the builddeps.conf files.
29223            theroot=${builddep_alsa_ROOT}
29224            thecflags=${builddep_alsa_CFLAGS}
29225            thelibs=${builddep_alsa_LIBS}
29226            if test "x$depdir" = x; then
29227                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29228            fi
29229            ALSA=$depdir
29230            if test "x$theroot" != x; then
29231               ALSA="$theroot"
29232            fi
29233            if test "x$thecflags" != x; then
29234               ALSA_CFLAGS="$thecflags"
29235            fi
29236            if test "x$thelibs" != x; then
29237               ALSA_LIBS="$thelibs"
29238            fi
29239            ALSA_FOUND=yes
29240            else ALSA_FOUND=no
29241
29242        fi
29243        else ALSA_FOUND=no
29244
29245    fi
29246
29247	fi
29248	if test "x$ALSA_FOUND" = xno; then
29249
29250pkg_failed=no
29251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29252$as_echo_n "checking for ALSA... " >&6; }
29253
29254if test -n "$ALSA_CFLAGS"; then
29255    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29256 elif test -n "$PKG_CONFIG"; then
29257    if test -n "$PKG_CONFIG" && \
29258    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29259  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29260  ac_status=$?
29261  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29262  test $ac_status = 0; }; then
29263  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29264else
29265  pkg_failed=yes
29266fi
29267 else
29268    pkg_failed=untried
29269fi
29270if test -n "$ALSA_LIBS"; then
29271    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29272 elif test -n "$PKG_CONFIG"; then
29273    if test -n "$PKG_CONFIG" && \
29274    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29275  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29276  ac_status=$?
29277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29278  test $ac_status = 0; }; then
29279  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29280else
29281  pkg_failed=yes
29282fi
29283 else
29284    pkg_failed=untried
29285fi
29286
29287
29288
29289if test $pkg_failed = yes; then
29290
29291if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29292        _pkg_short_errors_supported=yes
29293else
29294        _pkg_short_errors_supported=no
29295fi
29296        if test $_pkg_short_errors_supported = yes; then
29297	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29298        else
29299	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29300        fi
29301	# Put the nasty error message in config.log where it belongs
29302	echo "$ALSA_PKG_ERRORS" >&5
29303
29304	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29305$as_echo "no" >&6; }
29306                ALSA_FOUND=no
29307elif test $pkg_failed = untried; then
29308	ALSA_FOUND=no
29309else
29310	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29311	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29313$as_echo "yes" >&6; }
29314	ALSA_FOUND=yes
29315fi
29316	fi
29317	if test "x$ALSA_FOUND" = xno; then
29318	    for ac_header in alsa/asoundlib.h
29319do :
29320  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29321if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29322  cat >>confdefs.h <<_ACEOF
29323#define HAVE_ALSA_ASOUNDLIB_H 1
29324_ACEOF
29325 ALSA_FOUND=yes
29326	                      ALSA_CFLAGS=-Iignoreme
29327	                      ALSA_LIBS=-lasound
29328	                      DEFAULT_ALSA=yes
29329else
29330  ALSA_FOUND=no
29331fi
29332
29333done
29334
29335	fi
29336	if test "x$ALSA_FOUND" = xno; then
29337
29338    # Print a helpful message on how to acquire the necessary build dependency.
29339    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29340    MISSING_DEPENDENCY=alsa
29341    PKGHANDLER_COMMAND=
29342
29343    case $PKGHANDLER in
29344	apt-get)
29345                apt_help     $MISSING_DEPENDENCY ;;
29346    yum)
29347                yum_help     $MISSING_DEPENDENCY ;;
29348	port)
29349                port_help    $MISSING_DEPENDENCY ;;
29350	pkgutil)
29351                pkgutil_help $MISSING_DEPENDENCY ;;
29352	pkgadd)
29353                pkgadd_help  $MISSING_DEPENDENCY ;;
29354    * )
29355      break ;;
29356    esac
29357
29358    if test "x$PKGHANDLER_COMMAND" != x; then
29359        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29360    fi
29361
29362	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29363	fi
29364fi
29365
29366
29367
29368
29369
29370
29371
29372###############################################################################
29373#
29374# Check for the jpeg library
29375#
29376
29377USE_EXTERNAL_LIBJPEG=true
29378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29379$as_echo_n "checking for main in -ljpeg... " >&6; }
29380if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29381  $as_echo_n "(cached) " >&6
29382else
29383  ac_check_lib_save_LIBS=$LIBS
29384LIBS="-ljpeg  $LIBS"
29385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29386/* end confdefs.h.  */
29387
29388
29389int
29390main ()
29391{
29392return main ();
29393  ;
29394  return 0;
29395}
29396_ACEOF
29397if ac_fn_cxx_try_link "$LINENO"; then :
29398  ac_cv_lib_jpeg_main=yes
29399else
29400  ac_cv_lib_jpeg_main=no
29401fi
29402rm -f core conftest.err conftest.$ac_objext \
29403    conftest$ac_exeext conftest.$ac_ext
29404LIBS=$ac_check_lib_save_LIBS
29405fi
29406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29407$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29408if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29409  cat >>confdefs.h <<_ACEOF
29410#define HAVE_LIBJPEG 1
29411_ACEOF
29412
29413  LIBS="-ljpeg $LIBS"
29414
29415else
29416   USE_EXTERNAL_LIBJPEG=false
29417               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29418$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29419
29420fi
29421
29422
29423
29424###############################################################################
29425#
29426# Check for the gif library
29427#
29428
29429USE_EXTERNAL_LIBJPEG=true
29430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29431$as_echo_n "checking for main in -lgif... " >&6; }
29432if test "${ac_cv_lib_gif_main+set}" = set; then :
29433  $as_echo_n "(cached) " >&6
29434else
29435  ac_check_lib_save_LIBS=$LIBS
29436LIBS="-lgif  $LIBS"
29437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29438/* end confdefs.h.  */
29439
29440
29441int
29442main ()
29443{
29444return main ();
29445  ;
29446  return 0;
29447}
29448_ACEOF
29449if ac_fn_cxx_try_link "$LINENO"; then :
29450  ac_cv_lib_gif_main=yes
29451else
29452  ac_cv_lib_gif_main=no
29453fi
29454rm -f core conftest.err conftest.$ac_objext \
29455    conftest$ac_exeext conftest.$ac_ext
29456LIBS=$ac_check_lib_save_LIBS
29457fi
29458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
29459$as_echo "$ac_cv_lib_gif_main" >&6; }
29460if test "x$ac_cv_lib_gif_main" = x""yes; then :
29461  cat >>confdefs.h <<_ACEOF
29462#define HAVE_LIBGIF 1
29463_ACEOF
29464
29465  LIBS="-lgif $LIBS"
29466
29467else
29468   USE_EXTERNAL_LIBGIF=false
29469               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
29470$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
29471
29472fi
29473
29474
29475
29476###############################################################################
29477#
29478# Check for the zlib library
29479#
29480
29481
29482# Check whether --with-zlib was given.
29483if test "${with_zlib+set}" = set; then :
29484  withval=$with_zlib;
29485fi
29486
29487
29488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
29489$as_echo_n "checking for compress in -lz... " >&6; }
29490if test "${ac_cv_lib_z_compress+set}" = set; then :
29491  $as_echo_n "(cached) " >&6
29492else
29493  ac_check_lib_save_LIBS=$LIBS
29494LIBS="-lz  $LIBS"
29495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29496/* end confdefs.h.  */
29497
29498/* Override any GCC internal prototype to avoid an error.
29499   Use char because int might match the return type of a GCC
29500   builtin and then its argument prototype would still apply.  */
29501#ifdef __cplusplus
29502extern "C"
29503#endif
29504char compress ();
29505int
29506main ()
29507{
29508return compress ();
29509  ;
29510  return 0;
29511}
29512_ACEOF
29513if ac_fn_cxx_try_link "$LINENO"; then :
29514  ac_cv_lib_z_compress=yes
29515else
29516  ac_cv_lib_z_compress=no
29517fi
29518rm -f core conftest.err conftest.$ac_objext \
29519    conftest$ac_exeext conftest.$ac_ext
29520LIBS=$ac_check_lib_save_LIBS
29521fi
29522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
29523$as_echo "$ac_cv_lib_z_compress" >&6; }
29524if test "x$ac_cv_lib_z_compress" = x""yes; then :
29525   ZLIB_FOUND=yes
29526else
29527   ZLIB_FOUND=no
29528fi
29529
29530
29531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
29532$as_echo_n "checking for which zlib to use... " >&6; }
29533
29534DEFAULT_ZLIB=bundled
29535if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29536#
29537# On macosx default is system...on others default is
29538#
29539    DEFAULT_ZLIB=system
29540fi
29541
29542if test "x${ZLIB_FOUND}" != "xyes"; then
29543#
29544# If we don't find any system...set default to bundled
29545#
29546    DEFAULT_ZLIB=bundled
29547fi
29548
29549#
29550# If user didn't specify, use DEFAULT_ZLIB
29551#
29552if test "x${with_zlib}" = "x"; then
29553    with_zlib=${DEFAULT_ZLIB}
29554fi
29555
29556if test "x${with_zlib}" = "xbundled"; then
29557    USE_EXTERNAL_LIBZ=false
29558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
29559$as_echo "bundled" >&6; }
29560elif test "x${with_zlib}" = "xsystem"; then
29561    if test "x${ZLIB_FOUND}" = "xyes"; then
29562        USE_EXTERNAL_LIBZ=true
29563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
29564$as_echo "system" >&6; }
29565    else
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
29567$as_echo "system not found" >&6; }
29568        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
29569    fi
29570else
29571    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
29572fi
29573
29574
29575
29576###############################################################################
29577LIBZIP_CAN_USE_MMAP=true
29578
29579
29580
29581###############################################################################
29582#
29583# Check if altzone exists in time.h
29584#
29585
29586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29587/* end confdefs.h.  */
29588#include <time.h>
29589int
29590main ()
29591{
29592return (int)altzone;
29593  ;
29594  return 0;
29595}
29596_ACEOF
29597if ac_fn_cxx_try_link "$LINENO"; then :
29598  has_altzone=yes
29599else
29600  has_altzone=no
29601fi
29602rm -f core conftest.err conftest.$ac_objext \
29603    conftest$ac_exeext conftest.$ac_ext
29604if test "x$has_altzone" = xyes; then
29605
29606$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
29607
29608fi
29609
29610###############################################################################
29611#
29612# Check the maths library
29613#
29614
29615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
29616$as_echo_n "checking for cos in -lm... " >&6; }
29617if test "${ac_cv_lib_m_cos+set}" = set; then :
29618  $as_echo_n "(cached) " >&6
29619else
29620  ac_check_lib_save_LIBS=$LIBS
29621LIBS="-lm  $LIBS"
29622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29623/* end confdefs.h.  */
29624
29625/* Override any GCC internal prototype to avoid an error.
29626   Use char because int might match the return type of a GCC
29627   builtin and then its argument prototype would still apply.  */
29628#ifdef __cplusplus
29629extern "C"
29630#endif
29631char cos ();
29632int
29633main ()
29634{
29635return cos ();
29636  ;
29637  return 0;
29638}
29639_ACEOF
29640if ac_fn_cxx_try_link "$LINENO"; then :
29641  ac_cv_lib_m_cos=yes
29642else
29643  ac_cv_lib_m_cos=no
29644fi
29645rm -f core conftest.err conftest.$ac_objext \
29646    conftest$ac_exeext conftest.$ac_ext
29647LIBS=$ac_check_lib_save_LIBS
29648fi
29649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
29650$as_echo "$ac_cv_lib_m_cos" >&6; }
29651if test "x$ac_cv_lib_m_cos" = x""yes; then :
29652  cat >>confdefs.h <<_ACEOF
29653#define HAVE_LIBM 1
29654_ACEOF
29655
29656  LIBS="-lm $LIBS"
29657
29658else
29659
29660                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
29661$as_echo "$as_me: Maths library was not found" >&6;}
29662
29663fi
29664
29665
29666
29667###############################################################################
29668#
29669# Check for libdl.so
29670
29671save_LIBS="$LIBS"
29672LIBS=""
29673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
29674$as_echo_n "checking for dlopen in -ldl... " >&6; }
29675if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
29676  $as_echo_n "(cached) " >&6
29677else
29678  ac_check_lib_save_LIBS=$LIBS
29679LIBS="-ldl  $LIBS"
29680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29681/* end confdefs.h.  */
29682
29683/* Override any GCC internal prototype to avoid an error.
29684   Use char because int might match the return type of a GCC
29685   builtin and then its argument prototype would still apply.  */
29686#ifdef __cplusplus
29687extern "C"
29688#endif
29689char dlopen ();
29690int
29691main ()
29692{
29693return dlopen ();
29694  ;
29695  return 0;
29696}
29697_ACEOF
29698if ac_fn_cxx_try_link "$LINENO"; then :
29699  ac_cv_lib_dl_dlopen=yes
29700else
29701  ac_cv_lib_dl_dlopen=no
29702fi
29703rm -f core conftest.err conftest.$ac_objext \
29704    conftest$ac_exeext conftest.$ac_ext
29705LIBS=$ac_check_lib_save_LIBS
29706fi
29707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
29708$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
29709if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
29710  cat >>confdefs.h <<_ACEOF
29711#define HAVE_LIBDL 1
29712_ACEOF
29713
29714  LIBS="-ldl $LIBS"
29715
29716fi
29717
29718LIBDL="$LIBS"
29719
29720LIBS="$save_LIBS"
29721
29722
29723
29724###############################################################################
29725#
29726# statically link libstdc++ before C++ ABI is stablized on Linux unless
29727# dynamic build is configured on command line.
29728#
29729# Check whether --enable-static-link-stdc++ was given.
29730if test "${enable_static_link_stdc__+set}" = set; then :
29731  enableval=$enable_static_link_stdc__;
29732else
29733
29734		enable_static_link_stdc__=yes
29735
29736fi
29737
29738
29739if test "x$OPENJDK_TARGET_OS" = xlinux; then
29740    # Test if -lstdc++ works.
29741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
29742$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
29743    ac_ext=cpp
29744ac_cpp='$CXXCPP $CPPFLAGS'
29745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29748
29749    OLD_CXXFLAGS="$CXXFLAGS"
29750    CXXFLAGS="$CXXFLAGS -lstdc++"
29751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29752/* end confdefs.h.  */
29753
29754int
29755main ()
29756{
29757return 0;
29758  ;
29759  return 0;
29760}
29761_ACEOF
29762if ac_fn_cxx_try_link "$LINENO"; then :
29763  has_dynamic_libstdcxx=yes
29764else
29765  has_dynamic_libstdcxx=no
29766fi
29767rm -f core conftest.err conftest.$ac_objext \
29768    conftest$ac_exeext conftest.$ac_ext
29769    CXXFLAGS="$OLD_CXXFLAGS"
29770    ac_ext=cpp
29771ac_cpp='$CXXCPP $CPPFLAGS'
29772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29775
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
29777$as_echo "$has_dynamic_libstdcxx" >&6; }
29778
29779    # Test if stdc++ can be linked statically.
29780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
29781$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
29782    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
29783    ac_ext=cpp
29784ac_cpp='$CXXCPP $CPPFLAGS'
29785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29788
29789    OLD_LIBS="$LIBS"
29790    OLD_CXX="$CXX"
29791    LIBS="$STATIC_STDCXX_FLAGS"
29792    CXX="$CC"
29793    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29794/* end confdefs.h.  */
29795
29796int
29797main ()
29798{
29799return 0;
29800  ;
29801  return 0;
29802}
29803_ACEOF
29804if ac_fn_cxx_try_link "$LINENO"; then :
29805  has_static_libstdcxx=yes
29806else
29807  has_static_libstdcxx=no
29808fi
29809rm -f core conftest.err conftest.$ac_objext \
29810    conftest$ac_exeext conftest.$ac_ext
29811    LIBS="$OLD_LIBS"
29812    CXX="$OLD_CXX"
29813    ac_ext=cpp
29814ac_cpp='$CXXCPP $CPPFLAGS'
29815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29818
29819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
29820$as_echo "$has_static_libstdcxx" >&6; }
29821
29822    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
29823        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
29824    fi
29825
29826    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
29827        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
29828$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
29829        enable_static_link_stdc__=no
29830    fi
29831
29832    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
29833        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
29834$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
29835        enable_static_link_stdc__=yes
29836    fi
29837
29838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
29839$as_echo_n "checking how to link with libstdc++... " >&6; }
29840    if test "x$enable_static_link_stdc__" = xyes; then
29841        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
29842        LDCXX="$CC"
29843        STATIC_CXX_SETTING="STATIC_CXX=true"
29844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
29845$as_echo "static" >&6; }
29846    else
29847        LIBCXX="$LIBCXX -lstdc++"
29848        LDCXX="$CXX"
29849        STATIC_CXX_SETTING="STATIC_CXX=false"
29850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
29851$as_echo "dynamic" >&6; }
29852    fi
29853fi
29854
29855
29856# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
29857if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
29858    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
29859fi
29860
29861# TODO better (platform agnostic) test
29862if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
29863    LIBCXX="-lstdc++"
29864fi
29865
29866
29867
29868
29869
29870# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
29871
29872# When using cygwin or msys, we need a wrapper binary that renames
29873# /cygdrive/c/ arguments into c:/ arguments and peeks into
29874# @files and rewrites these too! This wrapper binary is
29875# called fixpath.
29876FIXPATH=
29877if test "x$OPENJDK_BUILD_OS" = xwindows; then
29878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29879$as_echo_n "checking if fixpath can be created... " >&6; }
29880    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29881    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29882    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29883      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29884      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29885      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29886      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29887    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29888      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29889      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29890
29891      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29892      # @ was chosen as separator to minimize risk of other tools messing around with it
29893      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29894      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29895
29896      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29897    fi
29898    rm -f $OUTPUT_ROOT/fixpath*
29899    cd $OUTPUT_ROOT
29900    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29901    cd $CURDIR
29902
29903    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29905$as_echo "no" >&6; }
29906        cat $OUTPUT_ROOT/fixpath1.log
29907        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29908    fi
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29910$as_echo "yes" >&6; }
29911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29912$as_echo_n "checking if fixpath.exe works... " >&6; }
29913    cd $OUTPUT_ROOT
29914    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
29915    cd $CURDIR
29916    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
29917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29918$as_echo "no" >&6; }
29919        cat $OUTPUT_ROOT/fixpath2.log
29920        as_fn_error $? "fixpath did not work!" "$LINENO" 5
29921    fi
29922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29923$as_echo "yes" >&6; }
29924    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
29925fi
29926
29927
29928
29929
29930###############################################################################
29931#
29932# We need to do some final tweaking, when everything else is done.
29933#
29934###############################################################################
29935
29936
29937HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
29938
29939
29940# The name of the Service Agent jar.
29941SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
29942if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29943    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
29944fi
29945
29946
29947
29948
29949###############################################################################
29950#
29951# Configure parts of the build that only affect the build performance,
29952# not the result.
29953#
29954###############################################################################
29955
29956
29957# How many cores do we have on this build system?
29958
29959# Check whether --with-num-cores was given.
29960if test "${with_num_cores+set}" = set; then :
29961  withval=$with_num_cores;
29962fi
29963
29964if test "x$with_num_cores" = x; then
29965    # The number of cores were not specified, try to probe them.
29966
29967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
29968$as_echo_n "checking for number of cores... " >&6; }
29969    NUM_CORES=1
29970    FOUND_CORES=no
29971
29972    if test -f /proc/cpuinfo; then
29973        # Looks like a Linux (or cygwin) system
29974        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
29975        FOUND_CORES=yes
29976    elif test -x /usr/sbin/psrinfo; then
29977        # Looks like a Solaris system
29978        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
29979        FOUND_CORES=yes
29980    elif test -x /usr/sbin/system_profiler; then
29981        # Looks like a MacOSX system
29982        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
29983        FOUND_CORES=yes
29984    elif test -n "$NUMBER_OF_PROCESSORS"; then
29985        # On windows, look in the env
29986        NUM_CORES=$NUMBER_OF_PROCESSORS
29987        FOUND_CORES=yes
29988    fi
29989
29990    # For c/c++ code we run twice as many concurrent build
29991    # jobs than we have cores, otherwise we will stall on io.
29992    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
29993
29994    if test "x$FOUND_CORES" = xyes; then
29995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
29996$as_echo "$NUM_CORES" >&6; }
29997    else
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
29999$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30001$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30002    fi
30003
30004
30005else
30006    NUM_CORES=$with_num_cores
30007    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30008fi
30009
30010
30011
30012
30013# How much memory do we have on this build system?
30014
30015# Check whether --with-memory-size was given.
30016if test "${with_memory_size+set}" = set; then :
30017  withval=$with_memory_size;
30018fi
30019
30020if test "x$with_memory_size" = x; then
30021    # The memory size was not specified, try to probe it.
30022
30023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30024$as_echo_n "checking for memory size... " >&6; }
30025    # Default to 1024 MB
30026    MEMORY_SIZE=1024
30027    FOUND_MEM=no
30028
30029    if test -f /proc/meminfo; then
30030        # Looks like a Linux (or cygwin) system
30031        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30032        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30033        FOUND_MEM=yes
30034    elif test -x /usr/sbin/prtconf; then
30035        # Looks like a Solaris system
30036        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30037        FOUND_MEM=yes
30038    elif test -x /usr/sbin/system_profiler; then
30039        # Looks like a MacOSX system
30040        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30041        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30042        FOUND_MEM=yes
30043    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30044        # Windows, but without cygwin
30045        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30046        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30047        FOUND_MEM=yes
30048    fi
30049
30050    if test "x$FOUND_MEM" = xyes; then
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30052$as_echo "$MEMORY_SIZE MB" >&6; }
30053    else
30054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30055$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30057$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30058    fi
30059
30060else
30061    MEMORY_SIZE=$with_memory_size
30062fi
30063
30064
30065
30066# Setup smart javac (after cores and memory have been setup)
30067
30068
30069# Check whether --with-sjavac-server-java was given.
30070if test "${with_sjavac_server_java+set}" = set; then :
30071  withval=$with_sjavac_server_java;
30072fi
30073
30074
30075if test "x$with_sjavac_server_java" != x; then
30076    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30077    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30078    if test "x$FOUND_VERSION" = x; then
30079        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30080    fi
30081else
30082    SJAVAC_SERVER_JAVA=""
30083    # Hotspot specific options.
30084
30085    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30086    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30087    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30088    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30089    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30090        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30091    fi
30092
30093    # JRockit specific options.
30094
30095    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30096    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30097    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30098    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30099    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30100        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30101    fi
30102
30103    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30104fi
30105
30106
30107
30108# Check whether --with-sjavac-server-cores was given.
30109if test "${with_sjavac_server_cores+set}" = set; then :
30110  withval=$with_sjavac_server_cores;
30111fi
30112
30113if test "x$with_sjavac_server_cores" != x; then
30114    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30115else
30116    if test "$NUM_CORES" -gt 16; then
30117        # We set this arbitrary limit because we want to limit the heap
30118        # size of the javac server.
30119        # In the future we will make the javac compilers in the server
30120        # share more and more state, thus enabling us to use more and
30121        # more concurrent threads in the server.
30122        SJAVAC_SERVER_CORES="16"
30123    else
30124        SJAVAC_SERVER_CORES="$NUM_CORES"
30125    fi
30126
30127    if test "$MEMORY_SIZE" -gt "17000"; then
30128        MAX_HEAP_MEM=10000
30129
30130    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30131    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30132    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30133    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30134    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30135        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30136    fi
30137
30138
30139    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30140    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30141    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30142    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30143    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30144        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30145    fi
30146
30147    elif test "$MEMORY_SIZE" -gt "10000"; then
30148        MAX_HEAP_MEM=6000
30149
30150    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30151    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30152    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30153    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30154    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30155        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30156    fi
30157
30158
30159    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30160    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30161    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30162    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30163    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30164        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30165    fi
30166
30167    elif test "$MEMORY_SIZE" -gt "5000"; then
30168        MAX_HEAP_MEM=3000
30169
30170    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30171    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30172    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30173    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30174    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30175        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30176    fi
30177
30178
30179    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30180    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30181    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30182    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30183    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30184        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30185    fi
30186
30187    elif test "$MEMORY_SIZE" -gt "3800"; then
30188        MAX_HEAP_MEM=2500
30189
30190    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30191    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30192    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30193    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30194    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30195        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30196    fi
30197
30198    elif test "$MEMORY_SIZE" -gt "1900"; then
30199        MAX_HEAP_MEM=1200
30200
30201    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30202    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30203    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30204    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30205    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30206        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30207    fi
30208
30209    elif test "$MEMORY_SIZE" -gt "1000"; then
30210        MAX_HEAP_MEM=900
30211
30212    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30213    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30214    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30215    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30216    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30217        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30218    fi
30219
30220    else
30221        MAX_HEAP_MEM=512
30222
30223    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30224    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30225    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30226    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30227    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30228        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30229    fi
30230
30231    fi
30232
30233
30234    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30235    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30236    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30237    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30238    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30239        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30240    fi
30241
30242
30243    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30244    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30245    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30246    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30247    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30248        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30249    fi
30250
30251
30252    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30253    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30254    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30255    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30256    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30257        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30258    fi
30259
30260
30261    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30262    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30264$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30265        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30267$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30268    fi
30269fi
30270
30271
30272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30273$as_echo_n "checking whether to use sjavac... " >&6; }
30274# Check whether --enable-sjavac was given.
30275if test "${enable_sjavac+set}" = set; then :
30276  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30277else
30278  ENABLE_SJAVAC='no'
30279fi
30280
30281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30282$as_echo "$ENABLE_SJAVAC" >&6; }
30283
30284
30285if test "x$ENABLE_SJAVAC" = xyes; then
30286    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30287else
30288    SJAVAC_SERVER_DIR=
30289fi
30290
30291
30292
30293
30294# Can the C/C++ compiler use precompiled headers?
30295
30296
30297###############################################################################
30298#
30299# Can the C/C++ compiler use precompiled headers?
30300#
30301# Check whether --enable-precompiled-headers was given.
30302if test "${enable_precompiled_headers+set}" = set; then :
30303  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
30304else
30305  ENABLE_PRECOMPH=yes
30306fi
30307
30308
30309USE_PRECOMPILED_HEADER=1
30310if test "x$ENABLE_PRECOMPH" = xno; then
30311    USE_PRECOMPILED_HEADER=0
30312fi
30313
30314if test "x$ENABLE_PRECOMPH" = xyes; then
30315    # Check that the compiler actually supports precomp headers.
30316    if test "x$GCC" = xyes; then
30317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30318$as_echo_n "checking that precompiled headers work... " >&6; }
30319         echo "int alfa();" > conftest.h
30320         $CXX -x c++-header conftest.h -o conftest.hpp.gch
30321         if test ! -f conftest.hpp.gch; then
30322             echo Precompiled header is not working!
30323             USE_PRECOMPILED_HEADER=0
30324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30325$as_echo "no" >&6; }
30326         else
30327             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30328$as_echo "yes" >&6; }
30329         fi
30330         rm -f conftest.h
30331    fi
30332fi
30333
30334
30335
30336
30337# Setup use of ccache, if available
30338
30339    # Check whether --enable-ccache was given.
30340if test "${enable_ccache+set}" = set; then :
30341  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30342else
30343  ENABLE_CCACHE=yes
30344fi
30345
30346    if test "x$ENABLE_CCACHE" = xyes; then
30347        # Extract the first word of "ccache", so it can be a program name with args.
30348set dummy ccache; ac_word=$2
30349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30350$as_echo_n "checking for $ac_word... " >&6; }
30351if test "${ac_cv_path_CCACHE+set}" = set; then :
30352  $as_echo_n "(cached) " >&6
30353else
30354  case $CCACHE in
30355  [\\/]* | ?:[\\/]*)
30356  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30357  ;;
30358  *)
30359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30360for as_dir in $PATH
30361do
30362  IFS=$as_save_IFS
30363  test -z "$as_dir" && as_dir=.
30364    for ac_exec_ext in '' $ac_executable_extensions; do
30365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30366    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30368    break 2
30369  fi
30370done
30371  done
30372IFS=$as_save_IFS
30373
30374  ;;
30375esac
30376fi
30377CCACHE=$ac_cv_path_CCACHE
30378if test -n "$CCACHE"; then
30379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30380$as_echo "$CCACHE" >&6; }
30381else
30382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30383$as_echo "no" >&6; }
30384fi
30385
30386
30387    else
30388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30389$as_echo_n "checking for ccache... " >&6; }
30390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30391$as_echo "explicitly disabled" >&6; }
30392        CCACHE=
30393    fi
30394
30395
30396
30397# Check whether --with-ccache-dir was given.
30398if test "${with_ccache_dir+set}" = set; then :
30399  withval=$with_ccache_dir;
30400fi
30401
30402
30403    if test "x$with_ccache_dir" != x; then
30404        # When using a non home ccache directory, assume the use is to share ccache files
30405        # with other users. Thus change the umask.
30406        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30407    fi
30408    CCACHE_FOUND=""
30409    if test "x$CCACHE" != x; then
30410
30411    if test "x$CCACHE" != x; then
30412        CCACHE_FOUND="true"
30413        # Only use ccache if it is 3.1.4 or later, which supports
30414        # precompiled headers.
30415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30416$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30417        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30418        if test "x$HAS_GOOD_CCACHE" = x; then
30419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30420$as_echo "no, disabling ccache" >&6; }
30421            CCACHE=
30422        else
30423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30424$as_echo "yes" >&6; }
30425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30426$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30427            PUSHED_FLAGS="$CXXFLAGS"
30428            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30429            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30430/* end confdefs.h.  */
30431
30432int
30433main ()
30434{
30435
30436  ;
30437  return 0;
30438}
30439_ACEOF
30440if ac_fn_cxx_try_compile "$LINENO"; then :
30441  CC_KNOWS_CCACHE_TRICK=yes
30442else
30443  CC_KNOWS_CCACHE_TRICK=no
30444fi
30445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30446            CXXFLAGS="$PUSHED_FLAGS"
30447            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
30448                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30449$as_echo "yes" >&6; }
30450            else
30451                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
30452$as_echo "no, disabling ccaching of precompiled headers" >&6; }
30453                CCACHE=
30454            fi
30455        fi
30456    fi
30457
30458    if test "x$CCACHE" != x; then
30459        CCACHE_SLOPPINESS=time_macros
30460        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
30461        CCACHE_FLAGS=-fpch-preprocess
30462
30463        if test "x$SET_CCACHE_DIR" != x; then
30464            mkdir -p $CCACHE_DIR > /dev/null 2>&1
30465	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
30466        fi
30467    fi
30468
30469    fi
30470
30471
30472###############################################################################
30473#
30474# And now the finish...
30475#
30476###############################################################################
30477
30478# Check for some common pitfalls
30479
30480
30481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
30482$as_echo_n "checking if build directory is on local disk... " >&6; }
30483
30484	# df -l lists only local disks; if the given directory is not found then
30485	# a non-zero exit code is given
30486  if test "x$DF" = x; then
30487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30488      # msys does not have df; use Windows "net use" instead.
30489      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
30490      if test "x$IS_NETWORK_DISK" = x; then
30491        OUTPUT_DIR_IS_LOCAL="yes"
30492      else
30493        OUTPUT_DIR_IS_LOCAL="no"
30494      fi
30495    else
30496      # No df here, say it's local
30497      OUTPUT_DIR_IS_LOCAL="yes"
30498    fi
30499  else
30500    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
30501      OUTPUT_DIR_IS_LOCAL="yes"
30502    else
30503      OUTPUT_DIR_IS_LOCAL="no"
30504    fi
30505  fi
30506
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
30508$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
30509
30510# Check if the user has any old-style ALT_ variables set.
30511FOUND_ALT_VARIABLES=`env | grep ^ALT_`
30512
30513# Before generating output files, test if they exist. If they do, this is a reconfigure.
30514# Since we can't properly handle the dependencies for this, warn the user about the situation
30515if test -e $OUTPUT_ROOT/spec.gmk; then
30516  IS_RECONFIGURE=yes
30517else
30518  IS_RECONFIGURE=no
30519fi
30520
30521if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
30522  HIDE_PERFORMANCE_HINTS=yes
30523else
30524  HIDE_PERFORMANCE_HINTS=no
30525  # Hide it the next time around...
30526  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
30527fi
30528
30529
30530
30531# At the end, call the custom hook. (Dummy macro if no custom sources available)
30532
30533
30534# We're messing a bit with internal autoconf variables to put the config.status
30535# in the output directory instead of the current directory.
30536CONFIG_STATUS="$OUTPUT_ROOT/config.status"
30537# Create the actual output files. Now the main work of configure is done.
30538cat >confcache <<\_ACEOF
30539# This file is a shell script that caches the results of configure
30540# tests run on this system so they can be shared between configure
30541# scripts and configure runs, see configure's option --config-cache.
30542# It is not useful on other systems.  If it contains results you don't
30543# want to keep, you may remove or edit it.
30544#
30545# config.status only pays attention to the cache file if you give it
30546# the --recheck option to rerun configure.
30547#
30548# `ac_cv_env_foo' variables (set or unset) will be overridden when
30549# loading this file, other *unset* `ac_cv_foo' will be assigned the
30550# following values.
30551
30552_ACEOF
30553
30554# The following way of writing the cache mishandles newlines in values,
30555# but we know of no workaround that is simple, portable, and efficient.
30556# So, we kill variables containing newlines.
30557# Ultrix sh set writes to stderr and can't be redirected directly,
30558# and sets the high bit in the cache file unless we assign to the vars.
30559(
30560  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30561    eval ac_val=\$$ac_var
30562    case $ac_val in #(
30563    *${as_nl}*)
30564      case $ac_var in #(
30565      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30566$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30567      esac
30568      case $ac_var in #(
30569      _ | IFS | as_nl) ;; #(
30570      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30571      *) { eval $ac_var=; unset $ac_var;} ;;
30572      esac ;;
30573    esac
30574  done
30575
30576  (set) 2>&1 |
30577    case $as_nl`(ac_space=' '; set) 2>&1` in #(
30578    *${as_nl}ac_space=\ *)
30579      # `set' does not quote correctly, so add quotes: double-quote
30580      # substitution turns \\\\ into \\, and sed turns \\ into \.
30581      sed -n \
30582	"s/'/'\\\\''/g;
30583	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30584      ;; #(
30585    *)
30586      # `set' quotes correctly as required by POSIX, so do not add quotes.
30587      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30588      ;;
30589    esac |
30590    sort
30591) |
30592  sed '
30593     /^ac_cv_env_/b end
30594     t clear
30595     :clear
30596     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30597     t end
30598     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30599     :end' >>confcache
30600if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30601  if test -w "$cache_file"; then
30602    test "x$cache_file" != "x/dev/null" &&
30603      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30604$as_echo "$as_me: updating cache $cache_file" >&6;}
30605    cat confcache >$cache_file
30606  else
30607    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30608$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30609  fi
30610fi
30611rm -f confcache
30612
30613test "x$prefix" = xNONE && prefix=$ac_default_prefix
30614# Let make expand exec_prefix.
30615test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30616
30617DEFS=-DHAVE_CONFIG_H
30618
30619ac_libobjs=
30620ac_ltlibobjs=
30621U=
30622for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30623  # 1. Remove the extension, and $U if already installed.
30624  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30625  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30626  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30627  #    will be set to the directory where LIBOBJS objects are built.
30628  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30629  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30630done
30631LIBOBJS=$ac_libobjs
30632
30633LTLIBOBJS=$ac_ltlibobjs
30634
30635
30636
30637: ${CONFIG_STATUS=./config.status}
30638ac_write_fail=0
30639ac_clean_files_save=$ac_clean_files
30640ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30641{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30642$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30643as_write_fail=0
30644cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30645#! $SHELL
30646# Generated by $as_me.
30647# Run this file to recreate the current configuration.
30648# Compiler output produced by configure, useful for debugging
30649# configure, is in config.log if it exists.
30650
30651debug=false
30652ac_cs_recheck=false
30653ac_cs_silent=false
30654
30655SHELL=\${CONFIG_SHELL-$SHELL}
30656export SHELL
30657_ASEOF
30658cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30659## -------------------- ##
30660## M4sh Initialization. ##
30661## -------------------- ##
30662
30663# Be more Bourne compatible
30664DUALCASE=1; export DUALCASE # for MKS sh
30665if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30666  emulate sh
30667  NULLCMD=:
30668  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30669  # is contrary to our usage.  Disable this feature.
30670  alias -g '${1+"$@"}'='"$@"'
30671  setopt NO_GLOB_SUBST
30672else
30673  case `(set -o) 2>/dev/null` in #(
30674  *posix*) :
30675    set -o posix ;; #(
30676  *) :
30677     ;;
30678esac
30679fi
30680
30681
30682as_nl='
30683'
30684export as_nl
30685# Printing a long string crashes Solaris 7 /usr/bin/printf.
30686as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30687as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30688as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30689# Prefer a ksh shell builtin over an external printf program on Solaris,
30690# but without wasting forks for bash or zsh.
30691if test -z "$BASH_VERSION$ZSH_VERSION" \
30692    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30693  as_echo='print -r --'
30694  as_echo_n='print -rn --'
30695elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30696  as_echo='printf %s\n'
30697  as_echo_n='printf %s'
30698else
30699  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30700    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30701    as_echo_n='/usr/ucb/echo -n'
30702  else
30703    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30704    as_echo_n_body='eval
30705      arg=$1;
30706      case $arg in #(
30707      *"$as_nl"*)
30708	expr "X$arg" : "X\\(.*\\)$as_nl";
30709	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30710      esac;
30711      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30712    '
30713    export as_echo_n_body
30714    as_echo_n='sh -c $as_echo_n_body as_echo'
30715  fi
30716  export as_echo_body
30717  as_echo='sh -c $as_echo_body as_echo'
30718fi
30719
30720# The user is always right.
30721if test "${PATH_SEPARATOR+set}" != set; then
30722  PATH_SEPARATOR=:
30723  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30724    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30725      PATH_SEPARATOR=';'
30726  }
30727fi
30728
30729
30730# IFS
30731# We need space, tab and new line, in precisely that order.  Quoting is
30732# there to prevent editors from complaining about space-tab.
30733# (If _AS_PATH_WALK were called with IFS unset, it would disable word
30734# splitting by setting IFS to empty value.)
30735IFS=" ""	$as_nl"
30736
30737# Find who we are.  Look in the path if we contain no directory separator.
30738case $0 in #((
30739  *[\\/]* ) as_myself=$0 ;;
30740  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30741for as_dir in $PATH
30742do
30743  IFS=$as_save_IFS
30744  test -z "$as_dir" && as_dir=.
30745    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30746  done
30747IFS=$as_save_IFS
30748
30749     ;;
30750esac
30751# We did not find ourselves, most probably we were run as `sh COMMAND'
30752# in which case we are not to be found in the path.
30753if test "x$as_myself" = x; then
30754  as_myself=$0
30755fi
30756if test ! -f "$as_myself"; then
30757  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30758  exit 1
30759fi
30760
30761# Unset variables that we do not need and which cause bugs (e.g. in
30762# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30763# suppresses any "Segmentation fault" message there.  '((' could
30764# trigger a bug in pdksh 5.2.14.
30765for as_var in BASH_ENV ENV MAIL MAILPATH
30766do eval test x\${$as_var+set} = xset \
30767  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30768done
30769PS1='$ '
30770PS2='> '
30771PS4='+ '
30772
30773# NLS nuisances.
30774LC_ALL=C
30775export LC_ALL
30776LANGUAGE=C
30777export LANGUAGE
30778
30779# CDPATH.
30780(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30781
30782
30783# as_fn_error STATUS ERROR [LINENO LOG_FD]
30784# ----------------------------------------
30785# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30786# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30787# script with STATUS, using 1 if that was 0.
30788as_fn_error ()
30789{
30790  as_status=$1; test $as_status -eq 0 && as_status=1
30791  if test "$4"; then
30792    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30793    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30794  fi
30795  $as_echo "$as_me: error: $2" >&2
30796  as_fn_exit $as_status
30797} # as_fn_error
30798
30799
30800# as_fn_set_status STATUS
30801# -----------------------
30802# Set $? to STATUS, without forking.
30803as_fn_set_status ()
30804{
30805  return $1
30806} # as_fn_set_status
30807
30808# as_fn_exit STATUS
30809# -----------------
30810# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30811as_fn_exit ()
30812{
30813  set +e
30814  as_fn_set_status $1
30815  exit $1
30816} # as_fn_exit
30817
30818# as_fn_unset VAR
30819# ---------------
30820# Portably unset VAR.
30821as_fn_unset ()
30822{
30823  { eval $1=; unset $1;}
30824}
30825as_unset=as_fn_unset
30826# as_fn_append VAR VALUE
30827# ----------------------
30828# Append the text in VALUE to the end of the definition contained in VAR. Take
30829# advantage of any shell optimizations that allow amortized linear growth over
30830# repeated appends, instead of the typical quadratic growth present in naive
30831# implementations.
30832if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30833  eval 'as_fn_append ()
30834  {
30835    eval $1+=\$2
30836  }'
30837else
30838  as_fn_append ()
30839  {
30840    eval $1=\$$1\$2
30841  }
30842fi # as_fn_append
30843
30844# as_fn_arith ARG...
30845# ------------------
30846# Perform arithmetic evaluation on the ARGs, and store the result in the
30847# global $as_val. Take advantage of shells that can avoid forks. The arguments
30848# must be portable across $(()) and expr.
30849if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30850  eval 'as_fn_arith ()
30851  {
30852    as_val=$(( $* ))
30853  }'
30854else
30855  as_fn_arith ()
30856  {
30857    as_val=`expr "$@" || test $? -eq 1`
30858  }
30859fi # as_fn_arith
30860
30861
30862if expr a : '\(a\)' >/dev/null 2>&1 &&
30863   test "X`expr 00001 : '.*\(...\)'`" = X001; then
30864  as_expr=expr
30865else
30866  as_expr=false
30867fi
30868
30869if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30870  as_basename=basename
30871else
30872  as_basename=false
30873fi
30874
30875if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30876  as_dirname=dirname
30877else
30878  as_dirname=false
30879fi
30880
30881as_me=`$as_basename -- "$0" ||
30882$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30883	 X"$0" : 'X\(//\)$' \| \
30884	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30885$as_echo X/"$0" |
30886    sed '/^.*\/\([^/][^/]*\)\/*$/{
30887	    s//\1/
30888	    q
30889	  }
30890	  /^X\/\(\/\/\)$/{
30891	    s//\1/
30892	    q
30893	  }
30894	  /^X\/\(\/\).*/{
30895	    s//\1/
30896	    q
30897	  }
30898	  s/.*/./; q'`
30899
30900# Avoid depending upon Character Ranges.
30901as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30902as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30903as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30904as_cr_digits='0123456789'
30905as_cr_alnum=$as_cr_Letters$as_cr_digits
30906
30907ECHO_C= ECHO_N= ECHO_T=
30908case `echo -n x` in #(((((
30909-n*)
30910  case `echo 'xy\c'` in
30911  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
30912  xy)  ECHO_C='\c';;
30913  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30914       ECHO_T='	';;
30915  esac;;
30916*)
30917  ECHO_N='-n';;
30918esac
30919
30920rm -f conf$$ conf$$.exe conf$$.file
30921if test -d conf$$.dir; then
30922  rm -f conf$$.dir/conf$$.file
30923else
30924  rm -f conf$$.dir
30925  mkdir conf$$.dir 2>/dev/null
30926fi
30927if (echo >conf$$.file) 2>/dev/null; then
30928  if ln -s conf$$.file conf$$ 2>/dev/null; then
30929    as_ln_s='ln -s'
30930    # ... but there are two gotchas:
30931    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30932    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30933    # In both cases, we have to default to `cp -p'.
30934    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30935      as_ln_s='cp -p'
30936  elif ln conf$$.file conf$$ 2>/dev/null; then
30937    as_ln_s=ln
30938  else
30939    as_ln_s='cp -p'
30940  fi
30941else
30942  as_ln_s='cp -p'
30943fi
30944rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30945rmdir conf$$.dir 2>/dev/null
30946
30947
30948# as_fn_mkdir_p
30949# -------------
30950# Create "$as_dir" as a directory, including parents if necessary.
30951as_fn_mkdir_p ()
30952{
30953
30954  case $as_dir in #(
30955  -*) as_dir=./$as_dir;;
30956  esac
30957  test -d "$as_dir" || eval $as_mkdir_p || {
30958    as_dirs=
30959    while :; do
30960      case $as_dir in #(
30961      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30962      *) as_qdir=$as_dir;;
30963      esac
30964      as_dirs="'$as_qdir' $as_dirs"
30965      as_dir=`$as_dirname -- "$as_dir" ||
30966$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30967	 X"$as_dir" : 'X\(//\)[^/]' \| \
30968	 X"$as_dir" : 'X\(//\)$' \| \
30969	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30970$as_echo X"$as_dir" |
30971    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30972	    s//\1/
30973	    q
30974	  }
30975	  /^X\(\/\/\)[^/].*/{
30976	    s//\1/
30977	    q
30978	  }
30979	  /^X\(\/\/\)$/{
30980	    s//\1/
30981	    q
30982	  }
30983	  /^X\(\/\).*/{
30984	    s//\1/
30985	    q
30986	  }
30987	  s/.*/./; q'`
30988      test -d "$as_dir" && break
30989    done
30990    test -z "$as_dirs" || eval "mkdir $as_dirs"
30991  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
30992
30993
30994} # as_fn_mkdir_p
30995if mkdir -p . 2>/dev/null; then
30996  as_mkdir_p='mkdir -p "$as_dir"'
30997else
30998  test -d ./-p && rmdir ./-p
30999  as_mkdir_p=false
31000fi
31001
31002if test -x / >/dev/null 2>&1; then
31003  as_test_x='test -x'
31004else
31005  if ls -dL / >/dev/null 2>&1; then
31006    as_ls_L_option=L
31007  else
31008    as_ls_L_option=
31009  fi
31010  as_test_x='
31011    eval sh -c '\''
31012      if test -d "$1"; then
31013	test -d "$1/.";
31014      else
31015	case $1 in #(
31016	-*)set "./$1";;
31017	esac;
31018	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31019	???[sx]*):;;*)false;;esac;fi
31020    '\'' sh
31021  '
31022fi
31023as_executable_p=$as_test_x
31024
31025# Sed expression to map a string onto a valid CPP name.
31026as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31027
31028# Sed expression to map a string onto a valid variable name.
31029as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31030
31031
31032exec 6>&1
31033## ----------------------------------- ##
31034## Main body of $CONFIG_STATUS script. ##
31035## ----------------------------------- ##
31036_ASEOF
31037test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31038
31039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31040# Save the log message, to keep $0 and so on meaningful, and to
31041# report actual input values of CONFIG_FILES etc. instead of their
31042# values after options handling.
31043ac_log="
31044This file was extended by OpenJDK $as_me jdk8, which was
31045generated by GNU Autoconf 2.67.  Invocation command line was
31046
31047  CONFIG_FILES    = $CONFIG_FILES
31048  CONFIG_HEADERS  = $CONFIG_HEADERS
31049  CONFIG_LINKS    = $CONFIG_LINKS
31050  CONFIG_COMMANDS = $CONFIG_COMMANDS
31051  $ $0 $@
31052
31053on `(hostname || uname -n) 2>/dev/null | sed 1q`
31054"
31055
31056_ACEOF
31057
31058case $ac_config_files in *"
31059"*) set x $ac_config_files; shift; ac_config_files=$*;;
31060esac
31061
31062case $ac_config_headers in *"
31063"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31064esac
31065
31066
31067cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31068# Files that config.status was made for.
31069config_files="$ac_config_files"
31070config_headers="$ac_config_headers"
31071
31072_ACEOF
31073
31074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31075ac_cs_usage="\
31076\`$as_me' instantiates files and other configuration actions
31077from templates according to the current configuration.  Unless the files
31078and actions are specified as TAGs, all are instantiated by default.
31079
31080Usage: $0 [OPTION]... [TAG]...
31081
31082  -h, --help       print this help, then exit
31083  -V, --version    print version number and configuration settings, then exit
31084      --config     print configuration, then exit
31085  -q, --quiet, --silent
31086                   do not print progress messages
31087  -d, --debug      don't remove temporary files
31088      --recheck    update $as_me by reconfiguring in the same conditions
31089      --file=FILE[:TEMPLATE]
31090                   instantiate the configuration file FILE
31091      --header=FILE[:TEMPLATE]
31092                   instantiate the configuration header FILE
31093
31094Configuration files:
31095$config_files
31096
31097Configuration headers:
31098$config_headers
31099
31100Report bugs to <build-dev@openjdk.java.net>.
31101OpenJDK home page: <http://openjdk.java.net>."
31102
31103_ACEOF
31104cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31105ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31106ac_cs_version="\\
31107OpenJDK config.status jdk8
31108configured by $0, generated by GNU Autoconf 2.67,
31109  with options \\"\$ac_cs_config\\"
31110
31111Copyright (C) 2010 Free Software Foundation, Inc.
31112This config.status script is free software; the Free Software Foundation
31113gives unlimited permission to copy, distribute and modify it."
31114
31115ac_pwd='$ac_pwd'
31116srcdir='$srcdir'
31117AWK='$AWK'
31118test -n "\$AWK" || AWK=awk
31119_ACEOF
31120
31121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31122# The default lists apply if the user does not specify any file.
31123ac_need_defaults=:
31124while test $# != 0
31125do
31126  case $1 in
31127  --*=?*)
31128    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31129    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31130    ac_shift=:
31131    ;;
31132  --*=)
31133    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31134    ac_optarg=
31135    ac_shift=:
31136    ;;
31137  *)
31138    ac_option=$1
31139    ac_optarg=$2
31140    ac_shift=shift
31141    ;;
31142  esac
31143
31144  case $ac_option in
31145  # Handling of the options.
31146  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31147    ac_cs_recheck=: ;;
31148  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31149    $as_echo "$ac_cs_version"; exit ;;
31150  --config | --confi | --conf | --con | --co | --c )
31151    $as_echo "$ac_cs_config"; exit ;;
31152  --debug | --debu | --deb | --de | --d | -d )
31153    debug=: ;;
31154  --file | --fil | --fi | --f )
31155    $ac_shift
31156    case $ac_optarg in
31157    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31158    '') as_fn_error $? "missing file argument" ;;
31159    esac
31160    as_fn_append CONFIG_FILES " '$ac_optarg'"
31161    ac_need_defaults=false;;
31162  --header | --heade | --head | --hea )
31163    $ac_shift
31164    case $ac_optarg in
31165    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31166    esac
31167    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31168    ac_need_defaults=false;;
31169  --he | --h)
31170    # Conflict between --help and --header
31171    as_fn_error $? "ambiguous option: \`$1'
31172Try \`$0 --help' for more information.";;
31173  --help | --hel | -h )
31174    $as_echo "$ac_cs_usage"; exit ;;
31175  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31176  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31177    ac_cs_silent=: ;;
31178
31179  # This is an error.
31180  -*) as_fn_error $? "unrecognized option: \`$1'
31181Try \`$0 --help' for more information." ;;
31182
31183  *) as_fn_append ac_config_targets " $1"
31184     ac_need_defaults=false ;;
31185
31186  esac
31187  shift
31188done
31189
31190ac_configure_extra_args=
31191
31192if $ac_cs_silent; then
31193  exec 6>/dev/null
31194  ac_configure_extra_args="$ac_configure_extra_args --silent"
31195fi
31196
31197_ACEOF
31198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31199if \$ac_cs_recheck; then
31200  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31201  shift
31202  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31203  CONFIG_SHELL='$SHELL'
31204  export CONFIG_SHELL
31205  exec "\$@"
31206fi
31207
31208_ACEOF
31209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31210exec 5>>config.log
31211{
31212  echo
31213  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31214## Running $as_me. ##
31215_ASBOX
31216  $as_echo "$ac_log"
31217} >&5
31218
31219_ACEOF
31220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31221_ACEOF
31222
31223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31224
31225# Handling of arguments.
31226for ac_config_target in $ac_config_targets
31227do
31228  case $ac_config_target in
31229    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31230    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31231    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31232    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31233    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31234    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31235    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31236
31237  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31238  esac
31239done
31240
31241
31242# If the user did not use the arguments to specify the items to instantiate,
31243# then the envvar interface is used.  Set only those that are not.
31244# We use the long form for the default assignment because of an extremely
31245# bizarre bug on SunOS 4.1.3.
31246if $ac_need_defaults; then
31247  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31248  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31249fi
31250
31251# Have a temporary directory for convenience.  Make it in the build tree
31252# simply because there is no reason against having it here, and in addition,
31253# creating and moving files from /tmp can sometimes cause problems.
31254# Hook for its removal unless debugging.
31255# Note that there is a small window in which the directory will not be cleaned:
31256# after its creation but before its name has been assigned to `$tmp'.
31257$debug ||
31258{
31259  tmp=
31260  trap 'exit_status=$?
31261  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31262' 0
31263  trap 'as_fn_exit 1' 1 2 13 15
31264}
31265# Create a (secure) tmp directory for tmp files.
31266
31267{
31268  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31269  test -n "$tmp" && test -d "$tmp"
31270}  ||
31271{
31272  tmp=./conf$$-$RANDOM
31273  (umask 077 && mkdir "$tmp")
31274} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31275
31276# Set up the scripts for CONFIG_FILES section.
31277# No need to generate them if there are no CONFIG_FILES.
31278# This happens for instance with `./config.status config.h'.
31279if test -n "$CONFIG_FILES"; then
31280
31281
31282ac_cr=`echo X | tr X '\015'`
31283# On cygwin, bash can eat \r inside `` if the user requested igncr.
31284# But we know of no other shell where ac_cr would be empty at this
31285# point, so we can use a bashism as a fallback.
31286if test "x$ac_cr" = x; then
31287  eval ac_cr=\$\'\\r\'
31288fi
31289ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31290if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31291  ac_cs_awk_cr='\\r'
31292else
31293  ac_cs_awk_cr=$ac_cr
31294fi
31295
31296echo 'BEGIN {' >"$tmp/subs1.awk" &&
31297_ACEOF
31298
31299
31300{
31301  echo "cat >conf$$subs.awk <<_ACEOF" &&
31302  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31303  echo "_ACEOF"
31304} >conf$$subs.sh ||
31305  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31306ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31307ac_delim='%!_!# '
31308for ac_last_try in false false false false false :; do
31309  . ./conf$$subs.sh ||
31310    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31311
31312  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31313  if test $ac_delim_n = $ac_delim_num; then
31314    break
31315  elif $ac_last_try; then
31316    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31317  else
31318    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31319  fi
31320done
31321rm -f conf$$subs.sh
31322
31323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31324cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31325_ACEOF
31326sed -n '
31327h
31328s/^/S["/; s/!.*/"]=/
31329p
31330g
31331s/^[^!]*!//
31332:repl
31333t repl
31334s/'"$ac_delim"'$//
31335t delim
31336:nl
31337h
31338s/\(.\{148\}\)..*/\1/
31339t more1
31340s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31341p
31342n
31343b repl
31344:more1
31345s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31346p
31347g
31348s/.\{148\}//
31349t nl
31350:delim
31351h
31352s/\(.\{148\}\)..*/\1/
31353t more2
31354s/["\\]/\\&/g; s/^/"/; s/$/"/
31355p
31356b
31357:more2
31358s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31359p
31360g
31361s/.\{148\}//
31362t delim
31363' <conf$$subs.awk | sed '
31364/^[^""]/{
31365  N
31366  s/\n//
31367}
31368' >>$CONFIG_STATUS || ac_write_fail=1
31369rm -f conf$$subs.awk
31370cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31371_ACAWK
31372cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31373  for (key in S) S_is_set[key] = 1
31374  FS = ""
31375
31376}
31377{
31378  line = $ 0
31379  nfields = split(line, field, "@")
31380  substed = 0
31381  len = length(field[1])
31382  for (i = 2; i < nfields; i++) {
31383    key = field[i]
31384    keylen = length(key)
31385    if (S_is_set[key]) {
31386      value = S[key]
31387      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31388      len += length(value) + length(field[++i])
31389      substed = 1
31390    } else
31391      len += 1 + keylen
31392  }
31393
31394  print line
31395}
31396
31397_ACAWK
31398_ACEOF
31399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31400if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31401  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31402else
31403  cat
31404fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31405  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31406_ACEOF
31407
31408# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31409# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31410# trailing colons and then remove the whole line if VPATH becomes empty
31411# (actually we leave an empty line to preserve line numbers).
31412if test "x$srcdir" = x.; then
31413  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31414h
31415s///
31416s/^/:/
31417s/[	 ]*$/:/
31418s/:\$(srcdir):/:/g
31419s/:\${srcdir}:/:/g
31420s/:@srcdir@:/:/g
31421s/^:*//
31422s/:*$//
31423x
31424s/\(=[	 ]*\).*/\1/
31425G
31426s/\n//
31427s/^[^=]*=[	 ]*$//
31428}'
31429fi
31430
31431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31432fi # test -n "$CONFIG_FILES"
31433
31434# Set up the scripts for CONFIG_HEADERS section.
31435# No need to generate them if there are no CONFIG_HEADERS.
31436# This happens for instance with `./config.status Makefile'.
31437if test -n "$CONFIG_HEADERS"; then
31438cat >"$tmp/defines.awk" <<\_ACAWK ||
31439BEGIN {
31440_ACEOF
31441
31442# Transform confdefs.h into an awk script `defines.awk', embedded as
31443# here-document in config.status, that substitutes the proper values into
31444# config.h.in to produce config.h.
31445
31446# Create a delimiter string that does not exist in confdefs.h, to ease
31447# handling of long lines.
31448ac_delim='%!_!# '
31449for ac_last_try in false false :; do
31450  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31451  if test -z "$ac_t"; then
31452    break
31453  elif $ac_last_try; then
31454    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31455  else
31456    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31457  fi
31458done
31459
31460# For the awk script, D is an array of macro values keyed by name,
31461# likewise P contains macro parameters if any.  Preserve backslash
31462# newline sequences.
31463
31464ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31465sed -n '
31466s/.\{148\}/&'"$ac_delim"'/g
31467t rset
31468:rset
31469s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31470t def
31471d
31472:def
31473s/\\$//
31474t bsnl
31475s/["\\]/\\&/g
31476s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31477D["\1"]=" \3"/p
31478s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
31479d
31480:bsnl
31481s/["\\]/\\&/g
31482s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31483D["\1"]=" \3\\\\\\n"\\/p
31484t cont
31485s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31486t cont
31487d
31488:cont
31489n
31490s/.\{148\}/&'"$ac_delim"'/g
31491t clear
31492:clear
31493s/\\$//
31494t bsnlc
31495s/["\\]/\\&/g; s/^/"/; s/$/"/p
31496d
31497:bsnlc
31498s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31499b cont
31500' <confdefs.h | sed '
31501s/'"$ac_delim"'/"\\\
31502"/g' >>$CONFIG_STATUS || ac_write_fail=1
31503
31504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31505  for (key in D) D_is_set[key] = 1
31506  FS = ""
31507}
31508/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31509  line = \$ 0
31510  split(line, arg, " ")
31511  if (arg[1] == "#") {
31512    defundef = arg[2]
31513    mac1 = arg[3]
31514  } else {
31515    defundef = substr(arg[1], 2)
31516    mac1 = arg[2]
31517  }
31518  split(mac1, mac2, "(") #)
31519  macro = mac2[1]
31520  prefix = substr(line, 1, index(line, defundef) - 1)
31521  if (D_is_set[macro]) {
31522    # Preserve the white space surrounding the "#".
31523    print prefix "define", macro P[macro] D[macro]
31524    next
31525  } else {
31526    # Replace #undef with comments.  This is necessary, for example,
31527    # in the case of _POSIX_SOURCE, which is predefined and required
31528    # on some systems where configure will not decide to define it.
31529    if (defundef == "undef") {
31530      print "/*", prefix defundef, macro, "*/"
31531      next
31532    }
31533  }
31534}
31535{ print }
31536_ACAWK
31537_ACEOF
31538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31539  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31540fi # test -n "$CONFIG_HEADERS"
31541
31542
31543eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
31544shift
31545for ac_tag
31546do
31547  case $ac_tag in
31548  :[FHLC]) ac_mode=$ac_tag; continue;;
31549  esac
31550  case $ac_mode$ac_tag in
31551  :[FHL]*:*);;
31552  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
31553  :[FH]-) ac_tag=-:-;;
31554  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31555  esac
31556  ac_save_IFS=$IFS
31557  IFS=:
31558  set x $ac_tag
31559  IFS=$ac_save_IFS
31560  shift
31561  ac_file=$1
31562  shift
31563
31564  case $ac_mode in
31565  :L) ac_source=$1;;
31566  :[FH])
31567    ac_file_inputs=
31568    for ac_f
31569    do
31570      case $ac_f in
31571      -) ac_f="$tmp/stdin";;
31572      *) # Look for the file first in the build tree, then in the source tree
31573	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
31574	 # because $ac_f cannot contain `:'.
31575	 test -f "$ac_f" ||
31576	   case $ac_f in
31577	   [\\/$]*) false;;
31578	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31579	   esac ||
31580	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
31581      esac
31582      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31583      as_fn_append ac_file_inputs " '$ac_f'"
31584    done
31585
31586    # Let's still pretend it is `configure' which instantiates (i.e., don't
31587    # use $as_me), people would be surprised to read:
31588    #    /* config.h.  Generated by config.status.  */
31589    configure_input='Generated from '`
31590	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31591	`' by configure.'
31592    if test x"$ac_file" != x-; then
31593      configure_input="$ac_file.  $configure_input"
31594      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31595$as_echo "$as_me: creating $ac_file" >&6;}
31596    fi
31597    # Neutralize special characters interpreted by sed in replacement strings.
31598    case $configure_input in #(
31599    *\&* | *\|* | *\\* )
31600       ac_sed_conf_input=`$as_echo "$configure_input" |
31601       sed 's/[\\\\&|]/\\\\&/g'`;; #(
31602    *) ac_sed_conf_input=$configure_input;;
31603    esac
31604
31605    case $ac_tag in
31606    *:-:* | *:-) cat >"$tmp/stdin" \
31607      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
31608    esac
31609    ;;
31610  esac
31611
31612  ac_dir=`$as_dirname -- "$ac_file" ||
31613$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31614	 X"$ac_file" : 'X\(//\)[^/]' \| \
31615	 X"$ac_file" : 'X\(//\)$' \| \
31616	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31617$as_echo X"$ac_file" |
31618    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31619	    s//\1/
31620	    q
31621	  }
31622	  /^X\(\/\/\)[^/].*/{
31623	    s//\1/
31624	    q
31625	  }
31626	  /^X\(\/\/\)$/{
31627	    s//\1/
31628	    q
31629	  }
31630	  /^X\(\/\).*/{
31631	    s//\1/
31632	    q
31633	  }
31634	  s/.*/./; q'`
31635  as_dir="$ac_dir"; as_fn_mkdir_p
31636  ac_builddir=.
31637
31638case "$ac_dir" in
31639.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31640*)
31641  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31642  # A ".." for each directory in $ac_dir_suffix.
31643  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31644  case $ac_top_builddir_sub in
31645  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31646  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31647  esac ;;
31648esac
31649ac_abs_top_builddir=$ac_pwd
31650ac_abs_builddir=$ac_pwd$ac_dir_suffix
31651# for backward compatibility:
31652ac_top_builddir=$ac_top_build_prefix
31653
31654case $srcdir in
31655  .)  # We are building in place.
31656    ac_srcdir=.
31657    ac_top_srcdir=$ac_top_builddir_sub
31658    ac_abs_top_srcdir=$ac_pwd ;;
31659  [\\/]* | ?:[\\/]* )  # Absolute name.
31660    ac_srcdir=$srcdir$ac_dir_suffix;
31661    ac_top_srcdir=$srcdir
31662    ac_abs_top_srcdir=$srcdir ;;
31663  *) # Relative name.
31664    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31665    ac_top_srcdir=$ac_top_build_prefix$srcdir
31666    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31667esac
31668ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31669
31670
31671  case $ac_mode in
31672  :F)
31673  #
31674  # CONFIG_FILE
31675  #
31676
31677_ACEOF
31678
31679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31680# If the template does not know about datarootdir, expand it.
31681# FIXME: This hack should be removed a few years after 2.60.
31682ac_datarootdir_hack=; ac_datarootdir_seen=
31683ac_sed_dataroot='
31684/datarootdir/ {
31685  p
31686  q
31687}
31688/@datadir@/p
31689/@docdir@/p
31690/@infodir@/p
31691/@localedir@/p
31692/@mandir@/p'
31693case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31694*datarootdir*) ac_datarootdir_seen=yes;;
31695*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31696  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31697$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31698_ACEOF
31699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31700  ac_datarootdir_hack='
31701  s&@datadir@&$datadir&g
31702  s&@docdir@&$docdir&g
31703  s&@infodir@&$infodir&g
31704  s&@localedir@&$localedir&g
31705  s&@mandir@&$mandir&g
31706  s&\\\${datarootdir}&$datarootdir&g' ;;
31707esac
31708_ACEOF
31709
31710# Neutralize VPATH when `$srcdir' = `.'.
31711# Shell code in configure.ac might set extrasub.
31712# FIXME: do we really want to maintain this feature?
31713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31714ac_sed_extra="$ac_vpsub
31715$extrasub
31716_ACEOF
31717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31718:t
31719/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31720s|@configure_input@|$ac_sed_conf_input|;t t
31721s&@top_builddir@&$ac_top_builddir_sub&;t t
31722s&@top_build_prefix@&$ac_top_build_prefix&;t t
31723s&@srcdir@&$ac_srcdir&;t t
31724s&@abs_srcdir@&$ac_abs_srcdir&;t t
31725s&@top_srcdir@&$ac_top_srcdir&;t t
31726s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31727s&@builddir@&$ac_builddir&;t t
31728s&@abs_builddir@&$ac_abs_builddir&;t t
31729s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31730$ac_datarootdir_hack
31731"
31732eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
31733  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31734
31735test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31736  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
31737  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
31738  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31739which seems to be undefined.  Please make sure it is defined" >&5
31740$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31741which seems to be undefined.  Please make sure it is defined" >&2;}
31742
31743  rm -f "$tmp/stdin"
31744  case $ac_file in
31745  -) cat "$tmp/out" && rm -f "$tmp/out";;
31746  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
31747  esac \
31748  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31749 ;;
31750  :H)
31751  #
31752  # CONFIG_HEADER
31753  #
31754  if test x"$ac_file" != x-; then
31755    {
31756      $as_echo "/* $configure_input  */" \
31757      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
31758    } >"$tmp/config.h" \
31759      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31760    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31762$as_echo "$as_me: $ac_file is unchanged" >&6;}
31763    else
31764      rm -f "$ac_file"
31765      mv "$tmp/config.h" "$ac_file" \
31766	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
31767    fi
31768  else
31769    $as_echo "/* $configure_input  */" \
31770      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31771      || as_fn_error $? "could not create -" "$LINENO" 5
31772  fi
31773 ;;
31774
31775
31776  esac
31777
31778done # for ac_tag
31779
31780
31781as_fn_exit 0
31782_ACEOF
31783ac_clean_files=$ac_clean_files_save
31784
31785test $ac_write_fail = 0 ||
31786  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
31787
31788
31789# configure is writing to config.log, and then calls config.status.
31790# config.status does its own redirection, appending to config.log.
31791# Unfortunately, on DOS this fails, as config.log is still kept open
31792# by configure, so config.status won't be able to write to it; its
31793# output is simply discarded.  So we exec the FD to /dev/null,
31794# effectively closing config.log, so it can be properly (re)opened and
31795# appended to by config.status.  When coming back to configure, we
31796# need to make the FD available again.
31797if test "$no_create" != yes; then
31798  ac_cs_success=:
31799  ac_config_status_args=
31800  test "$silent" = yes &&
31801    ac_config_status_args="$ac_config_status_args --quiet"
31802  exec 5>/dev/null
31803  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31804  exec 5>>config.log
31805  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31806  # would make configure fail if this is the last instruction.
31807  $ac_cs_success || as_fn_exit 1
31808fi
31809if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31810  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31811$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31812fi
31813
31814
31815# Make the compare script executable
31816$CHMOD +x $OUTPUT_ROOT/compare.sh
31817
31818# Finally output some useful information to the user
31819
31820# Finally output some useful information to the user
31821
31822if test "x$CCACHE_FOUND" != x; then
31823	if  test "x$HAS_GOOD_CCACHE" = x; then
31824		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
31825		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
31826	else
31827		CCACHE_STATUS="installed and in use"
31828	fi
31829else
31830	if test "x$GCC" = xyes; then
31831		CCACHE_STATUS="not installed (consider installing)"
31832		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
31833	else
31834		CCACHE_STATUS="not available for your system"
31835	fi
31836fi
31837
31838printf "\n"
31839printf "====================================================\n"
31840printf "A new configuration has been successfully created in\n"
31841printf "$OUTPUT_ROOT\n"
31842if test "x$CONFIGURE_COMMAND_LINE" != x; then
31843	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
31844else
31845	printf "using default settings.\n"
31846fi
31847
31848printf "\n"
31849printf "Configuration summary:\n"
31850printf "* Debug level:    $DEBUG_LEVEL\n"
31851printf "* JDK variant:    $JDK_VARIANT\n"
31852printf "* JVM variants:   $with_jvm_variants\n"
31853printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
31854
31855printf "\n"
31856printf "Tools summary:\n"
31857if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
31858  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
31859fi
31860printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
31861printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
31862printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
31863
31864printf "\n"
31865printf "Build performance summary:\n"
31866printf "* Cores to use:   $NUM_CORES\n"
31867printf "* Memory limit:   $MEMORY_SIZE MB\n"
31868printf "* ccache status:  $CCACHE_STATUS\n"
31869printf "\n"
31870
31871if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
31872	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
31873	printf "$CCACHE_HELP_MSG\n"
31874
31875    # Print a helpful message on how to acquire the necessary build dependency.
31876    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
31877    MISSING_DEPENDENCY=ccache
31878    PKGHANDLER_COMMAND=
31879
31880    case $PKGHANDLER in
31881	apt-get)
31882                apt_help     $MISSING_DEPENDENCY ;;
31883    yum)
31884                yum_help     $MISSING_DEPENDENCY ;;
31885	port)
31886                port_help    $MISSING_DEPENDENCY ;;
31887	pkgutil)
31888                pkgutil_help $MISSING_DEPENDENCY ;;
31889	pkgadd)
31890                pkgadd_help  $MISSING_DEPENDENCY ;;
31891    * )
31892      break ;;
31893    esac
31894
31895    if test "x$PKGHANDLER_COMMAND" != x; then
31896        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31897    fi
31898
31899	printf "$HELP_MSG\n"
31900	printf "\n"
31901fi
31902
31903if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
31904	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
31905	printf "will result in longer build times.\n"
31906	printf "\n"
31907fi
31908
31909if test "x$FOUND_ALT_VARIABLES" != "x"; then
31910	printf "WARNING: You have old-style ALT_ environment variables set.\n"
31911	printf "These are not respected, and will be ignored. It is recommended\n"
31912	printf "that you clean your environment. The following variables are set:\n"
31913	printf "$FOUND_ALT_VARIABLES\n"
31914	printf "\n"
31915fi
31916
31917if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
31918	printf "WARNING: Your build output directory is not on a local disk.\n"
31919	printf "This will severely degrade build performance!\n"
31920	printf "It is recommended that you create an output directory on a local disk,\n"
31921	printf "and run the configure script again from that directory.\n"
31922	printf "\n"
31923fi
31924
31925if test "x$IS_RECONFIGURE" = "xyes"; then
31926	printf "WARNING: The result of this configuration has overridden an older\n"
31927	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
31928	printf "proper build. Failure to do so might result in strange build problems.\n"
31929	printf "\n"
31930fi
31931
31932