generated-configure.sh revision 753:dd3b314f4471
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_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684JT_HOME
685JTREGEXE
686LIPO
687ac_ct_OBJDUMP
688OBJDUMP
689ac_ct_OBJCOPY
690OBJCOPY
691MCS
692STRIP
693GNM
694NM
695AS
696CXXCPP
697CPP
698COMPILER_TYPE
699RC_FLAGS
700DUMPBIN
701WINAR
702HOTSPOT_RC
703HOTSPOT_MT
704RC
705MT
706WINLD
707HOTSPOT_LD
708HOTSPOT_CXX
709ARFLAGS
710AR
711LDEXECXX
712LDCXX
713LDEXE
714LD
715ac_ct_OBJC
716OBJCFLAGS
717OBJC
718ac_ct_CXX
719CXXFLAGS
720CXX
721ac_ct_PROPER_COMPILER_CXX
722PROPER_COMPILER_CXX
723POTENTIAL_CXX
724TOOLS_DIR_CXX
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732ac_ct_PROPER_COMPILER_CC
733PROPER_COMPILER_CC
734POTENTIAL_CC
735TOOLS_DIR_CC
736BUILD_LD
737BUILD_CXX
738BUILD_CC
739MSVCR_DLL
740DXSDK_INCLUDE_PATH
741DXSDK_LIB_PATH
742VS_PATH
743VS_LIB
744VS_INCLUDE
745CYGWIN_LINK
746AR_OUT_OPTION
747LD_OUT_OPTION
748EXE_OUT_OPTION
749CC_OUT_OPTION
750BUILD_HOTSPOT
751HOTSPOT_DIST
752BUILD_OUTPUT
753OVERRIDE_SRC_ROOT
754ADD_SRC_ROOT
755JDK_TOPDIR
756NASHORN_TOPDIR
757HOTSPOT_TOPDIR
758JAXWS_TOPDIR
759JAXP_TOPDIR
760CORBA_TOPDIR
761LANGTOOLS_TOPDIR
762BOOT_JDK_JVMARGS
763JAVAC_FLAGS
764BOOT_JDK_SOURCETARGET
765BOOT_JDK
766BOOT_TOOLSJAR
767BOOT_RTJAR
768JAVA_CHECK
769JAVAC_CHECK
770COOKED_BUILD_NUMBER
771JDK_VERSION
772COPYRIGHT_YEAR
773MACOSX_BUNDLE_ID_BASE
774MACOSX_BUNDLE_NAME_BASE
775COMPANY_NAME
776JDK_RC_PLATFORM_NAME
777PRODUCT_SUFFIX
778PRODUCT_NAME
779LAUNCHER_NAME
780MILESTONE
781JDK_BUILD_NUMBER
782JDK_UPDATE_VERSION
783JDK_MICRO_VERSION
784JDK_MINOR_VERSION
785JDK_MAJOR_VERSION
786USER_RELEASE_SUFFIX
787COMPRESS_JARS
788UNLIMITED_CRYPTO
789CACERTS_FILE
790TEST_IN_BUILD
791BUILD_HEADLESS
792SUPPORT_HEADFUL
793SUPPORT_HEADLESS
794BDEPS_FTP
795BDEPS_UNZIP
796OS_VERSION_MICRO
797OS_VERSION_MINOR
798OS_VERSION_MAJOR
799PKG_CONFIG
800CODESIGN
801XATTR
802IS_GNU_TIME
803TIME
804STAT
805HG
806READELF
807OTOOL
808LDD
809ZIP
810UNZIP
811FIND_DELETE
812MAKE
813CHECK_TOOLSDIR_MAKE
814CHECK_TOOLSDIR_GMAKE
815CHECK_MAKE
816CHECK_GMAKE
817PKGHANDLER
818OUTPUT_ROOT
819CONF_NAME
820SPEC
821BUILD_VARIANT_RELEASE
822DEBUG_CLASSFILES
823FASTDEBUG
824VARIANT
825DEBUG_LEVEL
826MACOSX_UNIVERSAL
827INCLUDE_SA
828JVM_VARIANT_ZEROSHARK
829JVM_VARIANT_ZERO
830JVM_VARIANT_KERNEL
831JVM_VARIANT_MINIMAL1
832JVM_VARIANT_CLIENT
833JVM_VARIANT_SERVER
834JVM_VARIANTS
835JDK_VARIANT
836SET_OPENJDK
837BUILD_LOG_WRAPPER
838BUILD_LOG_PREVIOUS
839BUILD_LOG
840SYS_ROOT
841PATH_SEP
842SRC_ROOT
843ZERO_ARCHDEF
844DEFINE_CROSS_COMPILE_ARCH
845LP64
846OPENJDK_TARGET_OS_API_DIR
847OPENJDK_TARGET_CPU_JLI_CFLAGS
848OPENJDK_TARGET_CPU_OSARCH
849OPENJDK_TARGET_CPU_ISADIR
850OPENJDK_TARGET_CPU_LIBDIR
851OPENJDK_TARGET_CPU_LEGACY_LIB
852OPENJDK_TARGET_CPU_LEGACY
853REQUIRED_OS_VERSION
854REQUIRED_OS_NAME
855COMPILE_TYPE
856OPENJDK_TARGET_CPU_ENDIAN
857OPENJDK_TARGET_CPU_BITS
858OPENJDK_TARGET_CPU_ARCH
859OPENJDK_TARGET_CPU
860OPENJDK_TARGET_OS_API
861OPENJDK_TARGET_OS
862OPENJDK_BUILD_CPU_ENDIAN
863OPENJDK_BUILD_CPU_BITS
864OPENJDK_BUILD_CPU_ARCH
865OPENJDK_BUILD_CPU
866OPENJDK_BUILD_OS_API
867OPENJDK_BUILD_OS
868OPENJDK_BUILD_AUTOCONF_NAME
869OPENJDK_TARGET_AUTOCONF_NAME
870target_os
871target_vendor
872target_cpu
873target
874host_os
875host_vendor
876host_cpu
877host
878build_os
879build_vendor
880build_cpu
881build
882SETFILE
883DF
884READLINK
885CYGPATH
886NAWK
887SED
888FGREP
889EGREP
890GREP
891AWK
892XARGS
893WHICH
894WC
895UNIQ
896UNAME
897TR
898TOUCH
899TEE
900TAR
901TAIL
902SORT
903SH
904RM
905PRINTF
906MV
907MKTEMP
908MKDIR
909LS
910LN
911HEAD
912FIND
913FILE
914EXPR
915ECHO
916DIRNAME
917DIFF
918DATE
919CUT
920CPIO
921CP
922COMM
923CMP
924CHMOD
925CAT
926BASH
927BASENAME
928DATE_WHEN_CONFIGURED
929CONFIGURE_COMMAND_LINE
930CUSTOM_MAKE_DIR
931target_alias
932host_alias
933build_alias
934LIBS
935ECHO_T
936ECHO_N
937ECHO_C
938DEFS
939mandir
940localedir
941libdir
942psdir
943pdfdir
944dvidir
945htmldir
946infodir
947docdir
948oldincludedir
949includedir
950localstatedir
951sharedstatedir
952sysconfdir
953datadir
954datarootdir
955libexecdir
956sbindir
957bindir
958program_transform_name
959prefix
960exec_prefix
961PACKAGE_URL
962PACKAGE_BUGREPORT
963PACKAGE_STRING
964PACKAGE_VERSION
965PACKAGE_TARNAME
966PACKAGE_NAME
967PATH_SEPARATOR
968SHELL'
969ac_subst_files=''
970ac_user_opts='
971enable_option_checking
972with_custom_make_dir
973with_target_bits
974with_sys_root
975with_tools_dir
976with_devkit
977enable_openjdk_only
978with_jdk_variant
979with_jvm_variants
980enable_debug
981with_debug_level
982with_conf_name
983with_builddeps_conf
984with_builddeps_server
985with_builddeps_dir
986with_builddeps_group
987enable_headful
988enable_hotspot_test_in_build
989with_cacerts_file
990enable_unlimited_crypto
991with_milestone
992with_update_version
993with_build_number
994with_user_release_suffix
995with_boot_jdk
996with_boot_jdk_jvmargs
997with_add_source_root
998with_override_source_root
999with_adds_and_overrides
1000with_override_langtools
1001with_override_corba
1002with_override_jaxp
1003with_override_jaxws
1004with_override_hotspot
1005with_override_jdk
1006with_import_hotspot
1007with_msvcr_dll
1008with_dxsdk
1009with_dxsdk_lib
1010with_dxsdk_include
1011with_jtreg
1012with_extra_cflags
1013with_extra_cxxflags
1014with_extra_ldflags
1015enable_debug_symbols
1016enable_zip_debug_info
1017enable_macosx_runtime_support
1018with_x
1019with_cups
1020with_cups_include
1021with_freetype
1022with_alsa
1023with_alsa_include
1024with_alsa_lib
1025with_giflib
1026with_zlib
1027with_stdc__lib
1028with_num_cores
1029with_memory_size
1030with_jobs
1031with_sjavac_server_java
1032enable_sjavac
1033enable_precompiled_headers
1034enable_ccache
1035with_ccache_dir
1036'
1037      ac_precious_vars='build_alias
1038host_alias
1039target_alias
1040PKG_CONFIG
1041CC
1042CFLAGS
1043LDFLAGS
1044LIBS
1045CPPFLAGS
1046CXX
1047CXXFLAGS
1048CCC
1049OBJC
1050OBJCFLAGS
1051CPP
1052CXXCPP
1053XMKMF
1054FREETYPE2_CFLAGS
1055FREETYPE2_LIBS
1056ALSA_CFLAGS
1057ALSA_LIBS
1058LIBFFI_CFLAGS
1059LIBFFI_LIBS'
1060
1061
1062# Initialize some variables set by options.
1063ac_init_help=
1064ac_init_version=false
1065ac_unrecognized_opts=
1066ac_unrecognized_sep=
1067# The variables have the same names as the options, with
1068# dashes changed to underlines.
1069cache_file=/dev/null
1070exec_prefix=NONE
1071no_create=
1072no_recursion=
1073prefix=NONE
1074program_prefix=NONE
1075program_suffix=NONE
1076program_transform_name=s,x,x,
1077silent=
1078site=
1079srcdir=
1080verbose=
1081x_includes=NONE
1082x_libraries=NONE
1083
1084# Installation directory options.
1085# These are left unexpanded so users can "make install exec_prefix=/foo"
1086# and all the variables that are supposed to be based on exec_prefix
1087# by default will actually change.
1088# Use braces instead of parens because sh, perl, etc. also accept them.
1089# (The list follows the same order as the GNU Coding Standards.)
1090bindir='${exec_prefix}/bin'
1091sbindir='${exec_prefix}/sbin'
1092libexecdir='${exec_prefix}/libexec'
1093datarootdir='${prefix}/share'
1094datadir='${datarootdir}'
1095sysconfdir='${prefix}/etc'
1096sharedstatedir='${prefix}/com'
1097localstatedir='${prefix}/var'
1098includedir='${prefix}/include'
1099oldincludedir='/usr/include'
1100docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1101infodir='${datarootdir}/info'
1102htmldir='${docdir}'
1103dvidir='${docdir}'
1104pdfdir='${docdir}'
1105psdir='${docdir}'
1106libdir='${exec_prefix}/lib'
1107localedir='${datarootdir}/locale'
1108mandir='${datarootdir}/man'
1109
1110ac_prev=
1111ac_dashdash=
1112for ac_option
1113do
1114  # If the previous option needs an argument, assign it.
1115  if test -n "$ac_prev"; then
1116    eval $ac_prev=\$ac_option
1117    ac_prev=
1118    continue
1119  fi
1120
1121  case $ac_option in
1122  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1123  *=)   ac_optarg= ;;
1124  *)    ac_optarg=yes ;;
1125  esac
1126
1127  # Accept the important Cygnus configure options, so we can diagnose typos.
1128
1129  case $ac_dashdash$ac_option in
1130  --)
1131    ac_dashdash=yes ;;
1132
1133  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1134    ac_prev=bindir ;;
1135  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1136    bindir=$ac_optarg ;;
1137
1138  -build | --build | --buil | --bui | --bu)
1139    ac_prev=build_alias ;;
1140  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1141    build_alias=$ac_optarg ;;
1142
1143  -cache-file | --cache-file | --cache-fil | --cache-fi \
1144  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1145    ac_prev=cache_file ;;
1146  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1147  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1148    cache_file=$ac_optarg ;;
1149
1150  --config-cache | -C)
1151    cache_file=config.cache ;;
1152
1153  -datadir | --datadir | --datadi | --datad)
1154    ac_prev=datadir ;;
1155  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1156    datadir=$ac_optarg ;;
1157
1158  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1159  | --dataroo | --dataro | --datar)
1160    ac_prev=datarootdir ;;
1161  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1162  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1163    datarootdir=$ac_optarg ;;
1164
1165  -disable-* | --disable-*)
1166    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1167    # Reject names that are not valid shell variable names.
1168    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1169      as_fn_error $? "invalid feature name: $ac_useropt"
1170    ac_useropt_orig=$ac_useropt
1171    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1172    case $ac_user_opts in
1173      *"
1174"enable_$ac_useropt"
1175"*) ;;
1176      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1177	 ac_unrecognized_sep=', ';;
1178    esac
1179    eval enable_$ac_useropt=no ;;
1180
1181  -docdir | --docdir | --docdi | --doc | --do)
1182    ac_prev=docdir ;;
1183  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1184    docdir=$ac_optarg ;;
1185
1186  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1187    ac_prev=dvidir ;;
1188  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1189    dvidir=$ac_optarg ;;
1190
1191  -enable-* | --enable-*)
1192    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1193    # Reject names that are not valid shell variable names.
1194    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1195      as_fn_error $? "invalid feature name: $ac_useropt"
1196    ac_useropt_orig=$ac_useropt
1197    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198    case $ac_user_opts in
1199      *"
1200"enable_$ac_useropt"
1201"*) ;;
1202      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1203	 ac_unrecognized_sep=', ';;
1204    esac
1205    eval enable_$ac_useropt=\$ac_optarg ;;
1206
1207  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1208  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1209  | --exec | --exe | --ex)
1210    ac_prev=exec_prefix ;;
1211  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1212  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1213  | --exec=* | --exe=* | --ex=*)
1214    exec_prefix=$ac_optarg ;;
1215
1216  -gas | --gas | --ga | --g)
1217    # Obsolete; use --with-gas.
1218    with_gas=yes ;;
1219
1220  -help | --help | --hel | --he | -h)
1221    ac_init_help=long ;;
1222  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1223    ac_init_help=recursive ;;
1224  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1225    ac_init_help=short ;;
1226
1227  -host | --host | --hos | --ho)
1228    ac_prev=host_alias ;;
1229  -host=* | --host=* | --hos=* | --ho=*)
1230    host_alias=$ac_optarg ;;
1231
1232  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1233    ac_prev=htmldir ;;
1234  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1235  | --ht=*)
1236    htmldir=$ac_optarg ;;
1237
1238  -includedir | --includedir | --includedi | --included | --include \
1239  | --includ | --inclu | --incl | --inc)
1240    ac_prev=includedir ;;
1241  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1242  | --includ=* | --inclu=* | --incl=* | --inc=*)
1243    includedir=$ac_optarg ;;
1244
1245  -infodir | --infodir | --infodi | --infod | --info | --inf)
1246    ac_prev=infodir ;;
1247  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1248    infodir=$ac_optarg ;;
1249
1250  -libdir | --libdir | --libdi | --libd)
1251    ac_prev=libdir ;;
1252  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1253    libdir=$ac_optarg ;;
1254
1255  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1256  | --libexe | --libex | --libe)
1257    ac_prev=libexecdir ;;
1258  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1259  | --libexe=* | --libex=* | --libe=*)
1260    libexecdir=$ac_optarg ;;
1261
1262  -localedir | --localedir | --localedi | --localed | --locale)
1263    ac_prev=localedir ;;
1264  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1265    localedir=$ac_optarg ;;
1266
1267  -localstatedir | --localstatedir | --localstatedi | --localstated \
1268  | --localstate | --localstat | --localsta | --localst | --locals)
1269    ac_prev=localstatedir ;;
1270  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1271  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1272    localstatedir=$ac_optarg ;;
1273
1274  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1275    ac_prev=mandir ;;
1276  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1277    mandir=$ac_optarg ;;
1278
1279  -nfp | --nfp | --nf)
1280    # Obsolete; use --without-fp.
1281    with_fp=no ;;
1282
1283  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1284  | --no-cr | --no-c | -n)
1285    no_create=yes ;;
1286
1287  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1288  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1289    no_recursion=yes ;;
1290
1291  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1292  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1293  | --oldin | --oldi | --old | --ol | --o)
1294    ac_prev=oldincludedir ;;
1295  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1296  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1297  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1298    oldincludedir=$ac_optarg ;;
1299
1300  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1301    ac_prev=prefix ;;
1302  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1303    prefix=$ac_optarg ;;
1304
1305  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1306  | --program-pre | --program-pr | --program-p)
1307    ac_prev=program_prefix ;;
1308  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1309  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1310    program_prefix=$ac_optarg ;;
1311
1312  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1313  | --program-suf | --program-su | --program-s)
1314    ac_prev=program_suffix ;;
1315  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1316  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1317    program_suffix=$ac_optarg ;;
1318
1319  -program-transform-name | --program-transform-name \
1320  | --program-transform-nam | --program-transform-na \
1321  | --program-transform-n | --program-transform- \
1322  | --program-transform | --program-transfor \
1323  | --program-transfo | --program-transf \
1324  | --program-trans | --program-tran \
1325  | --progr-tra | --program-tr | --program-t)
1326    ac_prev=program_transform_name ;;
1327  -program-transform-name=* | --program-transform-name=* \
1328  | --program-transform-nam=* | --program-transform-na=* \
1329  | --program-transform-n=* | --program-transform-=* \
1330  | --program-transform=* | --program-transfor=* \
1331  | --program-transfo=* | --program-transf=* \
1332  | --program-trans=* | --program-tran=* \
1333  | --progr-tra=* | --program-tr=* | --program-t=*)
1334    program_transform_name=$ac_optarg ;;
1335
1336  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1337    ac_prev=pdfdir ;;
1338  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1339    pdfdir=$ac_optarg ;;
1340
1341  -psdir | --psdir | --psdi | --psd | --ps)
1342    ac_prev=psdir ;;
1343  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1344    psdir=$ac_optarg ;;
1345
1346  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1347  | -silent | --silent | --silen | --sile | --sil)
1348    silent=yes ;;
1349
1350  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1351    ac_prev=sbindir ;;
1352  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1353  | --sbi=* | --sb=*)
1354    sbindir=$ac_optarg ;;
1355
1356  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1357  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1358  | --sharedst | --shareds | --shared | --share | --shar \
1359  | --sha | --sh)
1360    ac_prev=sharedstatedir ;;
1361  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1362  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1363  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1364  | --sha=* | --sh=*)
1365    sharedstatedir=$ac_optarg ;;
1366
1367  -site | --site | --sit)
1368    ac_prev=site ;;
1369  -site=* | --site=* | --sit=*)
1370    site=$ac_optarg ;;
1371
1372  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1373    ac_prev=srcdir ;;
1374  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1375    srcdir=$ac_optarg ;;
1376
1377  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1378  | --syscon | --sysco | --sysc | --sys | --sy)
1379    ac_prev=sysconfdir ;;
1380  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1381  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1382    sysconfdir=$ac_optarg ;;
1383
1384  -target | --target | --targe | --targ | --tar | --ta | --t)
1385    ac_prev=target_alias ;;
1386  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1387    target_alias=$ac_optarg ;;
1388
1389  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1390    verbose=yes ;;
1391
1392  -version | --version | --versio | --versi | --vers | -V)
1393    ac_init_version=: ;;
1394
1395  -with-* | --with-*)
1396    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1397    # Reject names that are not valid shell variable names.
1398    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1399      as_fn_error $? "invalid package name: $ac_useropt"
1400    ac_useropt_orig=$ac_useropt
1401    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1402    case $ac_user_opts in
1403      *"
1404"with_$ac_useropt"
1405"*) ;;
1406      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1407	 ac_unrecognized_sep=', ';;
1408    esac
1409    eval with_$ac_useropt=\$ac_optarg ;;
1410
1411  -without-* | --without-*)
1412    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1413    # Reject names that are not valid shell variable names.
1414    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1415      as_fn_error $? "invalid package name: $ac_useropt"
1416    ac_useropt_orig=$ac_useropt
1417    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1418    case $ac_user_opts in
1419      *"
1420"with_$ac_useropt"
1421"*) ;;
1422      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1423	 ac_unrecognized_sep=', ';;
1424    esac
1425    eval with_$ac_useropt=no ;;
1426
1427  --x)
1428    # Obsolete; use --with-x.
1429    with_x=yes ;;
1430
1431  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1432  | --x-incl | --x-inc | --x-in | --x-i)
1433    ac_prev=x_includes ;;
1434  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1435  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1436    x_includes=$ac_optarg ;;
1437
1438  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1439  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1440    ac_prev=x_libraries ;;
1441  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1442  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1443    x_libraries=$ac_optarg ;;
1444
1445  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1446Try \`$0 --help' for more information"
1447    ;;
1448
1449  *=*)
1450    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1451    # Reject names that are not valid shell variable names.
1452    case $ac_envvar in #(
1453      '' | [0-9]* | *[!_$as_cr_alnum]* )
1454      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1455    esac
1456    eval $ac_envvar=\$ac_optarg
1457    export $ac_envvar ;;
1458
1459  *)
1460    # FIXME: should be removed in autoconf 3.0.
1461    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1462    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1463      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1464    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1465    ;;
1466
1467  esac
1468done
1469
1470if test -n "$ac_prev"; then
1471  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1472  as_fn_error $? "missing argument to $ac_option"
1473fi
1474
1475if test -n "$ac_unrecognized_opts"; then
1476  case $enable_option_checking in
1477    no) ;;
1478    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1479    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1480  esac
1481fi
1482
1483# Check all directory arguments for consistency.
1484for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1485		datadir sysconfdir sharedstatedir localstatedir includedir \
1486		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1487		libdir localedir mandir
1488do
1489  eval ac_val=\$$ac_var
1490  # Remove trailing slashes.
1491  case $ac_val in
1492    */ )
1493      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1494      eval $ac_var=\$ac_val;;
1495  esac
1496  # Be sure to have absolute directory names.
1497  case $ac_val in
1498    [\\/$]* | ?:[\\/]* )  continue;;
1499    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1500  esac
1501  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1502done
1503
1504# There might be people who depend on the old broken behavior: `$host'
1505# used to hold the argument of --host etc.
1506# FIXME: To remove some day.
1507build=$build_alias
1508host=$host_alias
1509target=$target_alias
1510
1511# FIXME: To remove some day.
1512if test "x$host_alias" != x; then
1513  if test "x$build_alias" = x; then
1514    cross_compiling=maybe
1515    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1516    If a cross compiler is detected then cross compile mode will be used" >&2
1517  elif test "x$build_alias" != "x$host_alias"; then
1518    cross_compiling=yes
1519  fi
1520fi
1521
1522ac_tool_prefix=
1523test -n "$host_alias" && ac_tool_prefix=$host_alias-
1524
1525test "$silent" = yes && exec 6>/dev/null
1526
1527
1528ac_pwd=`pwd` && test -n "$ac_pwd" &&
1529ac_ls_di=`ls -di .` &&
1530ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1531  as_fn_error $? "working directory cannot be determined"
1532test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1533  as_fn_error $? "pwd does not report name of working directory"
1534
1535
1536# Find the source files, if location was not specified.
1537if test -z "$srcdir"; then
1538  ac_srcdir_defaulted=yes
1539  # Try the directory containing this script, then the parent directory.
1540  ac_confdir=`$as_dirname -- "$as_myself" ||
1541$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1542	 X"$as_myself" : 'X\(//\)[^/]' \| \
1543	 X"$as_myself" : 'X\(//\)$' \| \
1544	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1545$as_echo X"$as_myself" |
1546    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1547	    s//\1/
1548	    q
1549	  }
1550	  /^X\(\/\/\)[^/].*/{
1551	    s//\1/
1552	    q
1553	  }
1554	  /^X\(\/\/\)$/{
1555	    s//\1/
1556	    q
1557	  }
1558	  /^X\(\/\).*/{
1559	    s//\1/
1560	    q
1561	  }
1562	  s/.*/./; q'`
1563  srcdir=$ac_confdir
1564  if test ! -r "$srcdir/$ac_unique_file"; then
1565    srcdir=..
1566  fi
1567else
1568  ac_srcdir_defaulted=no
1569fi
1570if test ! -r "$srcdir/$ac_unique_file"; then
1571  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1572  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1573fi
1574ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1575ac_abs_confdir=`(
1576	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1577	pwd)`
1578# When building in place, set srcdir=.
1579if test "$ac_abs_confdir" = "$ac_pwd"; then
1580  srcdir=.
1581fi
1582# Remove unnecessary trailing slashes from srcdir.
1583# Double slashes in file names in object file debugging info
1584# mess up M-x gdb in Emacs.
1585case $srcdir in
1586*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1587esac
1588for ac_var in $ac_precious_vars; do
1589  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1590  eval ac_env_${ac_var}_value=\$${ac_var}
1591  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1592  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1593done
1594
1595#
1596# Report the --help message.
1597#
1598if test "$ac_init_help" = "long"; then
1599  # Omit some internal or obsolete options to make the list less imposing.
1600  # This message is too long to be a string in the A/UX 3.1 sh.
1601  cat <<_ACEOF
1602\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1603
1604Usage: $0 [OPTION]... [VAR=VALUE]...
1605
1606To assign environment variables (e.g., CC, CFLAGS...), specify them as
1607VAR=VALUE.  See below for descriptions of some of the useful variables.
1608
1609Defaults for the options are specified in brackets.
1610
1611Configuration:
1612  -h, --help              display this help and exit
1613      --help=short        display options specific to this package
1614      --help=recursive    display the short help of all the included packages
1615  -V, --version           display version information and exit
1616  -q, --quiet, --silent   do not print \`checking ...' messages
1617      --cache-file=FILE   cache test results in FILE [disabled]
1618  -C, --config-cache      alias for \`--cache-file=config.cache'
1619  -n, --no-create         do not create output files
1620      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1621
1622Installation directories:
1623  --prefix=PREFIX         install architecture-independent files in PREFIX
1624                          [$ac_default_prefix]
1625  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1626                          [PREFIX]
1627
1628By default, \`make install' will install all the files in
1629\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1630an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1631for instance \`--prefix=\$HOME'.
1632
1633For better control, use the options below.
1634
1635Fine tuning of the installation directories:
1636  --bindir=DIR            user executables [EPREFIX/bin]
1637  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1638  --libexecdir=DIR        program executables [EPREFIX/libexec]
1639  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1640  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1641  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1642  --libdir=DIR            object code libraries [EPREFIX/lib]
1643  --includedir=DIR        C header files [PREFIX/include]
1644  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1645  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1646  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1647  --infodir=DIR           info documentation [DATAROOTDIR/info]
1648  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1649  --mandir=DIR            man documentation [DATAROOTDIR/man]
1650  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1651  --htmldir=DIR           html documentation [DOCDIR]
1652  --dvidir=DIR            dvi documentation [DOCDIR]
1653  --pdfdir=DIR            pdf documentation [DOCDIR]
1654  --psdir=DIR             ps documentation [DOCDIR]
1655_ACEOF
1656
1657  cat <<\_ACEOF
1658
1659X features:
1660  --x-includes=DIR    X include files are in DIR
1661  --x-libraries=DIR   X library files are in DIR
1662
1663System types:
1664  --build=BUILD     configure for building on BUILD [guessed]
1665  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1666  --target=TARGET   configure for building compilers for TARGET [HOST]
1667_ACEOF
1668fi
1669
1670if test -n "$ac_init_help"; then
1671  case $ac_init_help in
1672     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1673   esac
1674  cat <<\_ACEOF
1675
1676Optional Features:
1677  --disable-option-checking  ignore unrecognized --enable/--with options
1678  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1679  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1680  --enable-openjdk-only   suppress building custom source even if present
1681                          [disabled]
1682  --enable-debug          set the debug level to fastdebug (shorthand for
1683                          --with-debug-level=fastdebug) [disabled]
1684  --disable-headful       disable building headful support (graphical UI
1685                          support) [enabled]
1686  --enable-hotspot-test-in-build
1687                          run the Queens test after Hotspot build [disabled]
1688  --enable-unlimited-crypto
1689                          Enable unlimited crypto policy [disabled]
1690  --disable-debug-symbols disable generation of debug symbols [enabled]
1691  --disable-zip-debug-info
1692                          disable zipping of debug-info files [enabled]
1693  --disable-macosx-runtime-support
1694                          disable the use of MacOSX Java runtime support
1695                          framework [enabled]
1696  --enable-sjavac         use sjavac to do fast incremental compiles
1697                          [disabled]
1698  --disable-precompiled-headers
1699                          disable using precompiled headers when compiling C++
1700                          [enabled]
1701  --disable-ccache        disable using ccache to speed up recompilations
1702                          [enabled]
1703
1704Optional Packages:
1705  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1706  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1707  --with-custom-make-dir  use this directory for custom build/make files
1708  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1709                          support it), e.g. --with-target-bits=32 [guessed]
1710  --with-sys-root         pass this sys-root to the compilers and tools (for
1711                          cross-compiling)
1712  --with-tools-dir        search this directory for compilers and tools (for
1713                          cross-compiling)
1714  --with-devkit           use this directory as base for tools-dir and
1715                          sys-root (for cross-compiling)
1716  --with-jdk-variant      JDK variant to build (normal) [normal]
1717  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1718                          client, minimal1, kernel, zero, zeroshark) [server]
1719  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1720                          [release]
1721  --with-conf-name        use this as the name of the configuration [generated
1722                          from important configuration options]
1723  --with-builddeps-conf   use this configuration file for the builddeps
1724  --with-builddeps-server download and use build dependencies from this server
1725                          url
1726  --with-builddeps-dir    store downloaded build dependencies here
1727                          [/localhome/builddeps]
1728  --with-builddeps-group  chgrp the downloaded build dependencies to this
1729                          group
1730  --with-cacerts-file     specify alternative cacerts file
1731  --with-milestone        Set milestone value for build [internal]
1732  --with-update-version   Set update version value for build [b00]
1733  --with-build-number     Set build number value for build [b00]
1734  --with-user-release-suffix
1735                          Add a custom string to the version string if build
1736                          number isn't set.[username_builddateb00]
1737  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1738  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1739                          invocations of the Boot JDK, overriding the default
1740                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1741                          -enableassertions"
1742  --with-add-source-root  for each and every source directory, look in this
1743                          additional source root for the same directory; if it
1744                          exists and have files in it, include it in the build
1745  --with-override-source-root
1746                          for each and every source directory, look in this
1747                          override source root for the same directory; if it
1748                          exists, use that directory instead and ignore the
1749                          directory in the original source root
1750  --with-adds-and-overrides
1751                          use the subdirs 'adds' and 'overrides' in the
1752                          specified directory as add-source-root and
1753                          override-source-root
1754  --with-override-langtools
1755                          use this langtools dir for the build
1756  --with-override-corba   use this corba dir for the build
1757  --with-override-jaxp    use this jaxp dir for the build
1758  --with-override-jaxws   use this jaxws dir for the build
1759  --with-override-hotspot use this hotspot dir for the build
1760  --with-override-jdk     use this jdk dir for the build
1761  --with-import-hotspot   import hotspot binaries from this jdk image or
1762                          hotspot build dist dir instead of building from
1763                          source
1764  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1765                          only) [probed]
1766  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1767  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1768                          [probed]
1769  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1770                          [probed]
1771  --with-jtreg            Regression Test Harness [probed]
1772  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1773  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1774  --with-extra-ldflags    extra flags to be used when linking jdk
1775  --with-x                use the X Window System
1776  --with-cups             specify prefix directory for the cups package
1777                          (expecting the headers under PATH/include)
1778  --with-cups-include     specify directory for the cups include files
1779  --with-freetype         specify prefix directory for the freetype2 package
1780                          (expecting the libraries under PATH/lib and the
1781                          headers under PATH/include)
1782  --with-alsa             specify prefix directory for the alsa package
1783                          (expecting the libraries under PATH/lib and the
1784                          headers under PATH/include)
1785  --with-alsa-include     specify directory for the alsa include files
1786  --with-alsa-lib         specify directory for the alsa library
1787  --with-giflib           use giflib from build system or OpenJDK source
1788                          (system, bundled) [bundled]
1789  --with-zlib             use zlib from build system or OpenJDK source
1790                          (system, bundled) [bundled]
1791  --with-stdc++lib=<static>,<dynamic>,<default>
1792                          force linking of the C++ runtime on Linux to either
1793                          static or dynamic, default is static with dynamic as
1794                          fallback
1795  --with-num-cores        number of cores in the build system, e.g.
1796                          --with-num-cores=8 [probed]
1797  --with-memory-size      memory (in MB) available in the build system, e.g.
1798                          --with-memory-size=1024 [probed]
1799  --with-jobs             number of parallel jobs to let make run [calculated
1800                          based on cores and memory]
1801  --with-sjavac-server-java
1802                          use this java binary for running the sjavac
1803                          background server [Boot JDK java]
1804  --with-ccache-dir       where to store ccache files [~/.ccache]
1805
1806Some influential environment variables:
1807  PKG_CONFIG  path to pkg-config utility
1808  CC          C compiler command
1809  CFLAGS      C compiler flags
1810  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1811              nonstandard directory <lib dir>
1812  LIBS        libraries to pass to the linker, e.g. -l<library>
1813  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1814              you have headers in a nonstandard directory <include dir>
1815  CXX         C++ compiler command
1816  CXXFLAGS    C++ compiler flags
1817  OBJC        Objective C compiler command
1818  OBJCFLAGS   Objective C compiler flags
1819  CPP         C preprocessor
1820  CXXCPP      C++ preprocessor
1821  XMKMF       Path to xmkmf, Makefile generator for X Window System
1822  FREETYPE2_CFLAGS
1823              C compiler flags for FREETYPE2, overriding pkg-config
1824  FREETYPE2_LIBS
1825              linker flags for FREETYPE2, overriding pkg-config
1826  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1827  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1828  LIBFFI_CFLAGS
1829              C compiler flags for LIBFFI, overriding pkg-config
1830  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1831
1832Use these variables to override the choices made by `configure' or to help
1833it to find libraries and programs with nonstandard names/locations.
1834
1835Report bugs to <build-dev@openjdk.java.net>.
1836OpenJDK home page: <http://openjdk.java.net>.
1837_ACEOF
1838ac_status=$?
1839fi
1840
1841if test "$ac_init_help" = "recursive"; then
1842  # If there are subdirs, report their specific --help.
1843  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1844    test -d "$ac_dir" ||
1845      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1846      continue
1847    ac_builddir=.
1848
1849case "$ac_dir" in
1850.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1851*)
1852  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1853  # A ".." for each directory in $ac_dir_suffix.
1854  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1855  case $ac_top_builddir_sub in
1856  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1857  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1858  esac ;;
1859esac
1860ac_abs_top_builddir=$ac_pwd
1861ac_abs_builddir=$ac_pwd$ac_dir_suffix
1862# for backward compatibility:
1863ac_top_builddir=$ac_top_build_prefix
1864
1865case $srcdir in
1866  .)  # We are building in place.
1867    ac_srcdir=.
1868    ac_top_srcdir=$ac_top_builddir_sub
1869    ac_abs_top_srcdir=$ac_pwd ;;
1870  [\\/]* | ?:[\\/]* )  # Absolute name.
1871    ac_srcdir=$srcdir$ac_dir_suffix;
1872    ac_top_srcdir=$srcdir
1873    ac_abs_top_srcdir=$srcdir ;;
1874  *) # Relative name.
1875    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1876    ac_top_srcdir=$ac_top_build_prefix$srcdir
1877    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1878esac
1879ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1880
1881    cd "$ac_dir" || { ac_status=$?; continue; }
1882    # Check for guested configure.
1883    if test -f "$ac_srcdir/configure.gnu"; then
1884      echo &&
1885      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1886    elif test -f "$ac_srcdir/configure"; then
1887      echo &&
1888      $SHELL "$ac_srcdir/configure" --help=recursive
1889    else
1890      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1891    fi || ac_status=$?
1892    cd "$ac_pwd" || { ac_status=$?; break; }
1893  done
1894fi
1895
1896test -n "$ac_init_help" && exit $ac_status
1897if $ac_init_version; then
1898  cat <<\_ACEOF
1899OpenJDK configure jdk8
1900generated by GNU Autoconf 2.67
1901
1902Copyright (C) 2010 Free Software Foundation, Inc.
1903This configure script is free software; the Free Software Foundation
1904gives unlimited permission to copy, distribute and modify it.
1905_ACEOF
1906  exit
1907fi
1908
1909## ------------------------ ##
1910## Autoconf initialization. ##
1911## ------------------------ ##
1912
1913# ac_fn_c_try_compile LINENO
1914# --------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_c_try_compile ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext
1920  if { { ac_try="$ac_compile"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927  (eval "$ac_compile") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_c_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest.$ac_objext; then :
1939  ac_retval=0
1940else
1941  $as_echo "$as_me: failed program was:" >&5
1942sed 's/^/| /' conftest.$ac_ext >&5
1943
1944	ac_retval=1
1945fi
1946  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1947  as_fn_set_status $ac_retval
1948
1949} # ac_fn_c_try_compile
1950
1951# ac_fn_cxx_try_compile LINENO
1952# ----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_cxx_try_compile ()
1955{
1956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957  rm -f conftest.$ac_objext
1958  if { { ac_try="$ac_compile"
1959case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_compile") 2>conftest.err
1966  ac_status=$?
1967  if test -s conftest.err; then
1968    grep -v '^ *+' conftest.err >conftest.er1
1969    cat conftest.er1 >&5
1970    mv -f conftest.er1 conftest.err
1971  fi
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && {
1974	 test -z "$ac_cxx_werror_flag" ||
1975	 test ! -s conftest.err
1976       } && test -s conftest.$ac_objext; then :
1977  ac_retval=0
1978else
1979  $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982	ac_retval=1
1983fi
1984  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985  as_fn_set_status $ac_retval
1986
1987} # ac_fn_cxx_try_compile
1988
1989# ac_fn_objc_try_compile LINENO
1990# -----------------------------
1991# Try to compile conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_objc_try_compile ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  rm -f conftest.$ac_objext
1996  if { { ac_try="$ac_compile"
1997case "(($ac_try" in
1998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1999  *) ac_try_echo=$ac_try;;
2000esac
2001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2002$as_echo "$ac_try_echo"; } >&5
2003  (eval "$ac_compile") 2>conftest.err
2004  ac_status=$?
2005  if test -s conftest.err; then
2006    grep -v '^ *+' conftest.err >conftest.er1
2007    cat conftest.er1 >&5
2008    mv -f conftest.er1 conftest.err
2009  fi
2010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2011  test $ac_status = 0; } && {
2012	 test -z "$ac_objc_werror_flag" ||
2013	 test ! -s conftest.err
2014       } && test -s conftest.$ac_objext; then :
2015  ac_retval=0
2016else
2017  $as_echo "$as_me: failed program was:" >&5
2018sed 's/^/| /' conftest.$ac_ext >&5
2019
2020	ac_retval=1
2021fi
2022  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2023  as_fn_set_status $ac_retval
2024
2025} # ac_fn_objc_try_compile
2026
2027# ac_fn_c_try_cpp LINENO
2028# ----------------------
2029# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2030ac_fn_c_try_cpp ()
2031{
2032  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2033  if { { ac_try="$ac_cpp conftest.$ac_ext"
2034case "(($ac_try" in
2035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2036  *) ac_try_echo=$ac_try;;
2037esac
2038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2039$as_echo "$ac_try_echo"; } >&5
2040  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2041  ac_status=$?
2042  if test -s conftest.err; then
2043    grep -v '^ *+' conftest.err >conftest.er1
2044    cat conftest.er1 >&5
2045    mv -f conftest.er1 conftest.err
2046  fi
2047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2048  test $ac_status = 0; } > conftest.i && {
2049	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2050	 test ! -s conftest.err
2051       }; then :
2052  ac_retval=0
2053else
2054  $as_echo "$as_me: failed program was:" >&5
2055sed 's/^/| /' conftest.$ac_ext >&5
2056
2057    ac_retval=1
2058fi
2059  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2060  as_fn_set_status $ac_retval
2061
2062} # ac_fn_c_try_cpp
2063
2064# ac_fn_cxx_try_cpp LINENO
2065# ------------------------
2066# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2067ac_fn_cxx_try_cpp ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if { { ac_try="$ac_cpp conftest.$ac_ext"
2071case "(($ac_try" in
2072  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2073  *) ac_try_echo=$ac_try;;
2074esac
2075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2076$as_echo "$ac_try_echo"; } >&5
2077  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2078  ac_status=$?
2079  if test -s conftest.err; then
2080    grep -v '^ *+' conftest.err >conftest.er1
2081    cat conftest.er1 >&5
2082    mv -f conftest.er1 conftest.err
2083  fi
2084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085  test $ac_status = 0; } > conftest.i && {
2086	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2087	 test ! -s conftest.err
2088       }; then :
2089  ac_retval=0
2090else
2091  $as_echo "$as_me: failed program was:" >&5
2092sed 's/^/| /' conftest.$ac_ext >&5
2093
2094    ac_retval=1
2095fi
2096  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2097  as_fn_set_status $ac_retval
2098
2099} # ac_fn_cxx_try_cpp
2100
2101# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2102# ---------------------------------------------------------
2103# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2104# the include files in INCLUDES and setting the cache variable VAR
2105# accordingly.
2106ac_fn_cxx_check_header_mongrel ()
2107{
2108  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2109  if eval "test \"\${$3+set}\"" = set; then :
2110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2111$as_echo_n "checking for $2... " >&6; }
2112if eval "test \"\${$3+set}\"" = set; then :
2113  $as_echo_n "(cached) " >&6
2114fi
2115eval ac_res=\$$3
2116	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2117$as_echo "$ac_res" >&6; }
2118else
2119  # Is the header compilable?
2120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2121$as_echo_n "checking $2 usability... " >&6; }
2122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h.  */
2124$4
2125#include <$2>
2126_ACEOF
2127if ac_fn_cxx_try_compile "$LINENO"; then :
2128  ac_header_compiler=yes
2129else
2130  ac_header_compiler=no
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2134$as_echo "$ac_header_compiler" >&6; }
2135
2136# Is the header present?
2137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2138$as_echo_n "checking $2 presence... " >&6; }
2139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h.  */
2141#include <$2>
2142_ACEOF
2143if ac_fn_cxx_try_cpp "$LINENO"; then :
2144  ac_header_preproc=yes
2145else
2146  ac_header_preproc=no
2147fi
2148rm -f conftest.err conftest.i conftest.$ac_ext
2149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2150$as_echo "$ac_header_preproc" >&6; }
2151
2152# So?  What about this header?
2153case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2154  yes:no: )
2155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2156$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2158$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2159    ;;
2160  no:yes:* )
2161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2162$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2163    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2164$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2165    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2166$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2168$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2170$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2171( $as_echo "## ----------------------------------------- ##
2172## Report this to build-dev@openjdk.java.net ##
2173## ----------------------------------------- ##"
2174     ) | sed "s/^/$as_me: WARNING:     /" >&2
2175    ;;
2176esac
2177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
2179if eval "test \"\${$3+set}\"" = set; then :
2180  $as_echo_n "(cached) " >&6
2181else
2182  eval "$3=\$ac_header_compiler"
2183fi
2184eval ac_res=\$$3
2185	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2186$as_echo "$ac_res" >&6; }
2187fi
2188  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2189
2190} # ac_fn_cxx_check_header_mongrel
2191
2192# ac_fn_cxx_try_run LINENO
2193# ------------------------
2194# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2195# that executables *can* be run.
2196ac_fn_cxx_try_run ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  if { { ac_try="$ac_link"
2200case "(($ac_try" in
2201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2202  *) ac_try_echo=$ac_try;;
2203esac
2204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2205$as_echo "$ac_try_echo"; } >&5
2206  (eval "$ac_link") 2>&5
2207  ac_status=$?
2208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2209  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2210  { { case "(($ac_try" in
2211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212  *) ac_try_echo=$ac_try;;
2213esac
2214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215$as_echo "$ac_try_echo"; } >&5
2216  (eval "$ac_try") 2>&5
2217  ac_status=$?
2218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2219  test $ac_status = 0; }; }; then :
2220  ac_retval=0
2221else
2222  $as_echo "$as_me: program exited with status $ac_status" >&5
2223       $as_echo "$as_me: failed program was:" >&5
2224sed 's/^/| /' conftest.$ac_ext >&5
2225
2226       ac_retval=$ac_status
2227fi
2228  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2229  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230  as_fn_set_status $ac_retval
2231
2232} # ac_fn_cxx_try_run
2233
2234# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2235# ---------------------------------------------------------
2236# Tests whether HEADER exists and can be compiled using the include files in
2237# INCLUDES, setting the cache variable VAR accordingly.
2238ac_fn_cxx_check_header_compile ()
2239{
2240  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2242$as_echo_n "checking for $2... " >&6; }
2243if eval "test \"\${$3+set}\"" = set; then :
2244  $as_echo_n "(cached) " >&6
2245else
2246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h.  */
2248$4
2249#include <$2>
2250_ACEOF
2251if ac_fn_cxx_try_compile "$LINENO"; then :
2252  eval "$3=yes"
2253else
2254  eval "$3=no"
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257fi
2258eval ac_res=\$$3
2259	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260$as_echo "$ac_res" >&6; }
2261  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2262
2263} # ac_fn_cxx_check_header_compile
2264
2265# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2266# ----------------------------------------------
2267# Tries to find the compile-time value of EXPR in a program that includes
2268# INCLUDES, setting VAR accordingly. Returns whether the value could be
2269# computed
2270ac_fn_cxx_compute_int ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if test "$cross_compiling" = yes; then
2274    # Depending upon the size, compute the lo and hi bounds.
2275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278int
2279main ()
2280{
2281static int test_array [1 - 2 * !(($2) >= 0)];
2282test_array [0] = 0
2283
2284  ;
2285  return 0;
2286}
2287_ACEOF
2288if ac_fn_cxx_try_compile "$LINENO"; then :
2289  ac_lo=0 ac_mid=0
2290  while :; do
2291    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h.  */
2293$4
2294int
2295main ()
2296{
2297static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2298test_array [0] = 0
2299
2300  ;
2301  return 0;
2302}
2303_ACEOF
2304if ac_fn_cxx_try_compile "$LINENO"; then :
2305  ac_hi=$ac_mid; break
2306else
2307  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2308			if test $ac_lo -le $ac_mid; then
2309			  ac_lo= ac_hi=
2310			  break
2311			fi
2312			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315  done
2316else
2317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h.  */
2319$4
2320int
2321main ()
2322{
2323static int test_array [1 - 2 * !(($2) < 0)];
2324test_array [0] = 0
2325
2326  ;
2327  return 0;
2328}
2329_ACEOF
2330if ac_fn_cxx_try_compile "$LINENO"; then :
2331  ac_hi=-1 ac_mid=-1
2332  while :; do
2333    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h.  */
2335$4
2336int
2337main ()
2338{
2339static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2340test_array [0] = 0
2341
2342  ;
2343  return 0;
2344}
2345_ACEOF
2346if ac_fn_cxx_try_compile "$LINENO"; then :
2347  ac_lo=$ac_mid; break
2348else
2349  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2350			if test $ac_mid -le $ac_hi; then
2351			  ac_lo= ac_hi=
2352			  break
2353			fi
2354			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2357  done
2358else
2359  ac_lo= ac_hi=
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364# Binary search between lo and hi bounds.
2365while test "x$ac_lo" != "x$ac_hi"; do
2366  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h.  */
2369$4
2370int
2371main ()
2372{
2373static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2374test_array [0] = 0
2375
2376  ;
2377  return 0;
2378}
2379_ACEOF
2380if ac_fn_cxx_try_compile "$LINENO"; then :
2381  ac_hi=$ac_mid
2382else
2383  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386done
2387case $ac_lo in #((
2388?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2389'') ac_retval=1 ;;
2390esac
2391  else
2392    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393/* end confdefs.h.  */
2394$4
2395static long int longval () { return $2; }
2396static unsigned long int ulongval () { return $2; }
2397#include <stdio.h>
2398#include <stdlib.h>
2399int
2400main ()
2401{
2402
2403  FILE *f = fopen ("conftest.val", "w");
2404  if (! f)
2405    return 1;
2406  if (($2) < 0)
2407    {
2408      long int i = longval ();
2409      if (i != ($2))
2410	return 1;
2411      fprintf (f, "%ld", i);
2412    }
2413  else
2414    {
2415      unsigned long int i = ulongval ();
2416      if (i != ($2))
2417	return 1;
2418      fprintf (f, "%lu", i);
2419    }
2420  /* Do not output a trailing newline, as this causes \r\n confusion
2421     on some platforms.  */
2422  return ferror (f) || fclose (f) != 0;
2423
2424  ;
2425  return 0;
2426}
2427_ACEOF
2428if ac_fn_cxx_try_run "$LINENO"; then :
2429  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2430else
2431  ac_retval=1
2432fi
2433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2434  conftest.$ac_objext conftest.beam conftest.$ac_ext
2435rm -f conftest.val
2436
2437  fi
2438  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2439  as_fn_set_status $ac_retval
2440
2441} # ac_fn_cxx_compute_int
2442
2443# ac_fn_cxx_try_link LINENO
2444# -------------------------
2445# Try to link conftest.$ac_ext, and return whether this succeeded.
2446ac_fn_cxx_try_link ()
2447{
2448  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2449  rm -f conftest.$ac_objext conftest$ac_exeext
2450  if { { ac_try="$ac_link"
2451case "(($ac_try" in
2452  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453  *) ac_try_echo=$ac_try;;
2454esac
2455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456$as_echo "$ac_try_echo"; } >&5
2457  (eval "$ac_link") 2>conftest.err
2458  ac_status=$?
2459  if test -s conftest.err; then
2460    grep -v '^ *+' conftest.err >conftest.er1
2461    cat conftest.er1 >&5
2462    mv -f conftest.er1 conftest.err
2463  fi
2464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2465  test $ac_status = 0; } && {
2466	 test -z "$ac_cxx_werror_flag" ||
2467	 test ! -s conftest.err
2468       } && test -s conftest$ac_exeext && {
2469	 test "$cross_compiling" = yes ||
2470	 $as_test_x conftest$ac_exeext
2471       }; then :
2472  ac_retval=0
2473else
2474  $as_echo "$as_me: failed program was:" >&5
2475sed 's/^/| /' conftest.$ac_ext >&5
2476
2477	ac_retval=1
2478fi
2479  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2480  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2481  # interfere with the next link command; also delete a directory that is
2482  # left behind by Apple's compiler.  We do this before executing the actions.
2483  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2484  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2485  as_fn_set_status $ac_retval
2486
2487} # ac_fn_cxx_try_link
2488
2489# ac_fn_cxx_check_func LINENO FUNC VAR
2490# ------------------------------------
2491# Tests whether FUNC exists, setting the cache variable VAR accordingly
2492ac_fn_cxx_check_func ()
2493{
2494  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2496$as_echo_n "checking for $2... " >&6; }
2497if eval "test \"\${$3+set}\"" = set; then :
2498  $as_echo_n "(cached) " >&6
2499else
2500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2501/* end confdefs.h.  */
2502/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2503   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2504#define $2 innocuous_$2
2505
2506/* System header to define __stub macros and hopefully few prototypes,
2507    which can conflict with char $2 (); below.
2508    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2509    <limits.h> exists even on freestanding compilers.  */
2510
2511#ifdef __STDC__
2512# include <limits.h>
2513#else
2514# include <assert.h>
2515#endif
2516
2517#undef $2
2518
2519/* Override any GCC internal prototype to avoid an error.
2520   Use char because int might match the return type of a GCC
2521   builtin and then its argument prototype would still apply.  */
2522#ifdef __cplusplus
2523extern "C"
2524#endif
2525char $2 ();
2526/* The GNU C library defines this for functions which it implements
2527    to always fail with ENOSYS.  Some functions are actually named
2528    something starting with __ and the normal name is an alias.  */
2529#if defined __stub_$2 || defined __stub___$2
2530choke me
2531#endif
2532
2533int
2534main ()
2535{
2536return $2 ();
2537  ;
2538  return 0;
2539}
2540_ACEOF
2541if ac_fn_cxx_try_link "$LINENO"; then :
2542  eval "$3=yes"
2543else
2544  eval "$3=no"
2545fi
2546rm -f core conftest.err conftest.$ac_objext \
2547    conftest$ac_exeext conftest.$ac_ext
2548fi
2549eval ac_res=\$$3
2550	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2551$as_echo "$ac_res" >&6; }
2552  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2553
2554} # ac_fn_cxx_check_func
2555
2556# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2557# -------------------------------------------------------
2558# Tests whether HEADER exists and can be compiled using the include files in
2559# INCLUDES, setting the cache variable VAR accordingly.
2560ac_fn_c_check_header_compile ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2564$as_echo_n "checking for $2... " >&6; }
2565if eval "test \"\${$3+set}\"" = set; then :
2566  $as_echo_n "(cached) " >&6
2567else
2568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2569/* end confdefs.h.  */
2570$4
2571#include <$2>
2572_ACEOF
2573if ac_fn_c_try_compile "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2579fi
2580eval ac_res=\$$3
2581	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582$as_echo "$ac_res" >&6; }
2583  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2584
2585} # ac_fn_c_check_header_compile
2586cat >config.log <<_ACEOF
2587This file contains any messages produced by compilers while
2588running configure, to aid debugging if configure makes a mistake.
2589
2590It was created by OpenJDK $as_me jdk8, which was
2591generated by GNU Autoconf 2.67.  Invocation command line was
2592
2593  $ $0 $@
2594
2595_ACEOF
2596exec 5>>config.log
2597{
2598cat <<_ASUNAME
2599## --------- ##
2600## Platform. ##
2601## --------- ##
2602
2603hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2604uname -m = `(uname -m) 2>/dev/null || echo unknown`
2605uname -r = `(uname -r) 2>/dev/null || echo unknown`
2606uname -s = `(uname -s) 2>/dev/null || echo unknown`
2607uname -v = `(uname -v) 2>/dev/null || echo unknown`
2608
2609/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2610/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2611
2612/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2613/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2614/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2615/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2616/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2617/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2618/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2619
2620_ASUNAME
2621
2622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623for as_dir in $PATH
2624do
2625  IFS=$as_save_IFS
2626  test -z "$as_dir" && as_dir=.
2627    $as_echo "PATH: $as_dir"
2628  done
2629IFS=$as_save_IFS
2630
2631} >&5
2632
2633cat >&5 <<_ACEOF
2634
2635
2636## ----------- ##
2637## Core tests. ##
2638## ----------- ##
2639
2640_ACEOF
2641
2642
2643# Keep a trace of the command line.
2644# Strip out --no-create and --no-recursion so they do not pile up.
2645# Strip out --silent because we don't want to record it for future runs.
2646# Also quote any args containing shell meta-characters.
2647# Make two passes to allow for proper duplicate-argument suppression.
2648ac_configure_args=
2649ac_configure_args0=
2650ac_configure_args1=
2651ac_must_keep_next=false
2652for ac_pass in 1 2
2653do
2654  for ac_arg
2655  do
2656    case $ac_arg in
2657    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2658    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2659    | -silent | --silent | --silen | --sile | --sil)
2660      continue ;;
2661    *\'*)
2662      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2663    esac
2664    case $ac_pass in
2665    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2666    2)
2667      as_fn_append ac_configure_args1 " '$ac_arg'"
2668      if test $ac_must_keep_next = true; then
2669	ac_must_keep_next=false # Got value, back to normal.
2670      else
2671	case $ac_arg in
2672	  *=* | --config-cache | -C | -disable-* | --disable-* \
2673	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2674	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2675	  | -with-* | --with-* | -without-* | --without-* | --x)
2676	    case "$ac_configure_args0 " in
2677	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2678	    esac
2679	    ;;
2680	  -* ) ac_must_keep_next=true ;;
2681	esac
2682      fi
2683      as_fn_append ac_configure_args " '$ac_arg'"
2684      ;;
2685    esac
2686  done
2687done
2688{ ac_configure_args0=; unset ac_configure_args0;}
2689{ ac_configure_args1=; unset ac_configure_args1;}
2690
2691# When interrupted or exit'd, cleanup temporary files, and complete
2692# config.log.  We remove comments because anyway the quotes in there
2693# would cause problems or look ugly.
2694# WARNING: Use '\'' to represent an apostrophe within the trap.
2695# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2696trap 'exit_status=$?
2697  # Save into config.log some information that might help in debugging.
2698  {
2699    echo
2700
2701    $as_echo "## ---------------- ##
2702## Cache variables. ##
2703## ---------------- ##"
2704    echo
2705    # The following way of writing the cache mishandles newlines in values,
2706(
2707  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2708    eval ac_val=\$$ac_var
2709    case $ac_val in #(
2710    *${as_nl}*)
2711      case $ac_var in #(
2712      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2713$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2714      esac
2715      case $ac_var in #(
2716      _ | IFS | as_nl) ;; #(
2717      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2718      *) { eval $ac_var=; unset $ac_var;} ;;
2719      esac ;;
2720    esac
2721  done
2722  (set) 2>&1 |
2723    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2724    *${as_nl}ac_space=\ *)
2725      sed -n \
2726	"s/'\''/'\''\\\\'\'''\''/g;
2727	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2728      ;; #(
2729    *)
2730      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2731      ;;
2732    esac |
2733    sort
2734)
2735    echo
2736
2737    $as_echo "## ----------------- ##
2738## Output variables. ##
2739## ----------------- ##"
2740    echo
2741    for ac_var in $ac_subst_vars
2742    do
2743      eval ac_val=\$$ac_var
2744      case $ac_val in
2745      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746      esac
2747      $as_echo "$ac_var='\''$ac_val'\''"
2748    done | sort
2749    echo
2750
2751    if test -n "$ac_subst_files"; then
2752      $as_echo "## ------------------- ##
2753## File substitutions. ##
2754## ------------------- ##"
2755      echo
2756      for ac_var in $ac_subst_files
2757      do
2758	eval ac_val=\$$ac_var
2759	case $ac_val in
2760	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2761	esac
2762	$as_echo "$ac_var='\''$ac_val'\''"
2763      done | sort
2764      echo
2765    fi
2766
2767    if test -s confdefs.h; then
2768      $as_echo "## ----------- ##
2769## confdefs.h. ##
2770## ----------- ##"
2771      echo
2772      cat confdefs.h
2773      echo
2774    fi
2775    test "$ac_signal" != 0 &&
2776      $as_echo "$as_me: caught signal $ac_signal"
2777    $as_echo "$as_me: exit $exit_status"
2778  } >&5
2779  rm -f core *.core core.conftest.* &&
2780    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2781    exit $exit_status
2782' 0
2783for ac_signal in 1 2 13 15; do
2784  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2785done
2786ac_signal=0
2787
2788# confdefs.h avoids OS command line length limits that DEFS can exceed.
2789rm -f -r conftest* confdefs.h
2790
2791$as_echo "/* confdefs.h */" > confdefs.h
2792
2793# Predefined preprocessor variables.
2794
2795cat >>confdefs.h <<_ACEOF
2796#define PACKAGE_NAME "$PACKAGE_NAME"
2797_ACEOF
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_VERSION "$PACKAGE_VERSION"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_STRING "$PACKAGE_STRING"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_URL "$PACKAGE_URL"
2817_ACEOF
2818
2819
2820# Let the site file select an alternate cache file if it wants to.
2821# Prefer an explicitly selected file to automatically selected ones.
2822ac_site_file1=NONE
2823ac_site_file2=NONE
2824if test -n "$CONFIG_SITE"; then
2825  # We do not want a PATH search for config.site.
2826  case $CONFIG_SITE in #((
2827    -*)  ac_site_file1=./$CONFIG_SITE;;
2828    */*) ac_site_file1=$CONFIG_SITE;;
2829    *)   ac_site_file1=./$CONFIG_SITE;;
2830  esac
2831elif test "x$prefix" != xNONE; then
2832  ac_site_file1=$prefix/share/config.site
2833  ac_site_file2=$prefix/etc/config.site
2834else
2835  ac_site_file1=$ac_default_prefix/share/config.site
2836  ac_site_file2=$ac_default_prefix/etc/config.site
2837fi
2838for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2839do
2840  test "x$ac_site_file" = xNONE && continue
2841  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2842    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2843$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2844    sed 's/^/| /' "$ac_site_file" >&5
2845    . "$ac_site_file" \
2846      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2848as_fn_error $? "failed to load site script $ac_site_file
2849See \`config.log' for more details" "$LINENO" 5 ; }
2850  fi
2851done
2852
2853if test -r "$cache_file"; then
2854  # Some versions of bash will fail to source /dev/null (special files
2855  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2856  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2857    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2858$as_echo "$as_me: loading cache $cache_file" >&6;}
2859    case $cache_file in
2860      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2861      *)                      . "./$cache_file";;
2862    esac
2863  fi
2864else
2865  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2866$as_echo "$as_me: creating cache $cache_file" >&6;}
2867  >$cache_file
2868fi
2869
2870# Check that the precious variables saved in the cache have kept the same
2871# value.
2872ac_cache_corrupted=false
2873for ac_var in $ac_precious_vars; do
2874  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2875  eval ac_new_set=\$ac_env_${ac_var}_set
2876  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2877  eval ac_new_val=\$ac_env_${ac_var}_value
2878  case $ac_old_set,$ac_new_set in
2879    set,)
2880      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2881$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2882      ac_cache_corrupted=: ;;
2883    ,set)
2884      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2885$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2886      ac_cache_corrupted=: ;;
2887    ,);;
2888    *)
2889      if test "x$ac_old_val" != "x$ac_new_val"; then
2890	# differences in whitespace do not lead to failure.
2891	ac_old_val_w=`echo x $ac_old_val`
2892	ac_new_val_w=`echo x $ac_new_val`
2893	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2894	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2895$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2896	  ac_cache_corrupted=:
2897	else
2898	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2899$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2900	  eval $ac_var=\$ac_old_val
2901	fi
2902	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2903$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2904	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2905$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2906      fi;;
2907  esac
2908  # Pass precious variables to config.status.
2909  if test "$ac_new_set" = set; then
2910    case $ac_new_val in
2911    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2912    *) ac_arg=$ac_var=$ac_new_val ;;
2913    esac
2914    case " $ac_configure_args " in
2915      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2916      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2917    esac
2918  fi
2919done
2920if $ac_cache_corrupted; then
2921  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2923  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2924$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2925  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2926fi
2927## -------------------- ##
2928## Main body of script. ##
2929## -------------------- ##
2930
2931ac_ext=c
2932ac_cpp='$CPP $CPPFLAGS'
2933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2935ac_compiler_gnu=$ac_cv_c_compiler_gnu
2936
2937
2938
2939ac_aux_dir=
2940for ac_dir in build-aux "$srcdir"/build-aux; do
2941  if test -f "$ac_dir/install-sh"; then
2942    ac_aux_dir=$ac_dir
2943    ac_install_sh="$ac_aux_dir/install-sh -c"
2944    break
2945  elif test -f "$ac_dir/install.sh"; then
2946    ac_aux_dir=$ac_dir
2947    ac_install_sh="$ac_aux_dir/install.sh -c"
2948    break
2949  elif test -f "$ac_dir/shtool"; then
2950    ac_aux_dir=$ac_dir
2951    ac_install_sh="$ac_aux_dir/shtool install -c"
2952    break
2953  fi
2954done
2955if test -z "$ac_aux_dir"; then
2956  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2957fi
2958
2959# These three variables are undocumented and unsupported,
2960# and are intended to be withdrawn in a future Autoconf release.
2961# They can cause serious problems if a builder's source tree is in a directory
2962# whose full name contains unusual characters.
2963ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2964ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2965ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2966
2967
2968# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2969
2970#
2971# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2972# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2973#
2974# This code is free software; you can redistribute it and/or modify it
2975# under the terms of the GNU General Public License version 2 only, as
2976# published by the Free Software Foundation.  Oracle designates this
2977# particular file as subject to the "Classpath" exception as provided
2978# by Oracle in the LICENSE file that accompanied this code.
2979#
2980# This code is distributed in the hope that it will be useful, but WITHOUT
2981# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2982# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2983# version 2 for more details (a copy is included in the LICENSE file that
2984# accompanied this code).
2985#
2986# You should have received a copy of the GNU General Public License version
2987# 2 along with this work; if not, write to the Free Software Foundation,
2988# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2989#
2990# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2991# or visit www.oracle.com if you need additional information or have any
2992# questions.
2993#
2994
2995#
2996# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2997#
2998# This program is free software; you can redistribute it and/or modify
2999# it under the terms of the GNU General Public License as published by
3000# the Free Software Foundation; either version 2 of the License, or
3001# (at your option) any later version.
3002#
3003# This program is distributed in the hope that it will be useful, but
3004# WITHOUT ANY WARRANTY; without even the implied warranty of
3005# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3006# General Public License for more details.
3007#
3008# You should have received a copy of the GNU General Public License
3009# along with this program; if not, write to the Free Software
3010# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3011#
3012# As a special exception to the GNU General Public License, if you
3013# distribute this file as part of a program that contains a
3014# configuration script generated by Autoconf, you may include it under
3015# the same distribution terms that you use for the rest of that program.
3016
3017# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3018# ----------------------------------
3019# PKG_PROG_PKG_CONFIG
3020
3021# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3022#
3023# Check to see whether a particular set of modules exists.  Similar
3024# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3025#
3026#
3027# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3028# this or PKG_CHECK_MODULES is called, or make sure to call
3029# PKG_CHECK_EXISTS manually
3030# --------------------------------------------------------------
3031
3032
3033
3034# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3035# ---------------------------------------------
3036# _PKG_CONFIG
3037
3038# _PKG_SHORT_ERRORS_SUPPORTED
3039# -----------------------------
3040# _PKG_SHORT_ERRORS_SUPPORTED
3041
3042
3043# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3044# [ACTION-IF-NOT-FOUND])
3045#
3046#
3047# Note that if there is a possibility the first call to
3048# PKG_CHECK_MODULES might not happen, you should be sure to include an
3049# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3050#
3051#
3052# --------------------------------------------------------------
3053# PKG_CHECK_MODULES
3054
3055
3056# Include these first...
3057#
3058# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3059# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3060#
3061# This code is free software; you can redistribute it and/or modify it
3062# under the terms of the GNU General Public License version 2 only, as
3063# published by the Free Software Foundation.  Oracle designates this
3064# particular file as subject to the "Classpath" exception as provided
3065# by Oracle in the LICENSE file that accompanied this code.
3066#
3067# This code is distributed in the hope that it will be useful, but WITHOUT
3068# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3069# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3070# version 2 for more details (a copy is included in the LICENSE file that
3071# accompanied this code).
3072#
3073# You should have received a copy of the GNU General Public License version
3074# 2 along with this work; if not, write to the Free Software Foundation,
3075# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3076#
3077# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3078# or visit www.oracle.com if you need additional information or have any
3079# questions.
3080#
3081
3082# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3083# If so, then append $1 to $2\
3084# Also set JVM_ARG_OK to true/false depending on outcome.
3085
3086
3087# Appends a string to a path variable, only adding the : when needed.
3088
3089
3090# This will make sure the given variable points to a full and proper
3091# path. This means:
3092# 1) There will be no spaces in the path. On posix platforms,
3093#    spaces in the path will result in an error. On Windows,
3094#    the path will be rewritten using short-style to be space-free.
3095# 2) The path will be absolute, and it will be in unix-style (on
3096#     cygwin).
3097# $1: The name of the variable to fix
3098
3099
3100# This will make sure the given variable points to a executable
3101# with a full and proper path. This means:
3102# 1) There will be no spaces in the path. On posix platforms,
3103#    spaces in the path will result in an error. On Windows,
3104#    the path will be rewritten using short-style to be space-free.
3105# 2) The path will be absolute, and it will be in unix-style (on
3106#     cygwin).
3107# Any arguments given to the executable is preserved.
3108# If the input variable does not have a directory specification, then
3109# it need to be in the PATH.
3110# $1: The name of the variable to fix
3111
3112
3113
3114
3115
3116
3117# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3118# $1: variable to check
3119# $2: executable name to print in warning (optional)
3120
3121
3122# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3123# Arguments as AC_PATH_PROG:
3124# $1: variable to set
3125# $2: executable name to look for
3126
3127
3128# Setup the most fundamental tools that relies on not much else to set up,
3129# but is used by much of the early bootstrap code.
3130
3131
3132# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3133
3134
3135
3136
3137
3138
3139
3140#%%% Simple tools %%%
3141
3142# Check if we have found a usable version of make
3143# $1: the path to a potential make binary (or empty)
3144# $2: the description on how we found this
3145
3146
3147# Goes looking for a usable version of GNU make.
3148
3149
3150
3151
3152
3153
3154# Check if build directory is on local disk. If not possible to determine,
3155# we prefer to claim it's local.
3156# Argument 1: directory to test
3157# Argument 2: what to do if it is on local disk
3158# Argument 3: what to do otherwise (remote disk or failure)
3159
3160
3161# Check that source files have basic read permissions set. This might
3162# not be the case in cygwin in certain conditions.
3163
3164
3165
3166
3167#
3168# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3170#
3171# This code is free software; you can redistribute it and/or modify it
3172# under the terms of the GNU General Public License version 2 only, as
3173# published by the Free Software Foundation.  Oracle designates this
3174# particular file as subject to the "Classpath" exception as provided
3175# by Oracle in the LICENSE file that accompanied this code.
3176#
3177# This code is distributed in the hope that it will be useful, but WITHOUT
3178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3180# version 2 for more details (a copy is included in the LICENSE file that
3181# accompanied this code).
3182#
3183# You should have received a copy of the GNU General Public License version
3184# 2 along with this work; if not, write to the Free Software Foundation,
3185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3186#
3187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3188# or visit www.oracle.com if you need additional information or have any
3189# questions.
3190#
3191
3192
3193
3194
3195
3196# Helper function which possibly converts a path using DOS-style short mode.
3197# If so, the updated path is stored in $new_path.
3198# $1: The path to check
3199
3200
3201# Helper function which possibly converts a path using DOS-style short mode.
3202# If so, the updated path is stored in $new_path.
3203# $1: The path to check
3204
3205
3206# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3207# and could probably be heavily simplified. However, all changes in this
3208# area tend to need lot of testing in different scenarios, and in lack of
3209# proper unit testing, cleaning this up has not been deemed worth the effort
3210# at the moment.
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3221
3222
3223
3224
3225#
3226# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228#
3229# This code is free software; you can redistribute it and/or modify it
3230# under the terms of the GNU General Public License version 2 only, as
3231# published by the Free Software Foundation.  Oracle designates this
3232# particular file as subject to the "Classpath" exception as provided
3233# by Oracle in the LICENSE file that accompanied this code.
3234#
3235# This code is distributed in the hope that it will be useful, but WITHOUT
3236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238# version 2 for more details (a copy is included in the LICENSE file that
3239# accompanied this code).
3240#
3241# You should have received a copy of the GNU General Public License version
3242# 2 along with this work; if not, write to the Free Software Foundation,
3243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244#
3245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246# or visit www.oracle.com if you need additional information or have any
3247# questions.
3248#
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260# ... then the rest
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286# Execute the check given as argument, and verify the result
3287# If the Boot JDK was previously found, do nothing
3288# $1 A command line (typically autoconf macro) to execute
3289
3290
3291# Test: Is bootjdk explicitely set by command line arguments?
3292
3293
3294# Test: Is bootjdk available from builddeps?
3295
3296
3297# Test: Is $JAVA_HOME set?
3298
3299
3300# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3301
3302
3303# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3304
3305
3306# Look for a jdk in the given path. If there are multiple, try to select the newest.
3307# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3308# $1 = Path to directory containing jdk installations.
3309# $2 = String to append to the found JDK directory to get the proper JDK home
3310
3311
3312# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3313# environmental variable as base for where to look.
3314# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3315
3316
3317# Test: Is there a JDK installed in default, well-known locations?
3318
3319
3320# Check that a command-line tool in the Boot JDK is correct
3321# $1 = name of variable to assign
3322# $2 = name of binary
3323
3324
3325###############################################################################
3326#
3327# We need a Boot JDK to bootstrap the build.
3328#
3329
3330
3331
3332
3333
3334#
3335# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3336# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3337#
3338# This code is free software; you can redistribute it and/or modify it
3339# under the terms of the GNU General Public License version 2 only, as
3340# published by the Free Software Foundation.  Oracle designates this
3341# particular file as subject to the "Classpath" exception as provided
3342# by Oracle in the LICENSE file that accompanied this code.
3343#
3344# This code is distributed in the hope that it will be useful, but WITHOUT
3345# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3346# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3347# version 2 for more details (a copy is included in the LICENSE file that
3348# accompanied this code).
3349#
3350# You should have received a copy of the GNU General Public License version
3351# 2 along with this work; if not, write to the Free Software Foundation,
3352# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3353#
3354# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3355# or visit www.oracle.com if you need additional information or have any
3356# questions.
3357#
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378#
3379# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3381#
3382# This code is free software; you can redistribute it and/or modify it
3383# under the terms of the GNU General Public License version 2 only, as
3384# published by the Free Software Foundation.  Oracle designates this
3385# particular file as subject to the "Classpath" exception as provided
3386# by Oracle in the LICENSE file that accompanied this code.
3387#
3388# This code is distributed in the hope that it will be useful, but WITHOUT
3389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3391# version 2 for more details (a copy is included in the LICENSE file that
3392# accompanied this code).
3393#
3394# You should have received a copy of the GNU General Public License version
3395# 2 along with this work; if not, write to the Free Software Foundation,
3396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3397#
3398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3399# or visit www.oracle.com if you need additional information or have any
3400# questions.
3401#
3402
3403
3404
3405
3406
3407cygwin_help() {
3408    case $1 in
3409    unzip)
3410        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3411    zip)
3412        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3413    make)
3414        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3415    * )
3416       break ;;
3417    esac
3418}
3419
3420apt_help() {
3421    case $1 in
3422    devkit)
3423        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3424    openjdk)
3425        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3426    alsa)
3427        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3428    cups)
3429        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3430    freetype2)
3431        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3432    pulse)
3433        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3434    x11)
3435        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3436    ccache)
3437        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3438    * )
3439       break ;;
3440    esac
3441}
3442
3443yum_help() {
3444    case $1 in
3445    devkit)
3446        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3447    openjdk)
3448        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3449    alsa)
3450        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3451    cups)
3452        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3453    freetype2)
3454        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3455    pulse)
3456        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3457    x11)
3458        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3459    ccache)
3460        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3461    * )
3462       break ;;
3463    esac
3464}
3465
3466port_help() {
3467    PKGHANDLER_COMMAND=""
3468}
3469
3470pkgutil_help() {
3471    PKGHANDLER_COMMAND=""
3472}
3473
3474pkgadd_help() {
3475    PKGHANDLER_COMMAND=""
3476}
3477
3478
3479
3480#
3481# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3482# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3483#
3484# This code is free software; you can redistribute it and/or modify it
3485# under the terms of the GNU General Public License version 2 only, as
3486# published by the Free Software Foundation.  Oracle designates this
3487# particular file as subject to the "Classpath" exception as provided
3488# by Oracle in the LICENSE file that accompanied this code.
3489#
3490# This code is distributed in the hope that it will be useful, but WITHOUT
3491# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3492# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3493# version 2 for more details (a copy is included in the LICENSE file that
3494# accompanied this code).
3495#
3496# You should have received a copy of the GNU General Public License version
3497# 2 along with this work; if not, write to the Free Software Foundation,
3498# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3499#
3500# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3501# or visit www.oracle.com if you need additional information or have any
3502# questions.
3503#
3504
3505
3506
3507
3508
3509
3510
3511
3512###############################################################################
3513#
3514# Should we build only OpenJDK even if closed sources are present?
3515#
3516
3517
3518
3519
3520###############################################################################
3521#
3522# Setup version numbers
3523#
3524
3525
3526
3527
3528
3529
3530# Support for customization of the build process. Some build files
3531# will include counterparts from this location, if they exist. This allows
3532# for a degree of customization of the build targets and the rules/recipes
3533# to create them
3534
3535# Check whether --with-custom-make-dir was given.
3536if test "${with_custom_make_dir+set}" = set; then :
3537  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3538fi
3539
3540
3541
3542#
3543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545#
3546# This code is free software; you can redistribute it and/or modify it
3547# under the terms of the GNU General Public License version 2 only, as
3548# published by the Free Software Foundation.  Oracle designates this
3549# particular file as subject to the "Classpath" exception as provided
3550# by Oracle in the LICENSE file that accompanied this code.
3551#
3552# This code is distributed in the hope that it will be useful, but WITHOUT
3553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555# version 2 for more details (a copy is included in the LICENSE file that
3556# accompanied this code).
3557#
3558# You should have received a copy of the GNU General Public License version
3559# 2 along with this work; if not, write to the Free Software Foundation,
3560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561#
3562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563# or visit www.oracle.com if you need additional information or have any
3564# questions.
3565#
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581#
3582# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3583# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3584#
3585# This code is free software; you can redistribute it and/or modify it
3586# under the terms of the GNU General Public License version 2 only, as
3587# published by the Free Software Foundation.  Oracle designates this
3588# particular file as subject to the "Classpath" exception as provided
3589# by Oracle in the LICENSE file that accompanied this code.
3590#
3591# This code is distributed in the hope that it will be useful, but WITHOUT
3592# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3593# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3594# version 2 for more details (a copy is included in the LICENSE file that
3595# accompanied this code).
3596#
3597# You should have received a copy of the GNU General Public License version
3598# 2 along with this work; if not, write to the Free Software Foundation,
3599# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3600#
3601# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3602# or visit www.oracle.com if you need additional information or have any
3603# questions.
3604#
3605
3606# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3607# Converts autoconf style CPU name to OpenJDK style, into
3608# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3609
3610
3611# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3612# Converts autoconf style OS name to OpenJDK style, into
3613# VAR_OS and VAR_OS_API.
3614
3615
3616# Expects $host_os $host_cpu $build_os and $build_cpu
3617# and $with_target_bits to have been setup!
3618#
3619# Translate the standard triplet(quadruplet) definition
3620# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3621# OPENJDK_BUILD_OS, etc.
3622
3623
3624# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3625# accordingly. Must be done after setting up build and target system, but before
3626# doing anything else with these values.
3627
3628
3629    # Setup the legacy variables, for controlling the old makefiles.
3630    #
3631
3632
3633
3634
3635#%%% Build and target systems %%%
3636
3637
3638
3639
3640# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3641# Add -mX to various FLAGS variables.
3642
3643
3644
3645
3646
3647
3648#
3649# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3651#
3652# This code is free software; you can redistribute it and/or modify it
3653# under the terms of the GNU General Public License version 2 only, as
3654# published by the Free Software Foundation.  Oracle designates this
3655# particular file as subject to the "Classpath" exception as provided
3656# by Oracle in the LICENSE file that accompanied this code.
3657#
3658# This code is distributed in the hope that it will be useful, but WITHOUT
3659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3661# version 2 for more details (a copy is included in the LICENSE file that
3662# accompanied this code).
3663#
3664# You should have received a copy of the GNU General Public License version
3665# 2 along with this work; if not, write to the Free Software Foundation,
3666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3667#
3668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3669# or visit www.oracle.com if you need additional information or have any
3670# questions.
3671#
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705# $1 = compiler to test (CC or CXX)
3706# $2 = human readable name of compiler (C or C++)
3707
3708
3709
3710
3711
3712# $1 = compiler to test (CC or CXX)
3713# $2 = human readable name of compiler (C or C++)
3714# $3 = list of compiler names to search for
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3729#                                   [RUN-IF-FALSE])
3730# ------------------------------------------------------------
3731# Check that the c and c++ compilers support an argument
3732
3733
3734
3735
3736# Setup the JTREG paths
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768
3769
3770# Check if the VS env variables were setup prior to running configure.
3771# If not, then find vcvarsall.bat and run it automatically, and integrate
3772# the set env variables into the spec file.
3773
3774
3775
3776# Setup the DXSDK paths
3777
3778
3779
3780
3781
3782
3783# This line needs to be here, verbatim, after all includes and the dummy hook
3784# definitions. It is replaced with custom functionality when building
3785# custom sources.
3786#CUSTOM_AUTOCONF_INCLUDE
3787
3788# Do not change or remove the following line, it is needed for consistency checks:
3789DATE_WHEN_GENERATED=1372685988
3790
3791###############################################################################
3792#
3793# Initialization / Boot-strapping
3794#
3795# The bootstrapping process needs to solve the "chicken or the egg" problem,
3796# thus it jumps back and forth, each time gaining something needed later on.
3797#
3798###############################################################################
3799
3800# Basic initialization that must happen first of all
3801
3802# Save the original command line. This is passed to us by the wrapper configure script.
3803
3804DATE_WHEN_CONFIGURED=`LANG=C date`
3805
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3807$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3808{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3809$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3810
3811
3812
3813# Start with tools that do not need have cross compilation support
3814# and can be expected to be found in the default PATH. These tools are
3815# used by configure. Nor are these tools expected to be found in the
3816# devkit from the builddeps server either, since they are
3817# needed to download the devkit.
3818
3819# First are all the simple required tools.
3820
3821    for ac_prog in basename
3822do
3823  # Extract the first word of "$ac_prog", so it can be a program name with args.
3824set dummy $ac_prog; ac_word=$2
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3826$as_echo_n "checking for $ac_word... " >&6; }
3827if test "${ac_cv_path_BASENAME+set}" = set; then :
3828  $as_echo_n "(cached) " >&6
3829else
3830  case $BASENAME in
3831  [\\/]* | ?:[\\/]*)
3832  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3833  ;;
3834  *)
3835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838  IFS=$as_save_IFS
3839  test -z "$as_dir" && as_dir=.
3840    for ac_exec_ext in '' $ac_executable_extensions; do
3841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3842    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3844    break 2
3845  fi
3846done
3847  done
3848IFS=$as_save_IFS
3849
3850  ;;
3851esac
3852fi
3853BASENAME=$ac_cv_path_BASENAME
3854if test -n "$BASENAME"; then
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3856$as_echo "$BASENAME" >&6; }
3857else
3858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
3860fi
3861
3862
3863  test -n "$BASENAME" && break
3864done
3865
3866
3867    if test "x$BASENAME" = x; then
3868        if test "xbasename" = x; then
3869          PROG_NAME=basename
3870        else
3871          PROG_NAME=basename
3872        fi
3873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3875        as_fn_error $? "Cannot continue" "$LINENO" 5
3876    fi
3877
3878
3879
3880    for ac_prog in bash
3881do
3882  # Extract the first word of "$ac_prog", so it can be a program name with args.
3883set dummy $ac_prog; ac_word=$2
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3885$as_echo_n "checking for $ac_word... " >&6; }
3886if test "${ac_cv_path_BASH+set}" = set; then :
3887  $as_echo_n "(cached) " >&6
3888else
3889  case $BASH in
3890  [\\/]* | ?:[\\/]*)
3891  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3892  ;;
3893  *)
3894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895for as_dir in $PATH
3896do
3897  IFS=$as_save_IFS
3898  test -z "$as_dir" && as_dir=.
3899    for ac_exec_ext in '' $ac_executable_extensions; do
3900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3901    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903    break 2
3904  fi
3905done
3906  done
3907IFS=$as_save_IFS
3908
3909  ;;
3910esac
3911fi
3912BASH=$ac_cv_path_BASH
3913if test -n "$BASH"; then
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3915$as_echo "$BASH" >&6; }
3916else
3917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918$as_echo "no" >&6; }
3919fi
3920
3921
3922  test -n "$BASH" && break
3923done
3924
3925
3926    if test "x$BASH" = x; then
3927        if test "xbash" = x; then
3928          PROG_NAME=bash
3929        else
3930          PROG_NAME=bash
3931        fi
3932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3934        as_fn_error $? "Cannot continue" "$LINENO" 5
3935    fi
3936
3937
3938
3939    for ac_prog in cat
3940do
3941  # Extract the first word of "$ac_prog", so it can be a program name with args.
3942set dummy $ac_prog; ac_word=$2
3943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3944$as_echo_n "checking for $ac_word... " >&6; }
3945if test "${ac_cv_path_CAT+set}" = set; then :
3946  $as_echo_n "(cached) " >&6
3947else
3948  case $CAT in
3949  [\\/]* | ?:[\\/]*)
3950  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3951  ;;
3952  *)
3953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3954for as_dir in $PATH
3955do
3956  IFS=$as_save_IFS
3957  test -z "$as_dir" && as_dir=.
3958    for ac_exec_ext in '' $ac_executable_extensions; do
3959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3960    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3962    break 2
3963  fi
3964done
3965  done
3966IFS=$as_save_IFS
3967
3968  ;;
3969esac
3970fi
3971CAT=$ac_cv_path_CAT
3972if test -n "$CAT"; then
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3974$as_echo "$CAT" >&6; }
3975else
3976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3977$as_echo "no" >&6; }
3978fi
3979
3980
3981  test -n "$CAT" && break
3982done
3983
3984
3985    if test "x$CAT" = x; then
3986        if test "xcat" = x; then
3987          PROG_NAME=cat
3988        else
3989          PROG_NAME=cat
3990        fi
3991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3993        as_fn_error $? "Cannot continue" "$LINENO" 5
3994    fi
3995
3996
3997
3998    for ac_prog in chmod
3999do
4000  # Extract the first word of "$ac_prog", so it can be a program name with args.
4001set dummy $ac_prog; ac_word=$2
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4003$as_echo_n "checking for $ac_word... " >&6; }
4004if test "${ac_cv_path_CHMOD+set}" = set; then :
4005  $as_echo_n "(cached) " >&6
4006else
4007  case $CHMOD in
4008  [\\/]* | ?:[\\/]*)
4009  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4010  ;;
4011  *)
4012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013for as_dir in $PATH
4014do
4015  IFS=$as_save_IFS
4016  test -z "$as_dir" && as_dir=.
4017    for ac_exec_ext in '' $ac_executable_extensions; do
4018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4019    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4021    break 2
4022  fi
4023done
4024  done
4025IFS=$as_save_IFS
4026
4027  ;;
4028esac
4029fi
4030CHMOD=$ac_cv_path_CHMOD
4031if test -n "$CHMOD"; then
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4033$as_echo "$CHMOD" >&6; }
4034else
4035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4036$as_echo "no" >&6; }
4037fi
4038
4039
4040  test -n "$CHMOD" && break
4041done
4042
4043
4044    if test "x$CHMOD" = x; then
4045        if test "xchmod" = x; then
4046          PROG_NAME=chmod
4047        else
4048          PROG_NAME=chmod
4049        fi
4050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4052        as_fn_error $? "Cannot continue" "$LINENO" 5
4053    fi
4054
4055
4056
4057    for ac_prog in cmp
4058do
4059  # Extract the first word of "$ac_prog", so it can be a program name with args.
4060set dummy $ac_prog; ac_word=$2
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062$as_echo_n "checking for $ac_word... " >&6; }
4063if test "${ac_cv_path_CMP+set}" = set; then :
4064  $as_echo_n "(cached) " >&6
4065else
4066  case $CMP in
4067  [\\/]* | ?:[\\/]*)
4068  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4069  ;;
4070  *)
4071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074  IFS=$as_save_IFS
4075  test -z "$as_dir" && as_dir=.
4076    for ac_exec_ext in '' $ac_executable_extensions; do
4077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4078    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4080    break 2
4081  fi
4082done
4083  done
4084IFS=$as_save_IFS
4085
4086  ;;
4087esac
4088fi
4089CMP=$ac_cv_path_CMP
4090if test -n "$CMP"; then
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4092$as_echo "$CMP" >&6; }
4093else
4094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4095$as_echo "no" >&6; }
4096fi
4097
4098
4099  test -n "$CMP" && break
4100done
4101
4102
4103    if test "x$CMP" = x; then
4104        if test "xcmp" = x; then
4105          PROG_NAME=cmp
4106        else
4107          PROG_NAME=cmp
4108        fi
4109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4111        as_fn_error $? "Cannot continue" "$LINENO" 5
4112    fi
4113
4114
4115
4116    for ac_prog in comm
4117do
4118  # Extract the first word of "$ac_prog", so it can be a program name with args.
4119set dummy $ac_prog; ac_word=$2
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4121$as_echo_n "checking for $ac_word... " >&6; }
4122if test "${ac_cv_path_COMM+set}" = set; then :
4123  $as_echo_n "(cached) " >&6
4124else
4125  case $COMM in
4126  [\\/]* | ?:[\\/]*)
4127  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4128  ;;
4129  *)
4130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131for as_dir in $PATH
4132do
4133  IFS=$as_save_IFS
4134  test -z "$as_dir" && as_dir=.
4135    for ac_exec_ext in '' $ac_executable_extensions; do
4136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4137    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4139    break 2
4140  fi
4141done
4142  done
4143IFS=$as_save_IFS
4144
4145  ;;
4146esac
4147fi
4148COMM=$ac_cv_path_COMM
4149if test -n "$COMM"; then
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4151$as_echo "$COMM" >&6; }
4152else
4153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
4155fi
4156
4157
4158  test -n "$COMM" && break
4159done
4160
4161
4162    if test "x$COMM" = x; then
4163        if test "xcomm" = x; then
4164          PROG_NAME=comm
4165        else
4166          PROG_NAME=comm
4167        fi
4168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4170        as_fn_error $? "Cannot continue" "$LINENO" 5
4171    fi
4172
4173
4174
4175    for ac_prog in cp
4176do
4177  # Extract the first word of "$ac_prog", so it can be a program name with args.
4178set dummy $ac_prog; ac_word=$2
4179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4180$as_echo_n "checking for $ac_word... " >&6; }
4181if test "${ac_cv_path_CP+set}" = set; then :
4182  $as_echo_n "(cached) " >&6
4183else
4184  case $CP in
4185  [\\/]* | ?:[\\/]*)
4186  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4187  ;;
4188  *)
4189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4190for as_dir in $PATH
4191do
4192  IFS=$as_save_IFS
4193  test -z "$as_dir" && as_dir=.
4194    for ac_exec_ext in '' $ac_executable_extensions; do
4195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4196    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4198    break 2
4199  fi
4200done
4201  done
4202IFS=$as_save_IFS
4203
4204  ;;
4205esac
4206fi
4207CP=$ac_cv_path_CP
4208if test -n "$CP"; then
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4210$as_echo "$CP" >&6; }
4211else
4212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4213$as_echo "no" >&6; }
4214fi
4215
4216
4217  test -n "$CP" && break
4218done
4219
4220
4221    if test "x$CP" = x; then
4222        if test "xcp" = x; then
4223          PROG_NAME=cp
4224        else
4225          PROG_NAME=cp
4226        fi
4227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4229        as_fn_error $? "Cannot continue" "$LINENO" 5
4230    fi
4231
4232
4233
4234    for ac_prog in cpio
4235do
4236  # Extract the first word of "$ac_prog", so it can be a program name with args.
4237set dummy $ac_prog; ac_word=$2
4238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4239$as_echo_n "checking for $ac_word... " >&6; }
4240if test "${ac_cv_path_CPIO+set}" = set; then :
4241  $as_echo_n "(cached) " >&6
4242else
4243  case $CPIO in
4244  [\\/]* | ?:[\\/]*)
4245  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4246  ;;
4247  *)
4248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251  IFS=$as_save_IFS
4252  test -z "$as_dir" && as_dir=.
4253    for ac_exec_ext in '' $ac_executable_extensions; do
4254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4255    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4257    break 2
4258  fi
4259done
4260  done
4261IFS=$as_save_IFS
4262
4263  ;;
4264esac
4265fi
4266CPIO=$ac_cv_path_CPIO
4267if test -n "$CPIO"; then
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4269$as_echo "$CPIO" >&6; }
4270else
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4272$as_echo "no" >&6; }
4273fi
4274
4275
4276  test -n "$CPIO" && break
4277done
4278
4279
4280    if test "x$CPIO" = x; then
4281        if test "xcpio" = x; then
4282          PROG_NAME=cpio
4283        else
4284          PROG_NAME=cpio
4285        fi
4286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4288        as_fn_error $? "Cannot continue" "$LINENO" 5
4289    fi
4290
4291
4292
4293    for ac_prog in cut
4294do
4295  # Extract the first word of "$ac_prog", so it can be a program name with args.
4296set dummy $ac_prog; ac_word=$2
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4298$as_echo_n "checking for $ac_word... " >&6; }
4299if test "${ac_cv_path_CUT+set}" = set; then :
4300  $as_echo_n "(cached) " >&6
4301else
4302  case $CUT in
4303  [\\/]* | ?:[\\/]*)
4304  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4305  ;;
4306  *)
4307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4308for as_dir in $PATH
4309do
4310  IFS=$as_save_IFS
4311  test -z "$as_dir" && as_dir=.
4312    for ac_exec_ext in '' $ac_executable_extensions; do
4313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4314    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4316    break 2
4317  fi
4318done
4319  done
4320IFS=$as_save_IFS
4321
4322  ;;
4323esac
4324fi
4325CUT=$ac_cv_path_CUT
4326if test -n "$CUT"; then
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4328$as_echo "$CUT" >&6; }
4329else
4330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4331$as_echo "no" >&6; }
4332fi
4333
4334
4335  test -n "$CUT" && break
4336done
4337
4338
4339    if test "x$CUT" = x; then
4340        if test "xcut" = x; then
4341          PROG_NAME=cut
4342        else
4343          PROG_NAME=cut
4344        fi
4345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4347        as_fn_error $? "Cannot continue" "$LINENO" 5
4348    fi
4349
4350
4351
4352    for ac_prog in date
4353do
4354  # Extract the first word of "$ac_prog", so it can be a program name with args.
4355set dummy $ac_prog; ac_word=$2
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4357$as_echo_n "checking for $ac_word... " >&6; }
4358if test "${ac_cv_path_DATE+set}" = set; then :
4359  $as_echo_n "(cached) " >&6
4360else
4361  case $DATE in
4362  [\\/]* | ?:[\\/]*)
4363  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4364  ;;
4365  *)
4366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4367for as_dir in $PATH
4368do
4369  IFS=$as_save_IFS
4370  test -z "$as_dir" && as_dir=.
4371    for ac_exec_ext in '' $ac_executable_extensions; do
4372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4373    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4375    break 2
4376  fi
4377done
4378  done
4379IFS=$as_save_IFS
4380
4381  ;;
4382esac
4383fi
4384DATE=$ac_cv_path_DATE
4385if test -n "$DATE"; then
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4387$as_echo "$DATE" >&6; }
4388else
4389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390$as_echo "no" >&6; }
4391fi
4392
4393
4394  test -n "$DATE" && break
4395done
4396
4397
4398    if test "x$DATE" = x; then
4399        if test "xdate" = x; then
4400          PROG_NAME=date
4401        else
4402          PROG_NAME=date
4403        fi
4404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4406        as_fn_error $? "Cannot continue" "$LINENO" 5
4407    fi
4408
4409
4410
4411    for ac_prog in gdiff diff
4412do
4413  # Extract the first word of "$ac_prog", so it can be a program name with args.
4414set dummy $ac_prog; ac_word=$2
4415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416$as_echo_n "checking for $ac_word... " >&6; }
4417if test "${ac_cv_path_DIFF+set}" = set; then :
4418  $as_echo_n "(cached) " >&6
4419else
4420  case $DIFF in
4421  [\\/]* | ?:[\\/]*)
4422  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4423  ;;
4424  *)
4425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426for as_dir in $PATH
4427do
4428  IFS=$as_save_IFS
4429  test -z "$as_dir" && as_dir=.
4430    for ac_exec_ext in '' $ac_executable_extensions; do
4431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4432    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4434    break 2
4435  fi
4436done
4437  done
4438IFS=$as_save_IFS
4439
4440  ;;
4441esac
4442fi
4443DIFF=$ac_cv_path_DIFF
4444if test -n "$DIFF"; then
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4446$as_echo "$DIFF" >&6; }
4447else
4448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
4450fi
4451
4452
4453  test -n "$DIFF" && break
4454done
4455
4456
4457    if test "x$DIFF" = x; then
4458        if test "xgdiff diff" = x; then
4459          PROG_NAME=diff
4460        else
4461          PROG_NAME=gdiff diff
4462        fi
4463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4465        as_fn_error $? "Cannot continue" "$LINENO" 5
4466    fi
4467
4468
4469
4470    for ac_prog in dirname
4471do
4472  # Extract the first word of "$ac_prog", so it can be a program name with args.
4473set dummy $ac_prog; ac_word=$2
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
4476if test "${ac_cv_path_DIRNAME+set}" = set; then :
4477  $as_echo_n "(cached) " >&6
4478else
4479  case $DIRNAME in
4480  [\\/]* | ?:[\\/]*)
4481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4482  ;;
4483  *)
4484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in $PATH
4486do
4487  IFS=$as_save_IFS
4488  test -z "$as_dir" && as_dir=.
4489    for ac_exec_ext in '' $ac_executable_extensions; do
4490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493    break 2
4494  fi
4495done
4496  done
4497IFS=$as_save_IFS
4498
4499  ;;
4500esac
4501fi
4502DIRNAME=$ac_cv_path_DIRNAME
4503if test -n "$DIRNAME"; then
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4505$as_echo "$DIRNAME" >&6; }
4506else
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511
4512  test -n "$DIRNAME" && break
4513done
4514
4515
4516    if test "x$DIRNAME" = x; then
4517        if test "xdirname" = x; then
4518          PROG_NAME=dirname
4519        else
4520          PROG_NAME=dirname
4521        fi
4522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4524        as_fn_error $? "Cannot continue" "$LINENO" 5
4525    fi
4526
4527
4528
4529    for ac_prog in echo
4530do
4531  # Extract the first word of "$ac_prog", so it can be a program name with args.
4532set dummy $ac_prog; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
4535if test "${ac_cv_path_ECHO+set}" = set; then :
4536  $as_echo_n "(cached) " >&6
4537else
4538  case $ECHO in
4539  [\\/]* | ?:[\\/]*)
4540  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4541  ;;
4542  *)
4543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in $PATH
4545do
4546  IFS=$as_save_IFS
4547  test -z "$as_dir" && as_dir=.
4548    for ac_exec_ext in '' $ac_executable_extensions; do
4549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4550    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4552    break 2
4553  fi
4554done
4555  done
4556IFS=$as_save_IFS
4557
4558  ;;
4559esac
4560fi
4561ECHO=$ac_cv_path_ECHO
4562if test -n "$ECHO"; then
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4564$as_echo "$ECHO" >&6; }
4565else
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
4568fi
4569
4570
4571  test -n "$ECHO" && break
4572done
4573
4574
4575    if test "x$ECHO" = x; then
4576        if test "xecho" = x; then
4577          PROG_NAME=echo
4578        else
4579          PROG_NAME=echo
4580        fi
4581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4583        as_fn_error $? "Cannot continue" "$LINENO" 5
4584    fi
4585
4586
4587
4588    for ac_prog in expr
4589do
4590  # Extract the first word of "$ac_prog", so it can be a program name with args.
4591set dummy $ac_prog; ac_word=$2
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4593$as_echo_n "checking for $ac_word... " >&6; }
4594if test "${ac_cv_path_EXPR+set}" = set; then :
4595  $as_echo_n "(cached) " >&6
4596else
4597  case $EXPR in
4598  [\\/]* | ?:[\\/]*)
4599  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4600  ;;
4601  *)
4602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605  IFS=$as_save_IFS
4606  test -z "$as_dir" && as_dir=.
4607    for ac_exec_ext in '' $ac_executable_extensions; do
4608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4609    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4611    break 2
4612  fi
4613done
4614  done
4615IFS=$as_save_IFS
4616
4617  ;;
4618esac
4619fi
4620EXPR=$ac_cv_path_EXPR
4621if test -n "$EXPR"; then
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4623$as_echo "$EXPR" >&6; }
4624else
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626$as_echo "no" >&6; }
4627fi
4628
4629
4630  test -n "$EXPR" && break
4631done
4632
4633
4634    if test "x$EXPR" = x; then
4635        if test "xexpr" = x; then
4636          PROG_NAME=expr
4637        else
4638          PROG_NAME=expr
4639        fi
4640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4642        as_fn_error $? "Cannot continue" "$LINENO" 5
4643    fi
4644
4645
4646
4647    for ac_prog in file
4648do
4649  # Extract the first word of "$ac_prog", so it can be a program name with args.
4650set dummy $ac_prog; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if test "${ac_cv_path_FILE+set}" = set; then :
4654  $as_echo_n "(cached) " >&6
4655else
4656  case $FILE in
4657  [\\/]* | ?:[\\/]*)
4658  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4659  ;;
4660  *)
4661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662for as_dir in $PATH
4663do
4664  IFS=$as_save_IFS
4665  test -z "$as_dir" && as_dir=.
4666    for ac_exec_ext in '' $ac_executable_extensions; do
4667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4668    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4670    break 2
4671  fi
4672done
4673  done
4674IFS=$as_save_IFS
4675
4676  ;;
4677esac
4678fi
4679FILE=$ac_cv_path_FILE
4680if test -n "$FILE"; then
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4682$as_echo "$FILE" >&6; }
4683else
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4685$as_echo "no" >&6; }
4686fi
4687
4688
4689  test -n "$FILE" && break
4690done
4691
4692
4693    if test "x$FILE" = x; then
4694        if test "xfile" = x; then
4695          PROG_NAME=file
4696        else
4697          PROG_NAME=file
4698        fi
4699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4701        as_fn_error $? "Cannot continue" "$LINENO" 5
4702    fi
4703
4704
4705
4706    for ac_prog in find
4707do
4708  # Extract the first word of "$ac_prog", so it can be a program name with args.
4709set dummy $ac_prog; ac_word=$2
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
4712if test "${ac_cv_path_FIND+set}" = set; then :
4713  $as_echo_n "(cached) " >&6
4714else
4715  case $FIND in
4716  [\\/]* | ?:[\\/]*)
4717  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4718  ;;
4719  *)
4720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in $PATH
4722do
4723  IFS=$as_save_IFS
4724  test -z "$as_dir" && as_dir=.
4725    for ac_exec_ext in '' $ac_executable_extensions; do
4726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4727    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729    break 2
4730  fi
4731done
4732  done
4733IFS=$as_save_IFS
4734
4735  ;;
4736esac
4737fi
4738FIND=$ac_cv_path_FIND
4739if test -n "$FIND"; then
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4741$as_echo "$FIND" >&6; }
4742else
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747
4748  test -n "$FIND" && break
4749done
4750
4751
4752    if test "x$FIND" = x; then
4753        if test "xfind" = x; then
4754          PROG_NAME=find
4755        else
4756          PROG_NAME=find
4757        fi
4758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4760        as_fn_error $? "Cannot continue" "$LINENO" 5
4761    fi
4762
4763
4764
4765    for ac_prog in head
4766do
4767  # Extract the first word of "$ac_prog", so it can be a program name with args.
4768set dummy $ac_prog; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
4771if test "${ac_cv_path_HEAD+set}" = set; then :
4772  $as_echo_n "(cached) " >&6
4773else
4774  case $HEAD in
4775  [\\/]* | ?:[\\/]*)
4776  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4777  ;;
4778  *)
4779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in $PATH
4781do
4782  IFS=$as_save_IFS
4783  test -z "$as_dir" && as_dir=.
4784    for ac_exec_ext in '' $ac_executable_extensions; do
4785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4786    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788    break 2
4789  fi
4790done
4791  done
4792IFS=$as_save_IFS
4793
4794  ;;
4795esac
4796fi
4797HEAD=$ac_cv_path_HEAD
4798if test -n "$HEAD"; then
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4800$as_echo "$HEAD" >&6; }
4801else
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
4804fi
4805
4806
4807  test -n "$HEAD" && break
4808done
4809
4810
4811    if test "x$HEAD" = x; then
4812        if test "xhead" = x; then
4813          PROG_NAME=head
4814        else
4815          PROG_NAME=head
4816        fi
4817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4819        as_fn_error $? "Cannot continue" "$LINENO" 5
4820    fi
4821
4822
4823
4824    for ac_prog in ln
4825do
4826  # Extract the first word of "$ac_prog", so it can be a program name with args.
4827set dummy $ac_prog; ac_word=$2
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if test "${ac_cv_path_LN+set}" = set; then :
4831  $as_echo_n "(cached) " >&6
4832else
4833  case $LN in
4834  [\\/]* | ?:[\\/]*)
4835  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4836  ;;
4837  *)
4838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in $PATH
4840do
4841  IFS=$as_save_IFS
4842  test -z "$as_dir" && as_dir=.
4843    for ac_exec_ext in '' $ac_executable_extensions; do
4844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4845    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847    break 2
4848  fi
4849done
4850  done
4851IFS=$as_save_IFS
4852
4853  ;;
4854esac
4855fi
4856LN=$ac_cv_path_LN
4857if test -n "$LN"; then
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4859$as_echo "$LN" >&6; }
4860else
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866  test -n "$LN" && break
4867done
4868
4869
4870    if test "x$LN" = x; then
4871        if test "xln" = x; then
4872          PROG_NAME=ln
4873        else
4874          PROG_NAME=ln
4875        fi
4876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4878        as_fn_error $? "Cannot continue" "$LINENO" 5
4879    fi
4880
4881
4882
4883    for ac_prog in ls
4884do
4885  # Extract the first word of "$ac_prog", so it can be a program name with args.
4886set dummy $ac_prog; ac_word=$2
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4888$as_echo_n "checking for $ac_word... " >&6; }
4889if test "${ac_cv_path_LS+set}" = set; then :
4890  $as_echo_n "(cached) " >&6
4891else
4892  case $LS in
4893  [\\/]* | ?:[\\/]*)
4894  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4895  ;;
4896  *)
4897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4898for as_dir in $PATH
4899do
4900  IFS=$as_save_IFS
4901  test -z "$as_dir" && as_dir=.
4902    for ac_exec_ext in '' $ac_executable_extensions; do
4903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4904    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4906    break 2
4907  fi
4908done
4909  done
4910IFS=$as_save_IFS
4911
4912  ;;
4913esac
4914fi
4915LS=$ac_cv_path_LS
4916if test -n "$LS"; then
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4918$as_echo "$LS" >&6; }
4919else
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921$as_echo "no" >&6; }
4922fi
4923
4924
4925  test -n "$LS" && break
4926done
4927
4928
4929    if test "x$LS" = x; then
4930        if test "xls" = x; then
4931          PROG_NAME=ls
4932        else
4933          PROG_NAME=ls
4934        fi
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4937        as_fn_error $? "Cannot continue" "$LINENO" 5
4938    fi
4939
4940
4941
4942    for ac_prog in mkdir
4943do
4944  # Extract the first word of "$ac_prog", so it can be a program name with args.
4945set dummy $ac_prog; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if test "${ac_cv_path_MKDIR+set}" = set; then :
4949  $as_echo_n "(cached) " >&6
4950else
4951  case $MKDIR in
4952  [\\/]* | ?:[\\/]*)
4953  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4954  ;;
4955  *)
4956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in $PATH
4958do
4959  IFS=$as_save_IFS
4960  test -z "$as_dir" && as_dir=.
4961    for ac_exec_ext in '' $ac_executable_extensions; do
4962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4963    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965    break 2
4966  fi
4967done
4968  done
4969IFS=$as_save_IFS
4970
4971  ;;
4972esac
4973fi
4974MKDIR=$ac_cv_path_MKDIR
4975if test -n "$MKDIR"; then
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4977$as_echo "$MKDIR" >&6; }
4978else
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983
4984  test -n "$MKDIR" && break
4985done
4986
4987
4988    if test "x$MKDIR" = x; then
4989        if test "xmkdir" = x; then
4990          PROG_NAME=mkdir
4991        else
4992          PROG_NAME=mkdir
4993        fi
4994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4996        as_fn_error $? "Cannot continue" "$LINENO" 5
4997    fi
4998
4999
5000
5001    for ac_prog in mktemp
5002do
5003  # Extract the first word of "$ac_prog", so it can be a program name with args.
5004set dummy $ac_prog; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if test "${ac_cv_path_MKTEMP+set}" = set; then :
5008  $as_echo_n "(cached) " >&6
5009else
5010  case $MKTEMP in
5011  [\\/]* | ?:[\\/]*)
5012  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5013  ;;
5014  *)
5015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018  IFS=$as_save_IFS
5019  test -z "$as_dir" && as_dir=.
5020    for ac_exec_ext in '' $ac_executable_extensions; do
5021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5022    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024    break 2
5025  fi
5026done
5027  done
5028IFS=$as_save_IFS
5029
5030  ;;
5031esac
5032fi
5033MKTEMP=$ac_cv_path_MKTEMP
5034if test -n "$MKTEMP"; then
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5036$as_echo "$MKTEMP" >&6; }
5037else
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042
5043  test -n "$MKTEMP" && break
5044done
5045
5046
5047    if test "x$MKTEMP" = x; then
5048        if test "xmktemp" = x; then
5049          PROG_NAME=mktemp
5050        else
5051          PROG_NAME=mktemp
5052        fi
5053        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5054$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5055        as_fn_error $? "Cannot continue" "$LINENO" 5
5056    fi
5057
5058
5059
5060    for ac_prog in mv
5061do
5062  # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if test "${ac_cv_path_MV+set}" = set; then :
5067  $as_echo_n "(cached) " >&6
5068else
5069  case $MV in
5070  [\\/]* | ?:[\\/]*)
5071  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5072  ;;
5073  *)
5074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077  IFS=$as_save_IFS
5078  test -z "$as_dir" && as_dir=.
5079    for ac_exec_ext in '' $ac_executable_extensions; do
5080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5081    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083    break 2
5084  fi
5085done
5086  done
5087IFS=$as_save_IFS
5088
5089  ;;
5090esac
5091fi
5092MV=$ac_cv_path_MV
5093if test -n "$MV"; then
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5095$as_echo "$MV" >&6; }
5096else
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
5099fi
5100
5101
5102  test -n "$MV" && break
5103done
5104
5105
5106    if test "x$MV" = x; then
5107        if test "xmv" = x; then
5108          PROG_NAME=mv
5109        else
5110          PROG_NAME=mv
5111        fi
5112        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5113$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5114        as_fn_error $? "Cannot continue" "$LINENO" 5
5115    fi
5116
5117
5118
5119    for ac_prog in printf
5120do
5121  # Extract the first word of "$ac_prog", so it can be a program name with args.
5122set dummy $ac_prog; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if test "${ac_cv_path_PRINTF+set}" = set; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $PRINTF in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5140    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151PRINTF=$ac_cv_path_PRINTF
5152if test -n "$PRINTF"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5154$as_echo "$PRINTF" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161  test -n "$PRINTF" && break
5162done
5163
5164
5165    if test "x$PRINTF" = x; then
5166        if test "xprintf" = x; then
5167          PROG_NAME=printf
5168        else
5169          PROG_NAME=printf
5170        fi
5171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5172$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5173        as_fn_error $? "Cannot continue" "$LINENO" 5
5174    fi
5175
5176
5177
5178    for ac_prog in rm
5179do
5180  # Extract the first word of "$ac_prog", so it can be a program name with args.
5181set dummy $ac_prog; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if test "${ac_cv_path_RM+set}" = set; then :
5185  $as_echo_n "(cached) " >&6
5186else
5187  case $RM in
5188  [\\/]* | ?:[\\/]*)
5189  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5190  ;;
5191  *)
5192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5193for as_dir in $PATH
5194do
5195  IFS=$as_save_IFS
5196  test -z "$as_dir" && as_dir=.
5197    for ac_exec_ext in '' $ac_executable_extensions; do
5198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5199    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5201    break 2
5202  fi
5203done
5204  done
5205IFS=$as_save_IFS
5206
5207  ;;
5208esac
5209fi
5210RM=$ac_cv_path_RM
5211if test -n "$RM"; then
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5213$as_echo "$RM" >&6; }
5214else
5215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5216$as_echo "no" >&6; }
5217fi
5218
5219
5220  test -n "$RM" && break
5221done
5222
5223
5224    if test "x$RM" = x; then
5225        if test "xrm" = x; then
5226          PROG_NAME=rm
5227        else
5228          PROG_NAME=rm
5229        fi
5230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5231$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5232        as_fn_error $? "Cannot continue" "$LINENO" 5
5233    fi
5234
5235
5236
5237    for ac_prog in sh
5238do
5239  # Extract the first word of "$ac_prog", so it can be a program name with args.
5240set dummy $ac_prog; ac_word=$2
5241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5242$as_echo_n "checking for $ac_word... " >&6; }
5243if test "${ac_cv_path_SH+set}" = set; then :
5244  $as_echo_n "(cached) " >&6
5245else
5246  case $SH in
5247  [\\/]* | ?:[\\/]*)
5248  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5249  ;;
5250  *)
5251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254  IFS=$as_save_IFS
5255  test -z "$as_dir" && as_dir=.
5256    for ac_exec_ext in '' $ac_executable_extensions; do
5257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5258    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5260    break 2
5261  fi
5262done
5263  done
5264IFS=$as_save_IFS
5265
5266  ;;
5267esac
5268fi
5269SH=$ac_cv_path_SH
5270if test -n "$SH"; then
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5272$as_echo "$SH" >&6; }
5273else
5274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5275$as_echo "no" >&6; }
5276fi
5277
5278
5279  test -n "$SH" && break
5280done
5281
5282
5283    if test "x$SH" = x; then
5284        if test "xsh" = x; then
5285          PROG_NAME=sh
5286        else
5287          PROG_NAME=sh
5288        fi
5289        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5290$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5291        as_fn_error $? "Cannot continue" "$LINENO" 5
5292    fi
5293
5294
5295
5296    for ac_prog in sort
5297do
5298  # Extract the first word of "$ac_prog", so it can be a program name with args.
5299set dummy $ac_prog; ac_word=$2
5300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5301$as_echo_n "checking for $ac_word... " >&6; }
5302if test "${ac_cv_path_SORT+set}" = set; then :
5303  $as_echo_n "(cached) " >&6
5304else
5305  case $SORT in
5306  [\\/]* | ?:[\\/]*)
5307  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5308  ;;
5309  *)
5310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5311for as_dir in $PATH
5312do
5313  IFS=$as_save_IFS
5314  test -z "$as_dir" && as_dir=.
5315    for ac_exec_ext in '' $ac_executable_extensions; do
5316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5317    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5319    break 2
5320  fi
5321done
5322  done
5323IFS=$as_save_IFS
5324
5325  ;;
5326esac
5327fi
5328SORT=$ac_cv_path_SORT
5329if test -n "$SORT"; then
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5331$as_echo "$SORT" >&6; }
5332else
5333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
5335fi
5336
5337
5338  test -n "$SORT" && break
5339done
5340
5341
5342    if test "x$SORT" = x; then
5343        if test "xsort" = x; then
5344          PROG_NAME=sort
5345        else
5346          PROG_NAME=sort
5347        fi
5348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5349$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5350        as_fn_error $? "Cannot continue" "$LINENO" 5
5351    fi
5352
5353
5354
5355    for ac_prog in tail
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if test "${ac_cv_path_TAIL+set}" = set; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $TAIL in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5376    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387TAIL=$ac_cv_path_TAIL
5388if test -n "$TAIL"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5390$as_echo "$TAIL" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$TAIL" && break
5398done
5399
5400
5401    if test "x$TAIL" = x; then
5402        if test "xtail" = x; then
5403          PROG_NAME=tail
5404        else
5405          PROG_NAME=tail
5406        fi
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5408$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5409        as_fn_error $? "Cannot continue" "$LINENO" 5
5410    fi
5411
5412
5413
5414    for ac_prog in tar
5415do
5416  # Extract the first word of "$ac_prog", so it can be a program name with args.
5417set dummy $ac_prog; ac_word=$2
5418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5419$as_echo_n "checking for $ac_word... " >&6; }
5420if test "${ac_cv_path_TAR+set}" = set; then :
5421  $as_echo_n "(cached) " >&6
5422else
5423  case $TAR in
5424  [\\/]* | ?:[\\/]*)
5425  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5426  ;;
5427  *)
5428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5429for as_dir in $PATH
5430do
5431  IFS=$as_save_IFS
5432  test -z "$as_dir" && as_dir=.
5433    for ac_exec_ext in '' $ac_executable_extensions; do
5434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5435    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5437    break 2
5438  fi
5439done
5440  done
5441IFS=$as_save_IFS
5442
5443  ;;
5444esac
5445fi
5446TAR=$ac_cv_path_TAR
5447if test -n "$TAR"; then
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5449$as_echo "$TAR" >&6; }
5450else
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5452$as_echo "no" >&6; }
5453fi
5454
5455
5456  test -n "$TAR" && break
5457done
5458
5459
5460    if test "x$TAR" = x; then
5461        if test "xtar" = x; then
5462          PROG_NAME=tar
5463        else
5464          PROG_NAME=tar
5465        fi
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5467$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5468        as_fn_error $? "Cannot continue" "$LINENO" 5
5469    fi
5470
5471
5472
5473    for ac_prog in tee
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if test "${ac_cv_path_TEE+set}" = set; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $TEE in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5494    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505TEE=$ac_cv_path_TEE
5506if test -n "$TEE"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5508$as_echo "$TEE" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$TEE" && break
5516done
5517
5518
5519    if test "x$TEE" = x; then
5520        if test "xtee" = x; then
5521          PROG_NAME=tee
5522        else
5523          PROG_NAME=tee
5524        fi
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5527        as_fn_error $? "Cannot continue" "$LINENO" 5
5528    fi
5529
5530
5531
5532    for ac_prog in touch
5533do
5534  # Extract the first word of "$ac_prog", so it can be a program name with args.
5535set dummy $ac_prog; ac_word=$2
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5537$as_echo_n "checking for $ac_word... " >&6; }
5538if test "${ac_cv_path_TOUCH+set}" = set; then :
5539  $as_echo_n "(cached) " >&6
5540else
5541  case $TOUCH in
5542  [\\/]* | ?:[\\/]*)
5543  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5544  ;;
5545  *)
5546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5547for as_dir in $PATH
5548do
5549  IFS=$as_save_IFS
5550  test -z "$as_dir" && as_dir=.
5551    for ac_exec_ext in '' $ac_executable_extensions; do
5552  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5553    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5555    break 2
5556  fi
5557done
5558  done
5559IFS=$as_save_IFS
5560
5561  ;;
5562esac
5563fi
5564TOUCH=$ac_cv_path_TOUCH
5565if test -n "$TOUCH"; then
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5567$as_echo "$TOUCH" >&6; }
5568else
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5570$as_echo "no" >&6; }
5571fi
5572
5573
5574  test -n "$TOUCH" && break
5575done
5576
5577
5578    if test "x$TOUCH" = x; then
5579        if test "xtouch" = x; then
5580          PROG_NAME=touch
5581        else
5582          PROG_NAME=touch
5583        fi
5584        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5585$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5586        as_fn_error $? "Cannot continue" "$LINENO" 5
5587    fi
5588
5589
5590
5591    for ac_prog in tr
5592do
5593  # Extract the first word of "$ac_prog", so it can be a program name with args.
5594set dummy $ac_prog; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if test "${ac_cv_path_TR+set}" = set; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $TR in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5612    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623TR=$ac_cv_path_TR
5624if test -n "$TR"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5626$as_echo "$TR" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633  test -n "$TR" && break
5634done
5635
5636
5637    if test "x$TR" = x; then
5638        if test "xtr" = x; then
5639          PROG_NAME=tr
5640        else
5641          PROG_NAME=tr
5642        fi
5643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5644$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5645        as_fn_error $? "Cannot continue" "$LINENO" 5
5646    fi
5647
5648
5649
5650    for ac_prog in uname
5651do
5652  # Extract the first word of "$ac_prog", so it can be a program name with args.
5653set dummy $ac_prog; ac_word=$2
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655$as_echo_n "checking for $ac_word... " >&6; }
5656if test "${ac_cv_path_UNAME+set}" = set; then :
5657  $as_echo_n "(cached) " >&6
5658else
5659  case $UNAME in
5660  [\\/]* | ?:[\\/]*)
5661  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5662  ;;
5663  *)
5664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5665for as_dir in $PATH
5666do
5667  IFS=$as_save_IFS
5668  test -z "$as_dir" && as_dir=.
5669    for ac_exec_ext in '' $ac_executable_extensions; do
5670  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5671    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5673    break 2
5674  fi
5675done
5676  done
5677IFS=$as_save_IFS
5678
5679  ;;
5680esac
5681fi
5682UNAME=$ac_cv_path_UNAME
5683if test -n "$UNAME"; then
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5685$as_echo "$UNAME" >&6; }
5686else
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688$as_echo "no" >&6; }
5689fi
5690
5691
5692  test -n "$UNAME" && break
5693done
5694
5695
5696    if test "x$UNAME" = x; then
5697        if test "xuname" = x; then
5698          PROG_NAME=uname
5699        else
5700          PROG_NAME=uname
5701        fi
5702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5703$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5704        as_fn_error $? "Cannot continue" "$LINENO" 5
5705    fi
5706
5707
5708
5709    for ac_prog in uniq
5710do
5711  # Extract the first word of "$ac_prog", so it can be a program name with args.
5712set dummy $ac_prog; ac_word=$2
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5714$as_echo_n "checking for $ac_word... " >&6; }
5715if test "${ac_cv_path_UNIQ+set}" = set; then :
5716  $as_echo_n "(cached) " >&6
5717else
5718  case $UNIQ in
5719  [\\/]* | ?:[\\/]*)
5720  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5721  ;;
5722  *)
5723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5724for as_dir in $PATH
5725do
5726  IFS=$as_save_IFS
5727  test -z "$as_dir" && as_dir=.
5728    for ac_exec_ext in '' $ac_executable_extensions; do
5729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5730    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5732    break 2
5733  fi
5734done
5735  done
5736IFS=$as_save_IFS
5737
5738  ;;
5739esac
5740fi
5741UNIQ=$ac_cv_path_UNIQ
5742if test -n "$UNIQ"; then
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5744$as_echo "$UNIQ" >&6; }
5745else
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747$as_echo "no" >&6; }
5748fi
5749
5750
5751  test -n "$UNIQ" && break
5752done
5753
5754
5755    if test "x$UNIQ" = x; then
5756        if test "xuniq" = x; then
5757          PROG_NAME=uniq
5758        else
5759          PROG_NAME=uniq
5760        fi
5761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5763        as_fn_error $? "Cannot continue" "$LINENO" 5
5764    fi
5765
5766
5767
5768    for ac_prog in wc
5769do
5770  # Extract the first word of "$ac_prog", so it can be a program name with args.
5771set dummy $ac_prog; ac_word=$2
5772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5773$as_echo_n "checking for $ac_word... " >&6; }
5774if test "${ac_cv_path_WC+set}" = set; then :
5775  $as_echo_n "(cached) " >&6
5776else
5777  case $WC in
5778  [\\/]* | ?:[\\/]*)
5779  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5780  ;;
5781  *)
5782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783for as_dir in $PATH
5784do
5785  IFS=$as_save_IFS
5786  test -z "$as_dir" && as_dir=.
5787    for ac_exec_ext in '' $ac_executable_extensions; do
5788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5789    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5791    break 2
5792  fi
5793done
5794  done
5795IFS=$as_save_IFS
5796
5797  ;;
5798esac
5799fi
5800WC=$ac_cv_path_WC
5801if test -n "$WC"; then
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5803$as_echo "$WC" >&6; }
5804else
5805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5806$as_echo "no" >&6; }
5807fi
5808
5809
5810  test -n "$WC" && break
5811done
5812
5813
5814    if test "x$WC" = x; then
5815        if test "xwc" = x; then
5816          PROG_NAME=wc
5817        else
5818          PROG_NAME=wc
5819        fi
5820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5822        as_fn_error $? "Cannot continue" "$LINENO" 5
5823    fi
5824
5825
5826
5827    for ac_prog in which
5828do
5829  # Extract the first word of "$ac_prog", so it can be a program name with args.
5830set dummy $ac_prog; ac_word=$2
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5832$as_echo_n "checking for $ac_word... " >&6; }
5833if test "${ac_cv_path_WHICH+set}" = set; then :
5834  $as_echo_n "(cached) " >&6
5835else
5836  case $WHICH in
5837  [\\/]* | ?:[\\/]*)
5838  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5839  ;;
5840  *)
5841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844  IFS=$as_save_IFS
5845  test -z "$as_dir" && as_dir=.
5846    for ac_exec_ext in '' $ac_executable_extensions; do
5847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5848    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850    break 2
5851  fi
5852done
5853  done
5854IFS=$as_save_IFS
5855
5856  ;;
5857esac
5858fi
5859WHICH=$ac_cv_path_WHICH
5860if test -n "$WHICH"; then
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5862$as_echo "$WHICH" >&6; }
5863else
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5865$as_echo "no" >&6; }
5866fi
5867
5868
5869  test -n "$WHICH" && break
5870done
5871
5872
5873    if test "x$WHICH" = x; then
5874        if test "xwhich" = x; then
5875          PROG_NAME=which
5876        else
5877          PROG_NAME=which
5878        fi
5879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5881        as_fn_error $? "Cannot continue" "$LINENO" 5
5882    fi
5883
5884
5885
5886    for ac_prog in xargs
5887do
5888  # Extract the first word of "$ac_prog", so it can be a program name with args.
5889set dummy $ac_prog; ac_word=$2
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891$as_echo_n "checking for $ac_word... " >&6; }
5892if test "${ac_cv_path_XARGS+set}" = set; then :
5893  $as_echo_n "(cached) " >&6
5894else
5895  case $XARGS in
5896  [\\/]* | ?:[\\/]*)
5897  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5898  ;;
5899  *)
5900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH
5902do
5903  IFS=$as_save_IFS
5904  test -z "$as_dir" && as_dir=.
5905    for ac_exec_ext in '' $ac_executable_extensions; do
5906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5907    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909    break 2
5910  fi
5911done
5912  done
5913IFS=$as_save_IFS
5914
5915  ;;
5916esac
5917fi
5918XARGS=$ac_cv_path_XARGS
5919if test -n "$XARGS"; then
5920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5921$as_echo "$XARGS" >&6; }
5922else
5923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925fi
5926
5927
5928  test -n "$XARGS" && break
5929done
5930
5931
5932    if test "x$XARGS" = x; then
5933        if test "xxargs" = x; then
5934          PROG_NAME=xargs
5935        else
5936          PROG_NAME=xargs
5937        fi
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5940        as_fn_error $? "Cannot continue" "$LINENO" 5
5941    fi
5942
5943
5944
5945# Then required tools that require some special treatment.
5946for ac_prog in gawk mawk nawk awk
5947do
5948  # Extract the first word of "$ac_prog", so it can be a program name with args.
5949set dummy $ac_prog; ac_word=$2
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5951$as_echo_n "checking for $ac_word... " >&6; }
5952if test "${ac_cv_prog_AWK+set}" = set; then :
5953  $as_echo_n "(cached) " >&6
5954else
5955  if test -n "$AWK"; then
5956  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5957else
5958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5959for as_dir in $PATH
5960do
5961  IFS=$as_save_IFS
5962  test -z "$as_dir" && as_dir=.
5963    for ac_exec_ext in '' $ac_executable_extensions; do
5964  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5965    ac_cv_prog_AWK="$ac_prog"
5966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5967    break 2
5968  fi
5969done
5970  done
5971IFS=$as_save_IFS
5972
5973fi
5974fi
5975AWK=$ac_cv_prog_AWK
5976if test -n "$AWK"; then
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5978$as_echo "$AWK" >&6; }
5979else
5980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
5982fi
5983
5984
5985  test -n "$AWK" && break
5986done
5987
5988
5989    if test "x$AWK" = x; then
5990        if test "x" = x; then
5991          PROG_NAME=awk
5992        else
5993          PROG_NAME=
5994        fi
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5997        as_fn_error $? "Cannot continue" "$LINENO" 5
5998    fi
5999
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6001$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6002if test "${ac_cv_path_GREP+set}" = set; then :
6003  $as_echo_n "(cached) " >&6
6004else
6005  if test -z "$GREP"; then
6006  ac_path_GREP_found=false
6007  # Loop through the user's path and test for each of PROGNAME-LIST
6008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6009for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6010do
6011  IFS=$as_save_IFS
6012  test -z "$as_dir" && as_dir=.
6013    for ac_prog in grep ggrep; do
6014    for ac_exec_ext in '' $ac_executable_extensions; do
6015      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6016      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6017# Check for GNU ac_path_GREP and select it if it is found.
6018  # Check for GNU $ac_path_GREP
6019case `"$ac_path_GREP" --version 2>&1` in
6020*GNU*)
6021  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6022*)
6023  ac_count=0
6024  $as_echo_n 0123456789 >"conftest.in"
6025  while :
6026  do
6027    cat "conftest.in" "conftest.in" >"conftest.tmp"
6028    mv "conftest.tmp" "conftest.in"
6029    cp "conftest.in" "conftest.nl"
6030    $as_echo 'GREP' >> "conftest.nl"
6031    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6032    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6033    as_fn_arith $ac_count + 1 && ac_count=$as_val
6034    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6035      # Best one so far, save it but keep looking for a better one
6036      ac_cv_path_GREP="$ac_path_GREP"
6037      ac_path_GREP_max=$ac_count
6038    fi
6039    # 10*(2^10) chars as input seems more than enough
6040    test $ac_count -gt 10 && break
6041  done
6042  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6043esac
6044
6045      $ac_path_GREP_found && break 3
6046    done
6047  done
6048  done
6049IFS=$as_save_IFS
6050  if test -z "$ac_cv_path_GREP"; then
6051    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6052  fi
6053else
6054  ac_cv_path_GREP=$GREP
6055fi
6056
6057fi
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6059$as_echo "$ac_cv_path_GREP" >&6; }
6060 GREP="$ac_cv_path_GREP"
6061
6062
6063
6064    if test "x$GREP" = x; then
6065        if test "x" = x; then
6066          PROG_NAME=grep
6067        else
6068          PROG_NAME=
6069        fi
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6072        as_fn_error $? "Cannot continue" "$LINENO" 5
6073    fi
6074
6075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6076$as_echo_n "checking for egrep... " >&6; }
6077if test "${ac_cv_path_EGREP+set}" = set; then :
6078  $as_echo_n "(cached) " >&6
6079else
6080  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6081   then ac_cv_path_EGREP="$GREP -E"
6082   else
6083     if test -z "$EGREP"; then
6084  ac_path_EGREP_found=false
6085  # Loop through the user's path and test for each of PROGNAME-LIST
6086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6087for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6088do
6089  IFS=$as_save_IFS
6090  test -z "$as_dir" && as_dir=.
6091    for ac_prog in egrep; do
6092    for ac_exec_ext in '' $ac_executable_extensions; do
6093      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6094      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6095# Check for GNU ac_path_EGREP and select it if it is found.
6096  # Check for GNU $ac_path_EGREP
6097case `"$ac_path_EGREP" --version 2>&1` in
6098*GNU*)
6099  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6100*)
6101  ac_count=0
6102  $as_echo_n 0123456789 >"conftest.in"
6103  while :
6104  do
6105    cat "conftest.in" "conftest.in" >"conftest.tmp"
6106    mv "conftest.tmp" "conftest.in"
6107    cp "conftest.in" "conftest.nl"
6108    $as_echo 'EGREP' >> "conftest.nl"
6109    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6110    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6111    as_fn_arith $ac_count + 1 && ac_count=$as_val
6112    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6113      # Best one so far, save it but keep looking for a better one
6114      ac_cv_path_EGREP="$ac_path_EGREP"
6115      ac_path_EGREP_max=$ac_count
6116    fi
6117    # 10*(2^10) chars as input seems more than enough
6118    test $ac_count -gt 10 && break
6119  done
6120  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6121esac
6122
6123      $ac_path_EGREP_found && break 3
6124    done
6125  done
6126  done
6127IFS=$as_save_IFS
6128  if test -z "$ac_cv_path_EGREP"; then
6129    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6130  fi
6131else
6132  ac_cv_path_EGREP=$EGREP
6133fi
6134
6135   fi
6136fi
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6138$as_echo "$ac_cv_path_EGREP" >&6; }
6139 EGREP="$ac_cv_path_EGREP"
6140
6141
6142
6143    if test "x$EGREP" = x; then
6144        if test "x" = x; then
6145          PROG_NAME=egrep
6146        else
6147          PROG_NAME=
6148        fi
6149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6151        as_fn_error $? "Cannot continue" "$LINENO" 5
6152    fi
6153
6154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6155$as_echo_n "checking for fgrep... " >&6; }
6156if test "${ac_cv_path_FGREP+set}" = set; then :
6157  $as_echo_n "(cached) " >&6
6158else
6159  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6160   then ac_cv_path_FGREP="$GREP -F"
6161   else
6162     if test -z "$FGREP"; then
6163  ac_path_FGREP_found=false
6164  # Loop through the user's path and test for each of PROGNAME-LIST
6165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6167do
6168  IFS=$as_save_IFS
6169  test -z "$as_dir" && as_dir=.
6170    for ac_prog in fgrep; do
6171    for ac_exec_ext in '' $ac_executable_extensions; do
6172      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6173      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6174# Check for GNU ac_path_FGREP and select it if it is found.
6175  # Check for GNU $ac_path_FGREP
6176case `"$ac_path_FGREP" --version 2>&1` in
6177*GNU*)
6178  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6179*)
6180  ac_count=0
6181  $as_echo_n 0123456789 >"conftest.in"
6182  while :
6183  do
6184    cat "conftest.in" "conftest.in" >"conftest.tmp"
6185    mv "conftest.tmp" "conftest.in"
6186    cp "conftest.in" "conftest.nl"
6187    $as_echo 'FGREP' >> "conftest.nl"
6188    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6189    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6190    as_fn_arith $ac_count + 1 && ac_count=$as_val
6191    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6192      # Best one so far, save it but keep looking for a better one
6193      ac_cv_path_FGREP="$ac_path_FGREP"
6194      ac_path_FGREP_max=$ac_count
6195    fi
6196    # 10*(2^10) chars as input seems more than enough
6197    test $ac_count -gt 10 && break
6198  done
6199  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6200esac
6201
6202      $ac_path_FGREP_found && break 3
6203    done
6204  done
6205  done
6206IFS=$as_save_IFS
6207  if test -z "$ac_cv_path_FGREP"; then
6208    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6209  fi
6210else
6211  ac_cv_path_FGREP=$FGREP
6212fi
6213
6214   fi
6215fi
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6217$as_echo "$ac_cv_path_FGREP" >&6; }
6218 FGREP="$ac_cv_path_FGREP"
6219
6220
6221
6222    if test "x$FGREP" = x; then
6223        if test "x" = x; then
6224          PROG_NAME=fgrep
6225        else
6226          PROG_NAME=
6227        fi
6228        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6230        as_fn_error $? "Cannot continue" "$LINENO" 5
6231    fi
6232
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6234$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6235if test "${ac_cv_path_SED+set}" = set; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6239     for ac_i in 1 2 3 4 5 6 7; do
6240       ac_script="$ac_script$as_nl$ac_script"
6241     done
6242     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6243     { ac_script=; unset ac_script;}
6244     if test -z "$SED"; then
6245  ac_path_SED_found=false
6246  # Loop through the user's path and test for each of PROGNAME-LIST
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_prog in sed gsed; do
6253    for ac_exec_ext in '' $ac_executable_extensions; do
6254      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6255      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6256# Check for GNU ac_path_SED and select it if it is found.
6257  # Check for GNU $ac_path_SED
6258case `"$ac_path_SED" --version 2>&1` in
6259*GNU*)
6260  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6261*)
6262  ac_count=0
6263  $as_echo_n 0123456789 >"conftest.in"
6264  while :
6265  do
6266    cat "conftest.in" "conftest.in" >"conftest.tmp"
6267    mv "conftest.tmp" "conftest.in"
6268    cp "conftest.in" "conftest.nl"
6269    $as_echo '' >> "conftest.nl"
6270    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6272    as_fn_arith $ac_count + 1 && ac_count=$as_val
6273    if test $ac_count -gt ${ac_path_SED_max-0}; then
6274      # Best one so far, save it but keep looking for a better one
6275      ac_cv_path_SED="$ac_path_SED"
6276      ac_path_SED_max=$ac_count
6277    fi
6278    # 10*(2^10) chars as input seems more than enough
6279    test $ac_count -gt 10 && break
6280  done
6281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6282esac
6283
6284      $ac_path_SED_found && break 3
6285    done
6286  done
6287  done
6288IFS=$as_save_IFS
6289  if test -z "$ac_cv_path_SED"; then
6290    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6291  fi
6292else
6293  ac_cv_path_SED=$SED
6294fi
6295
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6298$as_echo "$ac_cv_path_SED" >&6; }
6299 SED="$ac_cv_path_SED"
6300  rm -f conftest.sed
6301
6302
6303    if test "x$SED" = x; then
6304        if test "x" = x; then
6305          PROG_NAME=sed
6306        else
6307          PROG_NAME=
6308        fi
6309        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6311        as_fn_error $? "Cannot continue" "$LINENO" 5
6312    fi
6313
6314
6315for ac_prog in nawk gawk awk
6316do
6317  # Extract the first word of "$ac_prog", so it can be a program name with args.
6318set dummy $ac_prog; 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_NAWK+set}" = set; then :
6322  $as_echo_n "(cached) " >&6
6323else
6324  case $NAWK in
6325  [\\/]* | ?:[\\/]*)
6326  ac_cv_path_NAWK="$NAWK" # 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_NAWK="$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
6347NAWK=$ac_cv_path_NAWK
6348if test -n "$NAWK"; then
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6350$as_echo "$NAWK" >&6; }
6351else
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357  test -n "$NAWK" && break
6358done
6359
6360
6361    if test "x$NAWK" = x; then
6362        if test "x" = x; then
6363          PROG_NAME=nawk
6364        else
6365          PROG_NAME=
6366        fi
6367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6369        as_fn_error $? "Cannot continue" "$LINENO" 5
6370    fi
6371
6372
6373# Always force rm.
6374RM="$RM -f"
6375
6376# pwd behaves differently on various platforms and some don't support the -L flag.
6377# Always use the bash builtin pwd to get uniform behavior.
6378THEPWDCMD=pwd
6379
6380# These are not required on all platforms
6381# Extract the first word of "cygpath", so it can be a program name with args.
6382set dummy cygpath; ac_word=$2
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if test "${ac_cv_path_CYGPATH+set}" = set; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  case $CYGPATH in
6389  [\\/]* | ?:[\\/]*)
6390  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6391  ;;
6392  *)
6393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396  IFS=$as_save_IFS
6397  test -z "$as_dir" && as_dir=.
6398    for ac_exec_ext in '' $ac_executable_extensions; do
6399  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6400    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402    break 2
6403  fi
6404done
6405  done
6406IFS=$as_save_IFS
6407
6408  ;;
6409esac
6410fi
6411CYGPATH=$ac_cv_path_CYGPATH
6412if test -n "$CYGPATH"; then
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6414$as_echo "$CYGPATH" >&6; }
6415else
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421# Extract the first word of "readlink", so it can be a program name with args.
6422set dummy readlink; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if test "${ac_cv_path_READLINK+set}" = set; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $READLINK in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6440    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451READLINK=$ac_cv_path_READLINK
6452if test -n "$READLINK"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6454$as_echo "$READLINK" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461# Extract the first word of "df", so it can be a program name with args.
6462set dummy df; ac_word=$2
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464$as_echo_n "checking for $ac_word... " >&6; }
6465if test "${ac_cv_path_DF+set}" = set; then :
6466  $as_echo_n "(cached) " >&6
6467else
6468  case $DF in
6469  [\\/]* | ?:[\\/]*)
6470  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6471  ;;
6472  *)
6473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474for as_dir in $PATH
6475do
6476  IFS=$as_save_IFS
6477  test -z "$as_dir" && as_dir=.
6478    for ac_exec_ext in '' $ac_executable_extensions; do
6479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6480    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482    break 2
6483  fi
6484done
6485  done
6486IFS=$as_save_IFS
6487
6488  ;;
6489esac
6490fi
6491DF=$ac_cv_path_DF
6492if test -n "$DF"; then
6493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6494$as_echo "$DF" >&6; }
6495else
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500
6501# Extract the first word of "SetFile", so it can be a program name with args.
6502set dummy SetFile; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if test "${ac_cv_path_SETFILE+set}" = set; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $SETFILE in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6520    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531SETFILE=$ac_cv_path_SETFILE
6532if test -n "$SETFILE"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6534$as_echo "$SETFILE" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541
6542
6543# Now we can determine OpenJDK build and target platforms. This is required to
6544# have early on.
6545# Make sure we can run config.sub.
6546$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6547  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6548
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6550$as_echo_n "checking build system type... " >&6; }
6551if test "${ac_cv_build+set}" = set; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  ac_build_alias=$build_alias
6555test "x$ac_build_alias" = x &&
6556  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6557test "x$ac_build_alias" = x &&
6558  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6559ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6560  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6561
6562fi
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6564$as_echo "$ac_cv_build" >&6; }
6565case $ac_cv_build in
6566*-*-*) ;;
6567*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6568esac
6569build=$ac_cv_build
6570ac_save_IFS=$IFS; IFS='-'
6571set x $ac_cv_build
6572shift
6573build_cpu=$1
6574build_vendor=$2
6575shift; shift
6576# Remember, the first character of IFS is used to create $*,
6577# except with old shells:
6578build_os=$*
6579IFS=$ac_save_IFS
6580case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6584$as_echo_n "checking host system type... " >&6; }
6585if test "${ac_cv_host+set}" = set; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  if test "x$host_alias" = x; then
6589  ac_cv_host=$ac_cv_build
6590else
6591  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6597$as_echo "$ac_cv_host" >&6; }
6598case $ac_cv_host in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6601esac
6602host=$ac_cv_host
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_host
6605shift
6606host_cpu=$1
6607host_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611host_os=$*
6612IFS=$ac_save_IFS
6613case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6617$as_echo_n "checking target system type... " >&6; }
6618if test "${ac_cv_target+set}" = set; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test "x$target_alias" = x; then
6622  ac_cv_target=$ac_cv_host
6623else
6624  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6626fi
6627
6628fi
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6630$as_echo "$ac_cv_target" >&6; }
6631case $ac_cv_target in
6632*-*-*) ;;
6633*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6634esac
6635target=$ac_cv_target
6636ac_save_IFS=$IFS; IFS='-'
6637set x $ac_cv_target
6638shift
6639target_cpu=$1
6640target_vendor=$2
6641shift; shift
6642# Remember, the first character of IFS is used to create $*,
6643# except with old shells:
6644target_os=$*
6645IFS=$ac_save_IFS
6646case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6647
6648
6649# The aliases save the names the user supplied, while $host etc.
6650# will get canonicalized.
6651test -n "$target_alias" &&
6652  test "$program_prefix$program_suffix$program_transform_name" = \
6653    NONENONEs,x,x, &&
6654  program_prefix=${target_alias}-
6655
6656# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6657# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6658# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6659# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6660# to use the configure naming style.
6661
6662
6663
6664
6665
6666    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6667    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6668    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6669    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6670    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6671    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6672
6673
6674
6675    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6676
6677  case "$build_os" in
6678    *linux*)
6679      VAR_OS=linux
6680      VAR_OS_API=posix
6681      VAR_OS_ENV=linux
6682      ;;
6683    *solaris*)
6684      VAR_OS=solaris
6685      VAR_OS_API=posix
6686      VAR_OS_ENV=solaris
6687      ;;
6688    *darwin*)
6689      VAR_OS=macosx
6690      VAR_OS_API=posix
6691      VAR_OS_ENV=macosx
6692      ;;
6693    *bsd*)
6694      VAR_OS=bsd
6695      VAR_OS_API=posix
6696      VAR_OS_ENV=bsd
6697      ;;
6698    *cygwin*)
6699      VAR_OS=windows
6700      VAR_OS_API=winapi
6701      VAR_OS_ENV=windows.cygwin
6702      ;;
6703    *mingw*)
6704      VAR_OS=windows
6705      VAR_OS_API=winapi
6706      VAR_OS_ENV=windows.msys
6707      ;;
6708    *)
6709      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6710      ;;
6711  esac
6712
6713
6714  # First argument is the cpu name from the trip/quad
6715  case "$build_cpu" in
6716    x86_64)
6717      VAR_CPU=x86_64
6718      VAR_CPU_ARCH=x86
6719      VAR_CPU_BITS=64
6720      VAR_CPU_ENDIAN=little
6721      ;;
6722    i?86)
6723      VAR_CPU=x86
6724      VAR_CPU_ARCH=x86
6725      VAR_CPU_BITS=32
6726      VAR_CPU_ENDIAN=little
6727      ;;
6728    arm*)
6729      VAR_CPU=arm
6730      VAR_CPU_ARCH=arm
6731      VAR_CPU_BITS=32
6732      VAR_CPU_ENDIAN=little
6733      ;;
6734    powerpc)
6735      VAR_CPU=ppc
6736      VAR_CPU_ARCH=ppc
6737      VAR_CPU_BITS=32
6738      VAR_CPU_ENDIAN=big
6739       ;;
6740    powerpc64)
6741      VAR_CPU=ppc64
6742      VAR_CPU_ARCH=ppc
6743      VAR_CPU_BITS=64
6744      VAR_CPU_ENDIAN=big
6745       ;;
6746    sparc)
6747      VAR_CPU=sparc
6748      VAR_CPU_ARCH=sparc
6749      VAR_CPU_BITS=32
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    sparcv9)
6753      VAR_CPU=sparcv9
6754      VAR_CPU_ARCH=sparc
6755      VAR_CPU_BITS=64
6756      VAR_CPU_ENDIAN=big
6757       ;;
6758    *)
6759      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6760      ;;
6761  esac
6762
6763    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6764    OPENJDK_BUILD_OS="$VAR_OS"
6765    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6766    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6767    OPENJDK_BUILD_CPU="$VAR_CPU"
6768    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6769    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6770    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6771
6772
6773
6774
6775
6776
6777
6778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6779$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6781$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6782
6783    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6784
6785  case "$host_os" in
6786    *linux*)
6787      VAR_OS=linux
6788      VAR_OS_API=posix
6789      VAR_OS_ENV=linux
6790      ;;
6791    *solaris*)
6792      VAR_OS=solaris
6793      VAR_OS_API=posix
6794      VAR_OS_ENV=solaris
6795      ;;
6796    *darwin*)
6797      VAR_OS=macosx
6798      VAR_OS_API=posix
6799      VAR_OS_ENV=macosx
6800      ;;
6801    *bsd*)
6802      VAR_OS=bsd
6803      VAR_OS_API=posix
6804      VAR_OS_ENV=bsd
6805      ;;
6806    *cygwin*)
6807      VAR_OS=windows
6808      VAR_OS_API=winapi
6809      VAR_OS_ENV=windows.cygwin
6810      ;;
6811    *mingw*)
6812      VAR_OS=windows
6813      VAR_OS_API=winapi
6814      VAR_OS_ENV=windows.msys
6815      ;;
6816    *)
6817      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6818      ;;
6819  esac
6820
6821
6822  # First argument is the cpu name from the trip/quad
6823  case "$host_cpu" in
6824    x86_64)
6825      VAR_CPU=x86_64
6826      VAR_CPU_ARCH=x86
6827      VAR_CPU_BITS=64
6828      VAR_CPU_ENDIAN=little
6829      ;;
6830    i?86)
6831      VAR_CPU=x86
6832      VAR_CPU_ARCH=x86
6833      VAR_CPU_BITS=32
6834      VAR_CPU_ENDIAN=little
6835      ;;
6836    arm*)
6837      VAR_CPU=arm
6838      VAR_CPU_ARCH=arm
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=little
6841      ;;
6842    powerpc)
6843      VAR_CPU=ppc
6844      VAR_CPU_ARCH=ppc
6845      VAR_CPU_BITS=32
6846      VAR_CPU_ENDIAN=big
6847       ;;
6848    powerpc64)
6849      VAR_CPU=ppc64
6850      VAR_CPU_ARCH=ppc
6851      VAR_CPU_BITS=64
6852      VAR_CPU_ENDIAN=big
6853       ;;
6854    sparc)
6855      VAR_CPU=sparc
6856      VAR_CPU_ARCH=sparc
6857      VAR_CPU_BITS=32
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    sparcv9)
6861      VAR_CPU=sparcv9
6862      VAR_CPU_ARCH=sparc
6863      VAR_CPU_BITS=64
6864      VAR_CPU_ENDIAN=big
6865       ;;
6866    *)
6867      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6868      ;;
6869  esac
6870
6871    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6872    OPENJDK_TARGET_OS="$VAR_OS"
6873    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6874    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6875    OPENJDK_TARGET_CPU="$VAR_CPU"
6876    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6877    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6878    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6879
6880
6881
6882
6883
6884
6885
6886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6887$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6889$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6890
6891
6892
6893# Check whether --with-target-bits was given.
6894if test "${with_target_bits+set}" = set; then :
6895  withval=$with_target_bits;
6896fi
6897
6898
6899  # We have three types of compiles:
6900  # native  == normal compilation, target system == build system
6901  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6902  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6903  #
6904  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6905    # We're doing a proper cross-compilation
6906    COMPILE_TYPE="cross"
6907  else
6908    COMPILE_TYPE="native"
6909  fi
6910
6911  if test "x$with_target_bits" != x; then
6912    if test "x$COMPILE_TYPE" = "xcross"; then
6913      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6914    fi
6915
6916    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6917      # A reduced build is requested
6918      COMPILE_TYPE="reduced"
6919      OPENJDK_TARGET_CPU_BITS=32
6920      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6921        OPENJDK_TARGET_CPU=x86
6922      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6923        OPENJDK_TARGET_CPU=sparc
6924      else
6925        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6926      fi
6927    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6928      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
6929    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6930      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6931$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6932    else
6933      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6934    fi
6935  fi
6936
6937
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6939$as_echo_n "checking compilation type... " >&6; }
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6941$as_echo "$COMPILE_TYPE" >&6; }
6942
6943
6944    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6945       REQUIRED_OS_NAME=SunOS
6946       REQUIRED_OS_VERSION=5.10
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6949       REQUIRED_OS_NAME=Linux
6950       REQUIRED_OS_VERSION=2.6
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6953        REQUIRED_OS_NAME=Windows
6954        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6955            REQUIRED_OS_VERSION=5.2
6956        else
6957            REQUIRED_OS_VERSION=5.1
6958        fi
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6961        REQUIRED_OS_NAME=Darwin
6962        REQUIRED_OS_VERSION=11.2
6963    fi
6964
6965
6966
6967
6968
6969    # Also store the legacy naming of the cpu.
6970    # Ie i586 and amd64 instead of x86 and x86_64
6971    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6972    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6973      OPENJDK_TARGET_CPU_LEGACY="i586"
6974    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6975      # On all platforms except MacOSX replace x86_64 with amd64.
6976      OPENJDK_TARGET_CPU_LEGACY="amd64"
6977    fi
6978
6979
6980    # And the second legacy naming of the cpu.
6981    # Ie i386 and amd64 instead of x86 and x86_64.
6982    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6983    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6984      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6985    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6986      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6987    fi
6988
6989
6990    # This is the name of the cpu (but using i386 and amd64 instead of
6991    # x86 and x86_64, respectively), preceeded by a /, to be used when
6992    # locating libraries. On macosx, it's empty, though.
6993    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6994    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6995        OPENJDK_TARGET_CPU_LIBDIR=""
6996    fi
6997
6998
6999    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7000    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7001    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7002    OPENJDK_TARGET_CPU_ISADIR=""
7003    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7004      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7005          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7006      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7007          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7008      fi
7009    fi
7010
7011
7012    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7013    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7014    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7015      # On linux only, we replace x86 with i386.
7016      OPENJDK_TARGET_CPU_OSARCH="i386"
7017    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      # On all platforms except macosx, we replace x86_64 with amd64.
7019      OPENJDK_TARGET_CPU_OSARCH="amd64"
7020    fi
7021
7022
7023    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7024    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7025      OPENJDK_TARGET_CPU_JLI="i386"
7026    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7027      # On all platforms except macosx, we replace x86_64 with amd64.
7028      OPENJDK_TARGET_CPU_JLI="amd64"
7029    fi
7030    # Now setup the -D flags for building libjli.
7031    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7032    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7033      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7034        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7035      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7036        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7037      fi
7038    fi
7039
7040
7041    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7042    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7043        OPENJDK_TARGET_OS_API_DIR="solaris"
7044    fi
7045    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7046        OPENJDK_TARGET_OS_API_DIR="windows"
7047    fi
7048
7049
7050    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7051        A_LP64="LP64:="
7052        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7053        # unpack200.exe
7054        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7055            ADD_LP64="-D_LP64=1"
7056        fi
7057    fi
7058    LP64=$A_LP64
7059
7060
7061    if test "x$COMPILE_TYPE" = "xcross"; then
7062      # FIXME: ... or should this include reduced builds..?
7063      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7064    else
7065      DEFINE_CROSS_COMPILE_ARCH=""
7066    fi
7067
7068
7069    # ZERO_ARCHDEF is used to enable architecture-specific code
7070    case "${OPENJDK_TARGET_CPU}" in
7071      ppc*)    ZERO_ARCHDEF=PPC   ;;
7072      s390*)   ZERO_ARCHDEF=S390  ;;
7073      sparc*)  ZERO_ARCHDEF=SPARC ;;
7074      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7075      x86)     ZERO_ARCHDEF=IA32  ;;
7076      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7077    esac
7078
7079
7080
7081
7082
7083# Continue setting up basic stuff. Most remaining code require fundamental tools.
7084
7085# Locate the directory of this script.
7086SCRIPT="$0"
7087AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7088
7089# Where is the source? It is located two levels above the configure script.
7090CURDIR="$PWD"
7091cd "$AUTOCONF_DIR/../.."
7092SRC_ROOT="`$THEPWDCMD -L`"
7093
7094if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7095  PATH_SEP=";"
7096
7097  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7098  if test $SRC_ROOT_LENGTH -gt 100; then
7099      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7100  fi
7101
7102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7104$as_echo_n "checking cygwin release... " >&6; }
7105    CYGWIN_VERSION=`$UNAME -r`
7106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7107$as_echo "$CYGWIN_VERSION" >&6; }
7108    WINDOWS_ENV_VENDOR='cygwin'
7109    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7110
7111    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7112    if test "x$CYGWIN_VERSION_OK" = x; then
7113      { $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
7114$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;}
7115      as_fn_error $? "Cannot continue" "$LINENO" 5
7116    fi
7117    if test "x$CYGPATH" = x; then
7118        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7119    fi
7120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7121$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7122    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7123    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7124    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7125    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7127$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7128    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7129    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7130    if test "x$test_cygdrive_prefix" = x; then
7131        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7132    fi
7133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7135$as_echo_n "checking msys release... " >&6; }
7136    MSYS_VERSION=`$UNAME -r`
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7138$as_echo "$MSYS_VERSION" >&6; }
7139
7140    WINDOWS_ENV_VENDOR='msys'
7141    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7142
7143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7144$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7145    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7146    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7147
7148  windows_path="$MSYS_ROOT_PATH"
7149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7150    unix_path=`$CYGPATH -u "$windows_path"`
7151    MSYS_ROOT_PATH="$unix_path"
7152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7154    MSYS_ROOT_PATH="$unix_path"
7155  fi
7156
7157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7158$as_echo "$MSYS_ROOT_PATH" >&6; }
7159    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7160  else
7161    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7162  fi
7163
7164  # Test if windows or unix (cygwin/msys) find is first in path.
7165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7166$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7167  FIND_BINARY_OUTPUT=`find --version 2>&1`
7168  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7170$as_echo "unix style" >&6; }
7171  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7173$as_echo "Windows" >&6; }
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7175$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7176    { $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
7177$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7178    as_fn_error $? "Cannot continue" "$LINENO" 5
7179  else
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7181$as_echo "unknown" >&6; }
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7183$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7184  fi
7185
7186else
7187  PATH_SEP=":"
7188fi
7189
7190
7191
7192cd "$CURDIR"
7193
7194
7195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7196
7197  # Input might be given as Windows format, start by converting to
7198  # unix format.
7199  path="$SRC_ROOT"
7200  new_path=`$CYGPATH -u "$path"`
7201
7202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7205  # "foo.exe" is OK but "foo" is an error.
7206  #
7207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7208  # It is also a way to make sure we got the proper file name for the real test later on.
7209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7210  if test "x$test_shortpath" = x; then
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7212$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7213    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7214  fi
7215
7216  # Call helper function which possibly converts this using DOS-style short mode.
7217  # If so, the updated path is stored in $new_path.
7218
7219  input_path="$new_path"
7220  # Check if we need to convert this using DOS-style short mode. If the path
7221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7222  # take no chances and rewrite it.
7223  # Note: m4 eats our [], so we need to use [ and ] instead.
7224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7225  if test "x$has_forbidden_chars" != x; then
7226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7230      # Going to short mode and back again did indeed matter. Since short mode is
7231      # case insensitive, let's make it lowercase to improve readability.
7232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7233      # Now convert it back to Unix-stile (cygpath)
7234      input_path=`$CYGPATH -u "$shortmode_path"`
7235      new_path="$input_path"
7236    fi
7237  fi
7238
7239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7240  if test "x$test_cygdrive_prefix" = x; then
7241    # As a simple fix, exclude /usr/bin since it's not a real path.
7242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7244      # a path prefixed by /cygdrive for fixpath to work.
7245      new_path="$CYGWIN_ROOT_PATH$input_path"
7246    fi
7247  fi
7248
7249
7250  if test "x$path" != "x$new_path"; then
7251    SRC_ROOT="$new_path"
7252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7253$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7254  fi
7255
7256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7257
7258  path="$SRC_ROOT"
7259  has_colon=`$ECHO $path | $GREP ^.:`
7260  new_path="$path"
7261  if test "x$has_colon" = x; then
7262    # Not in mixed or Windows style, start by that.
7263    new_path=`cmd //c echo $path`
7264  fi
7265
7266
7267  input_path="$new_path"
7268  # Check if we need to convert this using DOS-style short mode. If the path
7269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7270  # take no chances and rewrite it.
7271  # Note: m4 eats our [], so we need to use [ and ] instead.
7272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7273  if test "x$has_forbidden_chars" != x; then
7274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7276  fi
7277
7278
7279  windows_path="$new_path"
7280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7281    unix_path=`$CYGPATH -u "$windows_path"`
7282    new_path="$unix_path"
7283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7285    new_path="$unix_path"
7286  fi
7287
7288  if test "x$path" != "x$new_path"; then
7289    SRC_ROOT="$new_path"
7290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7291$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7292  fi
7293
7294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7296
7297  else
7298    # We're on a posix platform. Hooray! :)
7299    path="$SRC_ROOT"
7300    has_space=`$ECHO "$path" | $GREP " "`
7301    if test "x$has_space" != x; then
7302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7303$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7304      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7305    fi
7306
7307    # Use eval to expand a potential ~
7308    eval path="$path"
7309    if test ! -f "$path" && test ! -d "$path"; then
7310      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7311    fi
7312
7313    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7314  fi
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$CURDIR"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    CURDIR="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$CURDIR"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    CURDIR="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$CURDIR"
7422    has_space=`$ECHO "$path" | $GREP " "`
7423    if test "x$has_space" != x; then
7424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7425$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7427    fi
7428
7429    # Use eval to expand a potential ~
7430    eval path="$path"
7431    if test ! -f "$path" && test ! -d "$path"; then
7432      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7433    fi
7434
7435    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7436  fi
7437
7438
7439if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7440    # Add extra search paths on solaris for utilities like ar and as etc...
7441    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7442fi
7443
7444# You can force the sys-root if the sys-root encoded into the cross compiler tools
7445# is not correct.
7446
7447# Check whether --with-sys-root was given.
7448if test "${with_sys_root+set}" = set; then :
7449  withval=$with_sys_root;
7450fi
7451
7452
7453if test "x$with_sys_root" != x; then
7454  SYS_ROOT=$with_sys_root
7455else
7456  SYS_ROOT=/
7457fi
7458
7459
7460
7461# Check whether --with-tools-dir was given.
7462if test "${with_tools_dir+set}" = set; then :
7463  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7464
7465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7466
7467  # Input might be given as Windows format, start by converting to
7468  # unix format.
7469  path="$TOOLS_DIR"
7470  new_path=`$CYGPATH -u "$path"`
7471
7472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7475  # "foo.exe" is OK but "foo" is an error.
7476  #
7477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7478  # It is also a way to make sure we got the proper file name for the real test later on.
7479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7480  if test "x$test_shortpath" = x; then
7481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5
7482$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;}
7483    as_fn_error $? "Cannot locate the the path of TOOLS_DIR" "$LINENO" 5
7484  fi
7485
7486  # Call helper function which possibly converts this using DOS-style short mode.
7487  # If so, the updated path is stored in $new_path.
7488
7489  input_path="$new_path"
7490  # Check if we need to convert this using DOS-style short mode. If the path
7491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7492  # take no chances and rewrite it.
7493  # Note: m4 eats our [], so we need to use [ and ] instead.
7494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7495  if test "x$has_forbidden_chars" != x; then
7496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7500      # Going to short mode and back again did indeed matter. Since short mode is
7501      # case insensitive, let's make it lowercase to improve readability.
7502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7503      # Now convert it back to Unix-stile (cygpath)
7504      input_path=`$CYGPATH -u "$shortmode_path"`
7505      new_path="$input_path"
7506    fi
7507  fi
7508
7509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7510  if test "x$test_cygdrive_prefix" = x; then
7511    # As a simple fix, exclude /usr/bin since it's not a real path.
7512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7514      # a path prefixed by /cygdrive for fixpath to work.
7515      new_path="$CYGWIN_ROOT_PATH$input_path"
7516    fi
7517  fi
7518
7519
7520  if test "x$path" != "x$new_path"; then
7521    TOOLS_DIR="$new_path"
7522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5
7523$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;}
7524  fi
7525
7526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7527
7528  path="$TOOLS_DIR"
7529  has_colon=`$ECHO $path | $GREP ^.:`
7530  new_path="$path"
7531  if test "x$has_colon" = x; then
7532    # Not in mixed or Windows style, start by that.
7533    new_path=`cmd //c echo $path`
7534  fi
7535
7536
7537  input_path="$new_path"
7538  # Check if we need to convert this using DOS-style short mode. If the path
7539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7540  # take no chances and rewrite it.
7541  # Note: m4 eats our [], so we need to use [ and ] instead.
7542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7543  if test "x$has_forbidden_chars" != x; then
7544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7546  fi
7547
7548
7549  windows_path="$new_path"
7550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7551    unix_path=`$CYGPATH -u "$windows_path"`
7552    new_path="$unix_path"
7553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7555    new_path="$unix_path"
7556  fi
7557
7558  if test "x$path" != "x$new_path"; then
7559    TOOLS_DIR="$new_path"
7560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOOLS_DIR to \"$new_path\"" >&5
7561$as_echo "$as_me: Rewriting TOOLS_DIR to \"$new_path\"" >&6;}
7562  fi
7563
7564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7566
7567  else
7568    # We're on a posix platform. Hooray! :)
7569    path="$TOOLS_DIR"
7570    has_space=`$ECHO "$path" | $GREP " "`
7571    if test "x$has_space" != x; then
7572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&5
7573$as_echo "$as_me: The path of TOOLS_DIR, which resolves as \"$path\", is invalid." >&6;}
7574      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7575    fi
7576
7577    # Use eval to expand a potential ~
7578    eval path="$path"
7579    if test ! -f "$path" && test ! -d "$path"; then
7580      as_fn_error $? "The path of TOOLS_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
7581    fi
7582
7583    TOOLS_DIR="`cd "$path"; $THEPWDCMD -L`"
7584  fi
7585
7586
7587fi
7588
7589
7590
7591# Check whether --with-devkit was given.
7592if test "${with_devkit+set}" = set; then :
7593  withval=$with_devkit;
7594    if test "x$with_sys_root" != x; then
7595      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7596    fi
7597
7598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7599
7600  # Input might be given as Windows format, start by converting to
7601  # unix format.
7602  path="$with_devkit"
7603  new_path=`$CYGPATH -u "$path"`
7604
7605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7608  # "foo.exe" is OK but "foo" is an error.
7609  #
7610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7611  # It is also a way to make sure we got the proper file name for the real test later on.
7612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7613  if test "x$test_shortpath" = x; then
7614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7615$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7616    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7617  fi
7618
7619  # Call helper function which possibly converts this using DOS-style short mode.
7620  # If so, the updated path is stored in $new_path.
7621
7622  input_path="$new_path"
7623  # Check if we need to convert this using DOS-style short mode. If the path
7624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7625  # take no chances and rewrite it.
7626  # Note: m4 eats our [], so we need to use [ and ] instead.
7627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7628  if test "x$has_forbidden_chars" != x; then
7629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7633      # Going to short mode and back again did indeed matter. Since short mode is
7634      # case insensitive, let's make it lowercase to improve readability.
7635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7636      # Now convert it back to Unix-stile (cygpath)
7637      input_path=`$CYGPATH -u "$shortmode_path"`
7638      new_path="$input_path"
7639    fi
7640  fi
7641
7642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7643  if test "x$test_cygdrive_prefix" = x; then
7644    # As a simple fix, exclude /usr/bin since it's not a real path.
7645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7647      # a path prefixed by /cygdrive for fixpath to work.
7648      new_path="$CYGWIN_ROOT_PATH$input_path"
7649    fi
7650  fi
7651
7652
7653  if test "x$path" != "x$new_path"; then
7654    with_devkit="$new_path"
7655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7656$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7657  fi
7658
7659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7660
7661  path="$with_devkit"
7662  has_colon=`$ECHO $path | $GREP ^.:`
7663  new_path="$path"
7664  if test "x$has_colon" = x; then
7665    # Not in mixed or Windows style, start by that.
7666    new_path=`cmd //c echo $path`
7667  fi
7668
7669
7670  input_path="$new_path"
7671  # Check if we need to convert this using DOS-style short mode. If the path
7672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7673  # take no chances and rewrite it.
7674  # Note: m4 eats our [], so we need to use [ and ] instead.
7675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7676  if test "x$has_forbidden_chars" != x; then
7677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7679  fi
7680
7681
7682  windows_path="$new_path"
7683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7684    unix_path=`$CYGPATH -u "$windows_path"`
7685    new_path="$unix_path"
7686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7688    new_path="$unix_path"
7689  fi
7690
7691  if test "x$path" != "x$new_path"; then
7692    with_devkit="$new_path"
7693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7694$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7695  fi
7696
7697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7699
7700  else
7701    # We're on a posix platform. Hooray! :)
7702    path="$with_devkit"
7703    has_space=`$ECHO "$path" | $GREP " "`
7704    if test "x$has_space" != x; then
7705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7706$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7707      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7708    fi
7709
7710    # Use eval to expand a potential ~
7711    eval path="$path"
7712    if test ! -f "$path" && test ! -d "$path"; then
7713      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7714    fi
7715
7716    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7717  fi
7718
7719
7720  if test "x$TOOLS_DIR" = x; then
7721    TOOLS_DIR="$with_devkit/bin"
7722  else
7723    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7724  fi
7725
7726    if test -d "$with_devkit/$host_alias/libc"; then
7727      SYS_ROOT=$with_devkit/$host_alias/libc
7728    elif test -d "$with_devkit/$host/sys-root"; then
7729      SYS_ROOT=$with_devkit/$host/sys-root
7730    fi
7731
7732fi
7733
7734
7735
7736# Setup default logging of stdout and stderr to build.log in the output root.
7737BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7738BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7739BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7740
7741
7742
7743
7744
7745# Check if it's a pure open build or if custom sources are to be used.
7746
7747  # Check whether --enable-openjdk-only was given.
7748if test "${enable_openjdk_only+set}" = set; then :
7749  enableval=$enable_openjdk_only;
7750else
7751  enable_openjdk_only="no"
7752fi
7753
7754
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7756$as_echo_n "checking for presence of closed sources... " >&6; }
7757  if test -d "$SRC_ROOT/jdk/src/closed"; then
7758    CLOSED_SOURCE_PRESENT=yes
7759  else
7760    CLOSED_SOURCE_PRESENT=no
7761  fi
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7763$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7764
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7766$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7767  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7769$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7770
7771  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7772    OPENJDK=true
7773    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7774      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7775$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7776    fi
7777  else
7778    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7779      OPENJDK=true
7780    else
7781      OPENJDK=false
7782    fi
7783  fi
7784
7785  if test "x$OPENJDK" = "xtrue"; then
7786    SET_OPENJDK="OPENJDK=true"
7787  fi
7788
7789
7790
7791
7792# These are needed to be able to create a configuration name (and thus the output directory)
7793
7794###############################################################################
7795#
7796# Check which variant of the JDK that we want to build.
7797# Currently we have:
7798#    normal:   standard edition
7799# but the custom make system may add other variants
7800#
7801# Effectively the JDK variant gives a name to a specific set of
7802# modules to compile into the JDK. In the future, these modules
7803# might even be Jigsaw modules.
7804#
7805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7806$as_echo_n "checking which variant of the JDK to build... " >&6; }
7807
7808# Check whether --with-jdk-variant was given.
7809if test "${with_jdk_variant+set}" = set; then :
7810  withval=$with_jdk_variant;
7811fi
7812
7813
7814if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7815    JDK_VARIANT="normal"
7816else
7817    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7818fi
7819
7820
7821
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7823$as_echo "$JDK_VARIANT" >&6; }
7824
7825
7826
7827###############################################################################
7828#
7829# Check which variants of the JVM that we want to build.
7830# Currently we have:
7831#    server: normal interpreter and a tiered C1/C2 compiler
7832#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7833#    minimal1: reduced form of client with optional VM services and features stripped out
7834#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7835#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7836#    zero: no machine code interpreter, no compiler
7837#    zeroshark: zero interpreter and shark/llvm compiler backend
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7839$as_echo_n "checking which variants of the JVM to build... " >&6; }
7840
7841# Check whether --with-jvm-variants was given.
7842if test "${with_jvm_variants+set}" = set; then :
7843  withval=$with_jvm_variants;
7844fi
7845
7846
7847if test "x$with_jvm_variants" = x; then
7848     with_jvm_variants="server"
7849fi
7850
7851JVM_VARIANTS=",$with_jvm_variants,"
7852TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7853
7854if test "x$TEST_VARIANTS" != "x,"; then
7855   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7856fi
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7858$as_echo "$with_jvm_variants" >&6; }
7859
7860JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7861JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7862JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7863JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7864JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7865JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7866
7867if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7868    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7869        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7870    fi
7871fi
7872if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7873    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7874        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7875    fi
7876fi
7877if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7878    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7879        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7880    fi
7881fi
7882
7883# Replace the commas with AND for use in the build directory name.
7884ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7885COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7886if test "x$COUNT_VARIANTS" != "x,1"; then
7887    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7888else
7889    BUILDING_MULTIPLE_JVM_VARIANTS=no
7890fi
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900INCLUDE_SA=true
7901if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7902    INCLUDE_SA=false
7903fi
7904if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7905    INCLUDE_SA=false
7906fi
7907
7908
7909if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7910   MACOSX_UNIVERSAL="true"
7911fi
7912
7913
7914
7915
7916
7917###############################################################################
7918#
7919# Set the debug level
7920#    release: no debug information, all optimizations, no asserts.
7921#    fastdebug: debug information (-g), all optimizations, all asserts
7922#    slowdebug: debug information (-g), no optimizations, all asserts
7923#
7924DEBUG_LEVEL="release"
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7926$as_echo_n "checking which debug level to use... " >&6; }
7927# Check whether --enable-debug was given.
7928if test "${enable_debug+set}" = set; then :
7929  enableval=$enable_debug;
7930        ENABLE_DEBUG="${enableval}"
7931        DEBUG_LEVEL="fastdebug"
7932
7933else
7934  ENABLE_DEBUG="no"
7935fi
7936
7937
7938
7939# Check whether --with-debug-level was given.
7940if test "${with_debug_level+set}" = set; then :
7941  withval=$with_debug_level;
7942        DEBUG_LEVEL="${withval}"
7943        if test "x$ENABLE_DEBUG" = xyes; then
7944			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7945        fi
7946
7947fi
7948
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7950$as_echo "$DEBUG_LEVEL" >&6; }
7951
7952if test "x$DEBUG_LEVEL" != xrelease && \
7953   test "x$DEBUG_LEVEL" != xfastdebug && \
7954   test "x$DEBUG_LEVEL" != xslowdebug; then
7955   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7956fi
7957
7958
7959###############################################################################
7960#
7961# Setup legacy vars/targets and new vars to deal with different debug levels.
7962#
7963
7964case $DEBUG_LEVEL in
7965      release )
7966          VARIANT="OPT"
7967          FASTDEBUG="false"
7968          DEBUG_CLASSFILES="false"
7969          BUILD_VARIANT_RELEASE=""
7970          HOTSPOT_DEBUG_LEVEL="product"
7971          HOTSPOT_EXPORT="product"
7972           ;;
7973      fastdebug )
7974          VARIANT="DBG"
7975          FASTDEBUG="true"
7976          DEBUG_CLASSFILES="true"
7977          BUILD_VARIANT_RELEASE="-fastdebug"
7978          HOTSPOT_DEBUG_LEVEL="fastdebug"
7979          HOTSPOT_EXPORT="fastdebug"
7980           ;;
7981      slowdebug )
7982          VARIANT="DBG"
7983          FASTDEBUG="false"
7984          DEBUG_CLASSFILES="true"
7985          BUILD_VARIANT_RELEASE="-debug"
7986          HOTSPOT_DEBUG_LEVEL="jvmg"
7987          HOTSPOT_EXPORT="debug"
7988           ;;
7989esac
7990
7991#####
7992# Generate the legacy makefile targets for hotspot.
7993# The hotspot api for selecting the build artifacts, really, needs to be improved.
7994# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7995# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7996# But until then ...
7997HOTSPOT_TARGET=""
7998
7999if test "x$JVM_VARIANT_SERVER" = xtrue; then
8000    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8001fi
8002
8003if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8004    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8005fi
8006
8007if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8008    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8009fi
8010
8011if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8012    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8013fi
8014
8015if test "x$JVM_VARIANT_ZERO" = xtrue; then
8016    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8017fi
8018
8019if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8020    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8021fi
8022
8023HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8024
8025# On Macosx universal binaries are produced, but they only contain
8026# 64 bit intel. This invalidates control of which jvms are built
8027# from configure, but only server is valid anyway. Fix this
8028# when hotspot makefiles are rewritten.
8029if test "x$MACOSX_UNIVERSAL" = xtrue; then
8030    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8031fi
8032
8033#####
8034
8035
8036
8037
8038
8039
8040
8041
8042# With basic setup done, call the custom early hook.
8043
8044
8045# To properly create a configuration name, we need to have the OpenJDK target
8046# and options (variants and debug level) parsed.
8047
8048
8049
8050# Check whether --with-conf-name was given.
8051if test "${with_conf_name+set}" = set; then :
8052  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8053fi
8054
8055
8056# Test from where we are running configure, in or outside of src root.
8057if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8058        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8059        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8060    # We are running configure from the src root.
8061    # Create a default ./build/target-variant-debuglevel output root.
8062    if test "x${CONF_NAME}" = x; then
8063        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8064    fi
8065    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8066    $MKDIR -p "$OUTPUT_ROOT"
8067    if test ! -d "$OUTPUT_ROOT"; then
8068        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8069    fi
8070else
8071    # We are running configure from outside of the src dir.
8072    # Then use the current directory as output dir!
8073    # If configuration is situated in normal build directory, just use the build
8074    # directory name as configuration name, otherwise use the complete path.
8075    if test "x${CONF_NAME}" = x; then
8076        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8077    fi
8078    OUTPUT_ROOT="$CURDIR"
8079
8080    # WARNING: This might be a bad thing to do. You need to be sure you want to
8081    # have a configuration in this directory. Do some sanity checks!
8082
8083    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8084      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8085      # other files
8086      files_present=`$LS $OUTPUT_ROOT`
8087      # Configure has already touched config.log and confdefs.h in the current dir when this check
8088      # is performed.
8089      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8090                                             | $TR -d '\n'`
8091      if test "x$filtered_files" != x; then
8092        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8093$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8094        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8095$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8096        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8097$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8099$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8100        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8101$as_echo "$as_me: seriously mess up just about everything." >&6;}
8102        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8103$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8104        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8105$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8106        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8107      fi
8108    fi
8109fi
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8111$as_echo_n "checking what configuration name to use... " >&6; }
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8113$as_echo "$CONF_NAME" >&6; }
8114
8115
8116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8117
8118  # Input might be given as Windows format, start by converting to
8119  # unix format.
8120  path="$OUTPUT_ROOT"
8121  new_path=`$CYGPATH -u "$path"`
8122
8123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8126  # "foo.exe" is OK but "foo" is an error.
8127  #
8128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8129  # It is also a way to make sure we got the proper file name for the real test later on.
8130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8131  if test "x$test_shortpath" = x; then
8132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8133$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8134    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8135  fi
8136
8137  # Call helper function which possibly converts this using DOS-style short mode.
8138  # If so, the updated path is stored in $new_path.
8139
8140  input_path="$new_path"
8141  # Check if we need to convert this using DOS-style short mode. If the path
8142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8143  # take no chances and rewrite it.
8144  # Note: m4 eats our [], so we need to use [ and ] instead.
8145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8146  if test "x$has_forbidden_chars" != x; then
8147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8151      # Going to short mode and back again did indeed matter. Since short mode is
8152      # case insensitive, let's make it lowercase to improve readability.
8153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8154      # Now convert it back to Unix-stile (cygpath)
8155      input_path=`$CYGPATH -u "$shortmode_path"`
8156      new_path="$input_path"
8157    fi
8158  fi
8159
8160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8161  if test "x$test_cygdrive_prefix" = x; then
8162    # As a simple fix, exclude /usr/bin since it's not a real path.
8163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8165      # a path prefixed by /cygdrive for fixpath to work.
8166      new_path="$CYGWIN_ROOT_PATH$input_path"
8167    fi
8168  fi
8169
8170
8171  if test "x$path" != "x$new_path"; then
8172    OUTPUT_ROOT="$new_path"
8173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8174$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8175  fi
8176
8177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8178
8179  path="$OUTPUT_ROOT"
8180  has_colon=`$ECHO $path | $GREP ^.:`
8181  new_path="$path"
8182  if test "x$has_colon" = x; then
8183    # Not in mixed or Windows style, start by that.
8184    new_path=`cmd //c echo $path`
8185  fi
8186
8187
8188  input_path="$new_path"
8189  # Check if we need to convert this using DOS-style short mode. If the path
8190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8191  # take no chances and rewrite it.
8192  # Note: m4 eats our [], so we need to use [ and ] instead.
8193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8194  if test "x$has_forbidden_chars" != x; then
8195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8197  fi
8198
8199
8200  windows_path="$new_path"
8201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8202    unix_path=`$CYGPATH -u "$windows_path"`
8203    new_path="$unix_path"
8204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8206    new_path="$unix_path"
8207  fi
8208
8209  if test "x$path" != "x$new_path"; then
8210    OUTPUT_ROOT="$new_path"
8211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8212$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8213  fi
8214
8215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8217
8218  else
8219    # We're on a posix platform. Hooray! :)
8220    path="$OUTPUT_ROOT"
8221    has_space=`$ECHO "$path" | $GREP " "`
8222    if test "x$has_space" != x; then
8223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8224$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8225      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8226    fi
8227
8228    # Use eval to expand a potential ~
8229    eval path="$path"
8230    if test ! -f "$path" && test ! -d "$path"; then
8231      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8232    fi
8233
8234    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8235  fi
8236
8237
8238SPEC=$OUTPUT_ROOT/spec.gmk
8239
8240CONF_NAME=$CONF_NAME
8241
8242OUTPUT_ROOT=$OUTPUT_ROOT
8243
8244
8245# Most of the probed defines are put into config.h
8246ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8247
8248# The spec.gmk file contains all variables for the make system.
8249ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8250
8251# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8252ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8253
8254# The bootcycle-spec.gmk file contains support for boot cycle builds.
8255ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8256
8257# The compare.sh is used to compare the build output to other builds.
8258ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8259
8260# Spec.sh is currently used by compare-objects.sh
8261ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8262
8263# The generated Makefile knows where the spec.gmk is and where the source is.
8264# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8265# which will look for generated configurations
8266ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8267
8268
8269# Save the arguments given to us
8270echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8271
8272
8273# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8274
8275    for ac_prog in apt-get yum port pkgutil pkgadd
8276do
8277  # Extract the first word of "$ac_prog", so it can be a program name with args.
8278set dummy $ac_prog; ac_word=$2
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8280$as_echo_n "checking for $ac_word... " >&6; }
8281if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8282  $as_echo_n "(cached) " >&6
8283else
8284  if test -n "$PKGHANDLER"; then
8285  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8286else
8287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8288for as_dir in $PATH
8289do
8290  IFS=$as_save_IFS
8291  test -z "$as_dir" && as_dir=.
8292    for ac_exec_ext in '' $ac_executable_extensions; do
8293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8294    ac_cv_prog_PKGHANDLER="$ac_prog"
8295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8296    break 2
8297  fi
8298done
8299  done
8300IFS=$as_save_IFS
8301
8302fi
8303fi
8304PKGHANDLER=$ac_cv_prog_PKGHANDLER
8305if test -n "$PKGHANDLER"; then
8306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8307$as_echo "$PKGHANDLER" >&6; }
8308else
8309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8310$as_echo "no" >&6; }
8311fi
8312
8313
8314  test -n "$PKGHANDLER" && break
8315done
8316
8317
8318
8319# Setup tools that requires more complex handling, or that is not needed by the configure script.
8320
8321
8322  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8323  if test "x$MAKE" != x; then
8324    # User has supplied a make, test it.
8325    if test ! -f "$MAKE"; then
8326      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8327    fi
8328
8329  MAKE_CANDIDATE=""$MAKE""
8330  DESCRIPTION="user supplied MAKE=$MAKE"
8331  if test "x$MAKE_CANDIDATE" != x; then
8332    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8333$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8334    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8335    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8336    if test "x$IS_GNU_MAKE" = x; then
8337      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8338$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8339    else
8340      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8341      if test "x$IS_MODERN_MAKE" = x; then
8342        { $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
8343$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;}
8344      else
8345        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8346          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8347            MAKE_EXPECTED_ENV='cygwin'
8348          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8349            MAKE_EXPECTED_ENV='msys'
8350          else
8351            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8352          fi
8353          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8354          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8355        else
8356          # Not relevant for non-Windows
8357          IS_MAKE_CORRECT_ENV=true
8358        fi
8359        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8360          { $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
8361$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;}
8362        else
8363          FOUND_MAKE=$MAKE_CANDIDATE
8364
8365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8366
8367  # First separate the path from the arguments. This will split at the first
8368  # space.
8369  complete="$FOUND_MAKE"
8370  path="${complete%% *}"
8371  tmp="$complete EOL"
8372  arguments="${tmp#* }"
8373
8374  # Input might be given as Windows format, start by converting to
8375  # unix format.
8376  new_path=`$CYGPATH -u "$path"`
8377
8378  # Now try to locate executable using which
8379  new_path=`$WHICH "$new_path" 2> /dev/null`
8380  # bat and cmd files are not always considered executable in cygwin causing which
8381  # to not find them
8382  if test "x$new_path" = x \
8383           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8384           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8385    new_path=`$CYGPATH -u "$path"`
8386  fi
8387  if test "x$new_path" = x; then
8388    # Oops. Which didn't find the executable.
8389    # The splitting of arguments from the executable at a space might have been incorrect,
8390    # since paths with space are more likely in Windows. Give it another try with the whole
8391    # argument.
8392    path="$complete"
8393    arguments="EOL"
8394    new_path=`$CYGPATH -u "$path"`
8395    new_path=`$WHICH "$new_path" 2> /dev/null`
8396    # bat and cmd files are not always considered executable in cygwin causing which
8397    # to not find them
8398    if test "x$new_path" = x \
8399             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8400             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8401      new_path=`$CYGPATH -u "$path"`
8402    fi
8403    if test "x$new_path" = x; then
8404      # It's still not found. Now this is an unrecoverable error.
8405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8406$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8407      has_space=`$ECHO "$complete" | $GREP " "`
8408      if test "x$has_space" != x; then
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8411      fi
8412      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8413    fi
8414  fi
8415
8416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8419  # "foo.exe" is OK but "foo" is an error.
8420  #
8421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8422  # It is also a way to make sure we got the proper file name for the real test later on.
8423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8424  if test "x$test_shortpath" = x; then
8425    # Short path failed, file does not exist as specified.
8426    # Try adding .exe or .cmd
8427    if test -f "${new_path}.exe"; then
8428       input_to_shortpath="${new_path}.exe"
8429    elif test -f "${new_path}.cmd"; then
8430       input_to_shortpath="${new_path}.cmd"
8431    else
8432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8436      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8437    fi
8438  else
8439    input_to_shortpath="$new_path"
8440  fi
8441
8442  # Call helper function which possibly converts this using DOS-style short mode.
8443  # If so, the updated path is stored in $new_path.
8444  new_path="$input_to_shortpath"
8445
8446  input_path="$input_to_shortpath"
8447  # Check if we need to convert this using DOS-style short mode. If the path
8448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8449  # take no chances and rewrite it.
8450  # Note: m4 eats our [], so we need to use [ and ] instead.
8451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8452  if test "x$has_forbidden_chars" != x; then
8453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8457      # Going to short mode and back again did indeed matter. Since short mode is
8458      # case insensitive, let's make it lowercase to improve readability.
8459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8460      # Now convert it back to Unix-stile (cygpath)
8461      input_path=`$CYGPATH -u "$shortmode_path"`
8462      new_path="$input_path"
8463    fi
8464  fi
8465
8466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8467  if test "x$test_cygdrive_prefix" = x; then
8468    # As a simple fix, exclude /usr/bin since it's not a real path.
8469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8471      # a path prefixed by /cygdrive for fixpath to work.
8472      new_path="$CYGWIN_ROOT_PATH$input_path"
8473    fi
8474  fi
8475
8476  # remove trailing .exe if any
8477  new_path="${new_path/%.exe/}"
8478
8479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8480
8481  # First separate the path from the arguments. This will split at the first
8482  # space.
8483  complete="$FOUND_MAKE"
8484  path="${complete%% *}"
8485  tmp="$complete EOL"
8486  arguments="${tmp#* }"
8487
8488  # Input might be given as Windows format, start by converting to
8489  # unix format.
8490  new_path="$path"
8491
8492  windows_path="$new_path"
8493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8494    unix_path=`$CYGPATH -u "$windows_path"`
8495    new_path="$unix_path"
8496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8498    new_path="$unix_path"
8499  fi
8500
8501
8502  # Now try to locate executable using which
8503  new_path=`$WHICH "$new_path" 2> /dev/null`
8504
8505  if test "x$new_path" = x; then
8506    # Oops. Which didn't find the executable.
8507    # The splitting of arguments from the executable at a space might have been incorrect,
8508    # since paths with space are more likely in Windows. Give it another try with the whole
8509    # argument.
8510    path="$complete"
8511    arguments="EOL"
8512    new_path="$path"
8513
8514  windows_path="$new_path"
8515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8516    unix_path=`$CYGPATH -u "$windows_path"`
8517    new_path="$unix_path"
8518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8520    new_path="$unix_path"
8521  fi
8522
8523
8524    new_path=`$WHICH "$new_path" 2> /dev/null`
8525
8526    if test "x$new_path" = x; then
8527      # It's still not found. Now this is an unrecoverable error.
8528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8529$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8530      has_space=`$ECHO "$complete" | $GREP " "`
8531      if test "x$has_space" != x; then
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8534      fi
8535      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8536    fi
8537  fi
8538
8539  # Now new_path has a complete unix path to the binary
8540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8541    # Keep paths in /bin as-is, but remove trailing .exe if any
8542    new_path="${new_path/%.exe/}"
8543    # Do not save /bin paths to all_fixpath_prefixes!
8544  else
8545    # Not in mixed or Windows style, start by that.
8546    new_path=`cmd //c echo $new_path`
8547
8548  input_path="$new_path"
8549  # Check if we need to convert this using DOS-style short mode. If the path
8550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8551  # take no chances and rewrite it.
8552  # Note: m4 eats our [], so we need to use [ and ] instead.
8553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8554  if test "x$has_forbidden_chars" != x; then
8555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8557  fi
8558
8559    # Output is in $new_path
8560
8561  windows_path="$new_path"
8562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8563    unix_path=`$CYGPATH -u "$windows_path"`
8564    new_path="$unix_path"
8565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8567    new_path="$unix_path"
8568  fi
8569
8570    # remove trailing .exe if any
8571    new_path="${new_path/%.exe/}"
8572
8573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8575  fi
8576
8577  else
8578    # We're on a posix platform. Hooray! :)
8579    # First separate the path from the arguments. This will split at the first
8580    # space.
8581    complete="$FOUND_MAKE"
8582    path="${complete%% *}"
8583    tmp="$complete EOL"
8584    arguments="${tmp#* }"
8585
8586    # Cannot rely on the command "which" here since it doesn't always work.
8587    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8588    if test -z "$is_absolute_path"; then
8589      # Path to executable is not absolute. Find it.
8590      IFS_save="$IFS"
8591      IFS=:
8592      for p in $PATH; do
8593        if test -f "$p/$path" && test -x "$p/$path"; then
8594          new_path="$p/$path"
8595          break
8596        fi
8597      done
8598      IFS="$IFS_save"
8599    else
8600      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8601$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8602      new_path="$path"
8603    fi
8604
8605    if test "x$new_path" = x; then
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8607$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8608        has_space=`$ECHO "$complete" | $GREP " "`
8609        if test "x$has_space" != x; then
8610          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8612        fi
8613        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8614      fi
8615  fi
8616
8617      # Now join together the path and the arguments once again
8618      if test "x$arguments" != xEOL; then
8619        new_complete="$new_path ${arguments% *}"
8620      else
8621        new_complete="$new_path"
8622      fi
8623
8624  if test "x$complete" != "x$new_complete"; then
8625      FOUND_MAKE="$new_complete"
8626      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8627$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8628    fi
8629
8630        fi
8631      fi
8632    fi
8633  fi
8634
8635    if test "x$FOUND_MAKE" = x; then
8636      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8637    fi
8638  else
8639    # Try our hardest to locate a correct version of GNU make
8640    for ac_prog in gmake
8641do
8642  # Extract the first word of "$ac_prog", so it can be a program name with args.
8643set dummy $ac_prog; ac_word=$2
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8645$as_echo_n "checking for $ac_word... " >&6; }
8646if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8647  $as_echo_n "(cached) " >&6
8648else
8649  case $CHECK_GMAKE in
8650  [\\/]* | ?:[\\/]*)
8651  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8652  ;;
8653  *)
8654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8655for as_dir in $PATH
8656do
8657  IFS=$as_save_IFS
8658  test -z "$as_dir" && as_dir=.
8659    for ac_exec_ext in '' $ac_executable_extensions; do
8660  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8661    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8663    break 2
8664  fi
8665done
8666  done
8667IFS=$as_save_IFS
8668
8669  ;;
8670esac
8671fi
8672CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8673if test -n "$CHECK_GMAKE"; then
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8675$as_echo "$CHECK_GMAKE" >&6; }
8676else
8677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }
8679fi
8680
8681
8682  test -n "$CHECK_GMAKE" && break
8683done
8684
8685
8686  MAKE_CANDIDATE=""$CHECK_GMAKE""
8687  DESCRIPTION="gmake in PATH"
8688  if test "x$MAKE_CANDIDATE" != x; then
8689    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8690$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8691    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8692    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8693    if test "x$IS_GNU_MAKE" = x; then
8694      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8695$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8696    else
8697      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8698      if test "x$IS_MODERN_MAKE" = x; then
8699        { $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
8700$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;}
8701      else
8702        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8703          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8704            MAKE_EXPECTED_ENV='cygwin'
8705          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8706            MAKE_EXPECTED_ENV='msys'
8707          else
8708            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8709          fi
8710          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8711          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8712        else
8713          # Not relevant for non-Windows
8714          IS_MAKE_CORRECT_ENV=true
8715        fi
8716        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8717          { $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
8718$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;}
8719        else
8720          FOUND_MAKE=$MAKE_CANDIDATE
8721
8722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8723
8724  # First separate the path from the arguments. This will split at the first
8725  # space.
8726  complete="$FOUND_MAKE"
8727  path="${complete%% *}"
8728  tmp="$complete EOL"
8729  arguments="${tmp#* }"
8730
8731  # Input might be given as Windows format, start by converting to
8732  # unix format.
8733  new_path=`$CYGPATH -u "$path"`
8734
8735  # Now try to locate executable using which
8736  new_path=`$WHICH "$new_path" 2> /dev/null`
8737  # bat and cmd files are not always considered executable in cygwin causing which
8738  # to not find them
8739  if test "x$new_path" = x \
8740           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8741           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8742    new_path=`$CYGPATH -u "$path"`
8743  fi
8744  if test "x$new_path" = x; then
8745    # Oops. Which didn't find the executable.
8746    # The splitting of arguments from the executable at a space might have been incorrect,
8747    # since paths with space are more likely in Windows. Give it another try with the whole
8748    # argument.
8749    path="$complete"
8750    arguments="EOL"
8751    new_path=`$CYGPATH -u "$path"`
8752    new_path=`$WHICH "$new_path" 2> /dev/null`
8753    # bat and cmd files are not always considered executable in cygwin causing which
8754    # to not find them
8755    if test "x$new_path" = x \
8756             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8757             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8758      new_path=`$CYGPATH -u "$path"`
8759    fi
8760    if test "x$new_path" = x; then
8761      # It's still not found. Now this is an unrecoverable error.
8762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8764      has_space=`$ECHO "$complete" | $GREP " "`
8765      if test "x$has_space" != x; then
8766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8768      fi
8769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8770    fi
8771  fi
8772
8773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8776  # "foo.exe" is OK but "foo" is an error.
8777  #
8778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8779  # It is also a way to make sure we got the proper file name for the real test later on.
8780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8781  if test "x$test_shortpath" = x; then
8782    # Short path failed, file does not exist as specified.
8783    # Try adding .exe or .cmd
8784    if test -f "${new_path}.exe"; then
8785       input_to_shortpath="${new_path}.exe"
8786    elif test -f "${new_path}.cmd"; then
8787       input_to_shortpath="${new_path}.cmd"
8788    else
8789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8794    fi
8795  else
8796    input_to_shortpath="$new_path"
8797  fi
8798
8799  # Call helper function which possibly converts this using DOS-style short mode.
8800  # If so, the updated path is stored in $new_path.
8801  new_path="$input_to_shortpath"
8802
8803  input_path="$input_to_shortpath"
8804  # Check if we need to convert this using DOS-style short mode. If the path
8805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8806  # take no chances and rewrite it.
8807  # Note: m4 eats our [], so we need to use [ and ] instead.
8808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8809  if test "x$has_forbidden_chars" != x; then
8810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8814      # Going to short mode and back again did indeed matter. Since short mode is
8815      # case insensitive, let's make it lowercase to improve readability.
8816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8817      # Now convert it back to Unix-stile (cygpath)
8818      input_path=`$CYGPATH -u "$shortmode_path"`
8819      new_path="$input_path"
8820    fi
8821  fi
8822
8823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8824  if test "x$test_cygdrive_prefix" = x; then
8825    # As a simple fix, exclude /usr/bin since it's not a real path.
8826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8828      # a path prefixed by /cygdrive for fixpath to work.
8829      new_path="$CYGWIN_ROOT_PATH$input_path"
8830    fi
8831  fi
8832
8833  # remove trailing .exe if any
8834  new_path="${new_path/%.exe/}"
8835
8836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8837
8838  # First separate the path from the arguments. This will split at the first
8839  # space.
8840  complete="$FOUND_MAKE"
8841  path="${complete%% *}"
8842  tmp="$complete EOL"
8843  arguments="${tmp#* }"
8844
8845  # Input might be given as Windows format, start by converting to
8846  # unix format.
8847  new_path="$path"
8848
8849  windows_path="$new_path"
8850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8851    unix_path=`$CYGPATH -u "$windows_path"`
8852    new_path="$unix_path"
8853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8855    new_path="$unix_path"
8856  fi
8857
8858
8859  # Now try to locate executable using which
8860  new_path=`$WHICH "$new_path" 2> /dev/null`
8861
8862  if test "x$new_path" = x; then
8863    # Oops. Which didn't find the executable.
8864    # The splitting of arguments from the executable at a space might have been incorrect,
8865    # since paths with space are more likely in Windows. Give it another try with the whole
8866    # argument.
8867    path="$complete"
8868    arguments="EOL"
8869    new_path="$path"
8870
8871  windows_path="$new_path"
8872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8873    unix_path=`$CYGPATH -u "$windows_path"`
8874    new_path="$unix_path"
8875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8877    new_path="$unix_path"
8878  fi
8879
8880
8881    new_path=`$WHICH "$new_path" 2> /dev/null`
8882
8883    if test "x$new_path" = x; then
8884      # It's still not found. Now this is an unrecoverable error.
8885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8887      has_space=`$ECHO "$complete" | $GREP " "`
8888      if test "x$has_space" != x; then
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8891      fi
8892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8893    fi
8894  fi
8895
8896  # Now new_path has a complete unix path to the binary
8897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8898    # Keep paths in /bin as-is, but remove trailing .exe if any
8899    new_path="${new_path/%.exe/}"
8900    # Do not save /bin paths to all_fixpath_prefixes!
8901  else
8902    # Not in mixed or Windows style, start by that.
8903    new_path=`cmd //c echo $new_path`
8904
8905  input_path="$new_path"
8906  # Check if we need to convert this using DOS-style short mode. If the path
8907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8908  # take no chances and rewrite it.
8909  # Note: m4 eats our [], so we need to use [ and ] instead.
8910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8911  if test "x$has_forbidden_chars" != x; then
8912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8914  fi
8915
8916    # Output is in $new_path
8917
8918  windows_path="$new_path"
8919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8920    unix_path=`$CYGPATH -u "$windows_path"`
8921    new_path="$unix_path"
8922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8924    new_path="$unix_path"
8925  fi
8926
8927    # remove trailing .exe if any
8928    new_path="${new_path/%.exe/}"
8929
8930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8932  fi
8933
8934  else
8935    # We're on a posix platform. Hooray! :)
8936    # First separate the path from the arguments. This will split at the first
8937    # space.
8938    complete="$FOUND_MAKE"
8939    path="${complete%% *}"
8940    tmp="$complete EOL"
8941    arguments="${tmp#* }"
8942
8943    # Cannot rely on the command "which" here since it doesn't always work.
8944    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8945    if test -z "$is_absolute_path"; then
8946      # Path to executable is not absolute. Find it.
8947      IFS_save="$IFS"
8948      IFS=:
8949      for p in $PATH; do
8950        if test -f "$p/$path" && test -x "$p/$path"; then
8951          new_path="$p/$path"
8952          break
8953        fi
8954      done
8955      IFS="$IFS_save"
8956    else
8957      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8958$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8959      new_path="$path"
8960    fi
8961
8962    if test "x$new_path" = x; then
8963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8965        has_space=`$ECHO "$complete" | $GREP " "`
8966        if test "x$has_space" != x; then
8967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8969        fi
8970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8971      fi
8972  fi
8973
8974      # Now join together the path and the arguments once again
8975      if test "x$arguments" != xEOL; then
8976        new_complete="$new_path ${arguments% *}"
8977      else
8978        new_complete="$new_path"
8979      fi
8980
8981  if test "x$complete" != "x$new_complete"; then
8982      FOUND_MAKE="$new_complete"
8983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8985    fi
8986
8987        fi
8988      fi
8989    fi
8990  fi
8991
8992
8993    if test "x$FOUND_MAKE" = x; then
8994      for ac_prog in make
8995do
8996  # Extract the first word of "$ac_prog", so it can be a program name with args.
8997set dummy $ac_prog; ac_word=$2
8998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8999$as_echo_n "checking for $ac_word... " >&6; }
9000if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
9001  $as_echo_n "(cached) " >&6
9002else
9003  case $CHECK_MAKE in
9004  [\\/]* | ?:[\\/]*)
9005  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9006  ;;
9007  *)
9008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9009for as_dir in $PATH
9010do
9011  IFS=$as_save_IFS
9012  test -z "$as_dir" && as_dir=.
9013    for ac_exec_ext in '' $ac_executable_extensions; do
9014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9015    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9017    break 2
9018  fi
9019done
9020  done
9021IFS=$as_save_IFS
9022
9023  ;;
9024esac
9025fi
9026CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9027if test -n "$CHECK_MAKE"; then
9028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9029$as_echo "$CHECK_MAKE" >&6; }
9030else
9031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
9033fi
9034
9035
9036  test -n "$CHECK_MAKE" && break
9037done
9038
9039
9040  MAKE_CANDIDATE=""$CHECK_MAKE""
9041  DESCRIPTION="make in PATH"
9042  if test "x$MAKE_CANDIDATE" != x; then
9043    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9044$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9045    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9046    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9047    if test "x$IS_GNU_MAKE" = x; then
9048      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9049$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9050    else
9051      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9052      if test "x$IS_MODERN_MAKE" = x; then
9053        { $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
9054$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;}
9055      else
9056        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9057          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9058            MAKE_EXPECTED_ENV='cygwin'
9059          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9060            MAKE_EXPECTED_ENV='msys'
9061          else
9062            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9063          fi
9064          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9065          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9066        else
9067          # Not relevant for non-Windows
9068          IS_MAKE_CORRECT_ENV=true
9069        fi
9070        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9071          { $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
9072$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;}
9073        else
9074          FOUND_MAKE=$MAKE_CANDIDATE
9075
9076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9077
9078  # First separate the path from the arguments. This will split at the first
9079  # space.
9080  complete="$FOUND_MAKE"
9081  path="${complete%% *}"
9082  tmp="$complete EOL"
9083  arguments="${tmp#* }"
9084
9085  # Input might be given as Windows format, start by converting to
9086  # unix format.
9087  new_path=`$CYGPATH -u "$path"`
9088
9089  # Now try to locate executable using which
9090  new_path=`$WHICH "$new_path" 2> /dev/null`
9091  # bat and cmd files are not always considered executable in cygwin causing which
9092  # to not find them
9093  if test "x$new_path" = x \
9094           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9095           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9096    new_path=`$CYGPATH -u "$path"`
9097  fi
9098  if test "x$new_path" = x; then
9099    # Oops. Which didn't find the executable.
9100    # The splitting of arguments from the executable at a space might have been incorrect,
9101    # since paths with space are more likely in Windows. Give it another try with the whole
9102    # argument.
9103    path="$complete"
9104    arguments="EOL"
9105    new_path=`$CYGPATH -u "$path"`
9106    new_path=`$WHICH "$new_path" 2> /dev/null`
9107    # bat and cmd files are not always considered executable in cygwin causing which
9108    # to not find them
9109    if test "x$new_path" = x \
9110             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9111             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9112      new_path=`$CYGPATH -u "$path"`
9113    fi
9114    if test "x$new_path" = x; then
9115      # It's still not found. Now this is an unrecoverable error.
9116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9118      has_space=`$ECHO "$complete" | $GREP " "`
9119      if test "x$has_space" != x; then
9120        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9122      fi
9123      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9124    fi
9125  fi
9126
9127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9130  # "foo.exe" is OK but "foo" is an error.
9131  #
9132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9133  # It is also a way to make sure we got the proper file name for the real test later on.
9134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9135  if test "x$test_shortpath" = x; then
9136    # Short path failed, file does not exist as specified.
9137    # Try adding .exe or .cmd
9138    if test -f "${new_path}.exe"; then
9139       input_to_shortpath="${new_path}.exe"
9140    elif test -f "${new_path}.cmd"; then
9141       input_to_shortpath="${new_path}.cmd"
9142    else
9143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9145      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9146$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9147      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9148    fi
9149  else
9150    input_to_shortpath="$new_path"
9151  fi
9152
9153  # Call helper function which possibly converts this using DOS-style short mode.
9154  # If so, the updated path is stored in $new_path.
9155  new_path="$input_to_shortpath"
9156
9157  input_path="$input_to_shortpath"
9158  # Check if we need to convert this using DOS-style short mode. If the path
9159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9160  # take no chances and rewrite it.
9161  # Note: m4 eats our [], so we need to use [ and ] instead.
9162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9163  if test "x$has_forbidden_chars" != x; then
9164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9168      # Going to short mode and back again did indeed matter. Since short mode is
9169      # case insensitive, let's make it lowercase to improve readability.
9170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9171      # Now convert it back to Unix-stile (cygpath)
9172      input_path=`$CYGPATH -u "$shortmode_path"`
9173      new_path="$input_path"
9174    fi
9175  fi
9176
9177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9178  if test "x$test_cygdrive_prefix" = x; then
9179    # As a simple fix, exclude /usr/bin since it's not a real path.
9180    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9182      # a path prefixed by /cygdrive for fixpath to work.
9183      new_path="$CYGWIN_ROOT_PATH$input_path"
9184    fi
9185  fi
9186
9187  # remove trailing .exe if any
9188  new_path="${new_path/%.exe/}"
9189
9190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9191
9192  # First separate the path from the arguments. This will split at the first
9193  # space.
9194  complete="$FOUND_MAKE"
9195  path="${complete%% *}"
9196  tmp="$complete EOL"
9197  arguments="${tmp#* }"
9198
9199  # Input might be given as Windows format, start by converting to
9200  # unix format.
9201  new_path="$path"
9202
9203  windows_path="$new_path"
9204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9205    unix_path=`$CYGPATH -u "$windows_path"`
9206    new_path="$unix_path"
9207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9209    new_path="$unix_path"
9210  fi
9211
9212
9213  # Now try to locate executable using which
9214  new_path=`$WHICH "$new_path" 2> /dev/null`
9215
9216  if test "x$new_path" = x; then
9217    # Oops. Which didn't find the executable.
9218    # The splitting of arguments from the executable at a space might have been incorrect,
9219    # since paths with space are more likely in Windows. Give it another try with the whole
9220    # argument.
9221    path="$complete"
9222    arguments="EOL"
9223    new_path="$path"
9224
9225  windows_path="$new_path"
9226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9227    unix_path=`$CYGPATH -u "$windows_path"`
9228    new_path="$unix_path"
9229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9231    new_path="$unix_path"
9232  fi
9233
9234
9235    new_path=`$WHICH "$new_path" 2> /dev/null`
9236
9237    if test "x$new_path" = x; then
9238      # It's still not found. Now this is an unrecoverable error.
9239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9240$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9241      has_space=`$ECHO "$complete" | $GREP " "`
9242      if test "x$has_space" != x; then
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9245      fi
9246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9247    fi
9248  fi
9249
9250  # Now new_path has a complete unix path to the binary
9251  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9252    # Keep paths in /bin as-is, but remove trailing .exe if any
9253    new_path="${new_path/%.exe/}"
9254    # Do not save /bin paths to all_fixpath_prefixes!
9255  else
9256    # Not in mixed or Windows style, start by that.
9257    new_path=`cmd //c echo $new_path`
9258
9259  input_path="$new_path"
9260  # Check if we need to convert this using DOS-style short mode. If the path
9261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9262  # take no chances and rewrite it.
9263  # Note: m4 eats our [], so we need to use [ and ] instead.
9264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9265  if test "x$has_forbidden_chars" != x; then
9266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9268  fi
9269
9270    # Output is in $new_path
9271
9272  windows_path="$new_path"
9273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9274    unix_path=`$CYGPATH -u "$windows_path"`
9275    new_path="$unix_path"
9276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9278    new_path="$unix_path"
9279  fi
9280
9281    # remove trailing .exe if any
9282    new_path="${new_path/%.exe/}"
9283
9284    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9285    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9286  fi
9287
9288  else
9289    # We're on a posix platform. Hooray! :)
9290    # First separate the path from the arguments. This will split at the first
9291    # space.
9292    complete="$FOUND_MAKE"
9293    path="${complete%% *}"
9294    tmp="$complete EOL"
9295    arguments="${tmp#* }"
9296
9297    # Cannot rely on the command "which" here since it doesn't always work.
9298    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9299    if test -z "$is_absolute_path"; then
9300      # Path to executable is not absolute. Find it.
9301      IFS_save="$IFS"
9302      IFS=:
9303      for p in $PATH; do
9304        if test -f "$p/$path" && test -x "$p/$path"; then
9305          new_path="$p/$path"
9306          break
9307        fi
9308      done
9309      IFS="$IFS_save"
9310    else
9311      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9312$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9313      new_path="$path"
9314    fi
9315
9316    if test "x$new_path" = x; then
9317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9319        has_space=`$ECHO "$complete" | $GREP " "`
9320        if test "x$has_space" != x; then
9321          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9323        fi
9324        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9325      fi
9326  fi
9327
9328      # Now join together the path and the arguments once again
9329      if test "x$arguments" != xEOL; then
9330        new_complete="$new_path ${arguments% *}"
9331      else
9332        new_complete="$new_path"
9333      fi
9334
9335  if test "x$complete" != "x$new_complete"; then
9336      FOUND_MAKE="$new_complete"
9337      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9338$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9339    fi
9340
9341        fi
9342      fi
9343    fi
9344  fi
9345
9346    fi
9347
9348    if test "x$FOUND_MAKE" = x; then
9349      if test "x$TOOLS_DIR" != x; then
9350        # We have a tools-dir, check that as well before giving up.
9351        OLD_PATH=$PATH
9352        PATH=$TOOLS_DIR:$PATH
9353        for ac_prog in gmake
9354do
9355  # Extract the first word of "$ac_prog", so it can be a program name with args.
9356set dummy $ac_prog; ac_word=$2
9357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9358$as_echo_n "checking for $ac_word... " >&6; }
9359if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9360  $as_echo_n "(cached) " >&6
9361else
9362  case $CHECK_TOOLSDIR_GMAKE in
9363  [\\/]* | ?:[\\/]*)
9364  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9365  ;;
9366  *)
9367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9368for as_dir in $PATH
9369do
9370  IFS=$as_save_IFS
9371  test -z "$as_dir" && as_dir=.
9372    for ac_exec_ext in '' $ac_executable_extensions; do
9373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9374    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9376    break 2
9377  fi
9378done
9379  done
9380IFS=$as_save_IFS
9381
9382  ;;
9383esac
9384fi
9385CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9386if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9388$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9389else
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
9392fi
9393
9394
9395  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9396done
9397
9398
9399  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9400  DESCRIPTION="gmake in tools-dir"
9401  if test "x$MAKE_CANDIDATE" != x; then
9402    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9403$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9404    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9405    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9406    if test "x$IS_GNU_MAKE" = x; then
9407      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9408$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9409    else
9410      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9411      if test "x$IS_MODERN_MAKE" = x; then
9412        { $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
9413$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;}
9414      else
9415        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9416          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9417            MAKE_EXPECTED_ENV='cygwin'
9418          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9419            MAKE_EXPECTED_ENV='msys'
9420          else
9421            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9422          fi
9423          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9424          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9425        else
9426          # Not relevant for non-Windows
9427          IS_MAKE_CORRECT_ENV=true
9428        fi
9429        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9430          { $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
9431$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;}
9432        else
9433          FOUND_MAKE=$MAKE_CANDIDATE
9434
9435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9436
9437  # First separate the path from the arguments. This will split at the first
9438  # space.
9439  complete="$FOUND_MAKE"
9440  path="${complete%% *}"
9441  tmp="$complete EOL"
9442  arguments="${tmp#* }"
9443
9444  # Input might be given as Windows format, start by converting to
9445  # unix format.
9446  new_path=`$CYGPATH -u "$path"`
9447
9448  # Now try to locate executable using which
9449  new_path=`$WHICH "$new_path" 2> /dev/null`
9450  # bat and cmd files are not always considered executable in cygwin causing which
9451  # to not find them
9452  if test "x$new_path" = x \
9453           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9454           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9455    new_path=`$CYGPATH -u "$path"`
9456  fi
9457  if test "x$new_path" = x; then
9458    # Oops. Which didn't find the executable.
9459    # The splitting of arguments from the executable at a space might have been incorrect,
9460    # since paths with space are more likely in Windows. Give it another try with the whole
9461    # argument.
9462    path="$complete"
9463    arguments="EOL"
9464    new_path=`$CYGPATH -u "$path"`
9465    new_path=`$WHICH "$new_path" 2> /dev/null`
9466    # bat and cmd files are not always considered executable in cygwin causing which
9467    # to not find them
9468    if test "x$new_path" = x \
9469             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9470             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9471      new_path=`$CYGPATH -u "$path"`
9472    fi
9473    if test "x$new_path" = x; then
9474      # It's still not found. Now this is an unrecoverable error.
9475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9476$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9477      has_space=`$ECHO "$complete" | $GREP " "`
9478      if test "x$has_space" != x; then
9479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9481      fi
9482      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9483    fi
9484  fi
9485
9486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9489  # "foo.exe" is OK but "foo" is an error.
9490  #
9491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9492  # It is also a way to make sure we got the proper file name for the real test later on.
9493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9494  if test "x$test_shortpath" = x; then
9495    # Short path failed, file does not exist as specified.
9496    # Try adding .exe or .cmd
9497    if test -f "${new_path}.exe"; then
9498       input_to_shortpath="${new_path}.exe"
9499    elif test -f "${new_path}.cmd"; then
9500       input_to_shortpath="${new_path}.cmd"
9501    else
9502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9503$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9504      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9505$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9506      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9507    fi
9508  else
9509    input_to_shortpath="$new_path"
9510  fi
9511
9512  # Call helper function which possibly converts this using DOS-style short mode.
9513  # If so, the updated path is stored in $new_path.
9514  new_path="$input_to_shortpath"
9515
9516  input_path="$input_to_shortpath"
9517  # Check if we need to convert this using DOS-style short mode. If the path
9518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9519  # take no chances and rewrite it.
9520  # Note: m4 eats our [], so we need to use [ and ] instead.
9521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9522  if test "x$has_forbidden_chars" != x; then
9523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9527      # Going to short mode and back again did indeed matter. Since short mode is
9528      # case insensitive, let's make it lowercase to improve readability.
9529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9530      # Now convert it back to Unix-stile (cygpath)
9531      input_path=`$CYGPATH -u "$shortmode_path"`
9532      new_path="$input_path"
9533    fi
9534  fi
9535
9536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9537  if test "x$test_cygdrive_prefix" = x; then
9538    # As a simple fix, exclude /usr/bin since it's not a real path.
9539    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9541      # a path prefixed by /cygdrive for fixpath to work.
9542      new_path="$CYGWIN_ROOT_PATH$input_path"
9543    fi
9544  fi
9545
9546  # remove trailing .exe if any
9547  new_path="${new_path/%.exe/}"
9548
9549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9550
9551  # First separate the path from the arguments. This will split at the first
9552  # space.
9553  complete="$FOUND_MAKE"
9554  path="${complete%% *}"
9555  tmp="$complete EOL"
9556  arguments="${tmp#* }"
9557
9558  # Input might be given as Windows format, start by converting to
9559  # unix format.
9560  new_path="$path"
9561
9562  windows_path="$new_path"
9563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9564    unix_path=`$CYGPATH -u "$windows_path"`
9565    new_path="$unix_path"
9566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9568    new_path="$unix_path"
9569  fi
9570
9571
9572  # Now try to locate executable using which
9573  new_path=`$WHICH "$new_path" 2> /dev/null`
9574
9575  if test "x$new_path" = x; then
9576    # Oops. Which didn't find the executable.
9577    # The splitting of arguments from the executable at a space might have been incorrect,
9578    # since paths with space are more likely in Windows. Give it another try with the whole
9579    # argument.
9580    path="$complete"
9581    arguments="EOL"
9582    new_path="$path"
9583
9584  windows_path="$new_path"
9585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9586    unix_path=`$CYGPATH -u "$windows_path"`
9587    new_path="$unix_path"
9588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9590    new_path="$unix_path"
9591  fi
9592
9593
9594    new_path=`$WHICH "$new_path" 2> /dev/null`
9595
9596    if test "x$new_path" = x; then
9597      # It's still not found. Now this is an unrecoverable error.
9598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9600      has_space=`$ECHO "$complete" | $GREP " "`
9601      if test "x$has_space" != x; then
9602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9604      fi
9605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9606    fi
9607  fi
9608
9609  # Now new_path has a complete unix path to the binary
9610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9611    # Keep paths in /bin as-is, but remove trailing .exe if any
9612    new_path="${new_path/%.exe/}"
9613    # Do not save /bin paths to all_fixpath_prefixes!
9614  else
9615    # Not in mixed or Windows style, start by that.
9616    new_path=`cmd //c echo $new_path`
9617
9618  input_path="$new_path"
9619  # Check if we need to convert this using DOS-style short mode. If the path
9620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9621  # take no chances and rewrite it.
9622  # Note: m4 eats our [], so we need to use [ and ] instead.
9623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9624  if test "x$has_forbidden_chars" != x; then
9625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9627  fi
9628
9629    # Output is in $new_path
9630
9631  windows_path="$new_path"
9632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9633    unix_path=`$CYGPATH -u "$windows_path"`
9634    new_path="$unix_path"
9635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9637    new_path="$unix_path"
9638  fi
9639
9640    # remove trailing .exe if any
9641    new_path="${new_path/%.exe/}"
9642
9643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9645  fi
9646
9647  else
9648    # We're on a posix platform. Hooray! :)
9649    # First separate the path from the arguments. This will split at the first
9650    # space.
9651    complete="$FOUND_MAKE"
9652    path="${complete%% *}"
9653    tmp="$complete EOL"
9654    arguments="${tmp#* }"
9655
9656    # Cannot rely on the command "which" here since it doesn't always work.
9657    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9658    if test -z "$is_absolute_path"; then
9659      # Path to executable is not absolute. Find it.
9660      IFS_save="$IFS"
9661      IFS=:
9662      for p in $PATH; do
9663        if test -f "$p/$path" && test -x "$p/$path"; then
9664          new_path="$p/$path"
9665          break
9666        fi
9667      done
9668      IFS="$IFS_save"
9669    else
9670      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9671$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9672      new_path="$path"
9673    fi
9674
9675    if test "x$new_path" = x; then
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9678        has_space=`$ECHO "$complete" | $GREP " "`
9679        if test "x$has_space" != x; then
9680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9682        fi
9683        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9684      fi
9685  fi
9686
9687      # Now join together the path and the arguments once again
9688      if test "x$arguments" != xEOL; then
9689        new_complete="$new_path ${arguments% *}"
9690      else
9691        new_complete="$new_path"
9692      fi
9693
9694  if test "x$complete" != "x$new_complete"; then
9695      FOUND_MAKE="$new_complete"
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9697$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9698    fi
9699
9700        fi
9701      fi
9702    fi
9703  fi
9704
9705        if test "x$FOUND_MAKE" = x; then
9706          for ac_prog in make
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $CHECK_TOOLSDIR_MAKE in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9727    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9739if test -n "$CHECK_TOOLSDIR_MAKE"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9741$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$CHECK_TOOLSDIR_MAKE" && break
9749done
9750
9751
9752  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9753  DESCRIPTION="make in tools-dir"
9754  if test "x$MAKE_CANDIDATE" != x; then
9755    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9756$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9757    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9758    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9759    if test "x$IS_GNU_MAKE" = x; then
9760      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9761$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9762    else
9763      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9764      if test "x$IS_MODERN_MAKE" = x; then
9765        { $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
9766$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;}
9767      else
9768        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9769          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9770            MAKE_EXPECTED_ENV='cygwin'
9771          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9772            MAKE_EXPECTED_ENV='msys'
9773          else
9774            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9775          fi
9776          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9777          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9778        else
9779          # Not relevant for non-Windows
9780          IS_MAKE_CORRECT_ENV=true
9781        fi
9782        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9783          { $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
9784$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;}
9785        else
9786          FOUND_MAKE=$MAKE_CANDIDATE
9787
9788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9789
9790  # First separate the path from the arguments. This will split at the first
9791  # space.
9792  complete="$FOUND_MAKE"
9793  path="${complete%% *}"
9794  tmp="$complete EOL"
9795  arguments="${tmp#* }"
9796
9797  # Input might be given as Windows format, start by converting to
9798  # unix format.
9799  new_path=`$CYGPATH -u "$path"`
9800
9801  # Now try to locate executable using which
9802  new_path=`$WHICH "$new_path" 2> /dev/null`
9803  # bat and cmd files are not always considered executable in cygwin causing which
9804  # to not find them
9805  if test "x$new_path" = x \
9806           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9807           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9808    new_path=`$CYGPATH -u "$path"`
9809  fi
9810  if test "x$new_path" = x; then
9811    # Oops. Which didn't find the executable.
9812    # The splitting of arguments from the executable at a space might have been incorrect,
9813    # since paths with space are more likely in Windows. Give it another try with the whole
9814    # argument.
9815    path="$complete"
9816    arguments="EOL"
9817    new_path=`$CYGPATH -u "$path"`
9818    new_path=`$WHICH "$new_path" 2> /dev/null`
9819    # bat and cmd files are not always considered executable in cygwin causing which
9820    # to not find them
9821    if test "x$new_path" = x \
9822             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9823             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9824      new_path=`$CYGPATH -u "$path"`
9825    fi
9826    if test "x$new_path" = x; then
9827      # It's still not found. Now this is an unrecoverable error.
9828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9830      has_space=`$ECHO "$complete" | $GREP " "`
9831      if test "x$has_space" != x; then
9832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9834      fi
9835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9836    fi
9837  fi
9838
9839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9842  # "foo.exe" is OK but "foo" is an error.
9843  #
9844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9845  # It is also a way to make sure we got the proper file name for the real test later on.
9846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9847  if test "x$test_shortpath" = x; then
9848    # Short path failed, file does not exist as specified.
9849    # Try adding .exe or .cmd
9850    if test -f "${new_path}.exe"; then
9851       input_to_shortpath="${new_path}.exe"
9852    elif test -f "${new_path}.cmd"; then
9853       input_to_shortpath="${new_path}.cmd"
9854    else
9855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9860    fi
9861  else
9862    input_to_shortpath="$new_path"
9863  fi
9864
9865  # Call helper function which possibly converts this using DOS-style short mode.
9866  # If so, the updated path is stored in $new_path.
9867  new_path="$input_to_shortpath"
9868
9869  input_path="$input_to_shortpath"
9870  # Check if we need to convert this using DOS-style short mode. If the path
9871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9872  # take no chances and rewrite it.
9873  # Note: m4 eats our [], so we need to use [ and ] instead.
9874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9875  if test "x$has_forbidden_chars" != x; then
9876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9880      # Going to short mode and back again did indeed matter. Since short mode is
9881      # case insensitive, let's make it lowercase to improve readability.
9882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9883      # Now convert it back to Unix-stile (cygpath)
9884      input_path=`$CYGPATH -u "$shortmode_path"`
9885      new_path="$input_path"
9886    fi
9887  fi
9888
9889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9890  if test "x$test_cygdrive_prefix" = x; then
9891    # As a simple fix, exclude /usr/bin since it's not a real path.
9892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9894      # a path prefixed by /cygdrive for fixpath to work.
9895      new_path="$CYGWIN_ROOT_PATH$input_path"
9896    fi
9897  fi
9898
9899  # remove trailing .exe if any
9900  new_path="${new_path/%.exe/}"
9901
9902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9903
9904  # First separate the path from the arguments. This will split at the first
9905  # space.
9906  complete="$FOUND_MAKE"
9907  path="${complete%% *}"
9908  tmp="$complete EOL"
9909  arguments="${tmp#* }"
9910
9911  # Input might be given as Windows format, start by converting to
9912  # unix format.
9913  new_path="$path"
9914
9915  windows_path="$new_path"
9916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9917    unix_path=`$CYGPATH -u "$windows_path"`
9918    new_path="$unix_path"
9919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9921    new_path="$unix_path"
9922  fi
9923
9924
9925  # Now try to locate executable using which
9926  new_path=`$WHICH "$new_path" 2> /dev/null`
9927
9928  if test "x$new_path" = x; then
9929    # Oops. Which didn't find the executable.
9930    # The splitting of arguments from the executable at a space might have been incorrect,
9931    # since paths with space are more likely in Windows. Give it another try with the whole
9932    # argument.
9933    path="$complete"
9934    arguments="EOL"
9935    new_path="$path"
9936
9937  windows_path="$new_path"
9938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9939    unix_path=`$CYGPATH -u "$windows_path"`
9940    new_path="$unix_path"
9941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9943    new_path="$unix_path"
9944  fi
9945
9946
9947    new_path=`$WHICH "$new_path" 2> /dev/null`
9948
9949    if test "x$new_path" = x; then
9950      # It's still not found. Now this is an unrecoverable error.
9951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9953      has_space=`$ECHO "$complete" | $GREP " "`
9954      if test "x$has_space" != x; then
9955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9957      fi
9958      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9959    fi
9960  fi
9961
9962  # Now new_path has a complete unix path to the binary
9963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9964    # Keep paths in /bin as-is, but remove trailing .exe if any
9965    new_path="${new_path/%.exe/}"
9966    # Do not save /bin paths to all_fixpath_prefixes!
9967  else
9968    # Not in mixed or Windows style, start by that.
9969    new_path=`cmd //c echo $new_path`
9970
9971  input_path="$new_path"
9972  # Check if we need to convert this using DOS-style short mode. If the path
9973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9974  # take no chances and rewrite it.
9975  # Note: m4 eats our [], so we need to use [ and ] instead.
9976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9977  if test "x$has_forbidden_chars" != x; then
9978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9980  fi
9981
9982    # Output is in $new_path
9983
9984  windows_path="$new_path"
9985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9986    unix_path=`$CYGPATH -u "$windows_path"`
9987    new_path="$unix_path"
9988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9990    new_path="$unix_path"
9991  fi
9992
9993    # remove trailing .exe if any
9994    new_path="${new_path/%.exe/}"
9995
9996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9998  fi
9999
10000  else
10001    # We're on a posix platform. Hooray! :)
10002    # First separate the path from the arguments. This will split at the first
10003    # space.
10004    complete="$FOUND_MAKE"
10005    path="${complete%% *}"
10006    tmp="$complete EOL"
10007    arguments="${tmp#* }"
10008
10009    # Cannot rely on the command "which" here since it doesn't always work.
10010    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10011    if test -z "$is_absolute_path"; then
10012      # Path to executable is not absolute. Find it.
10013      IFS_save="$IFS"
10014      IFS=:
10015      for p in $PATH; do
10016        if test -f "$p/$path" && test -x "$p/$path"; then
10017          new_path="$p/$path"
10018          break
10019        fi
10020      done
10021      IFS="$IFS_save"
10022    else
10023      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10024$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10025      new_path="$path"
10026    fi
10027
10028    if test "x$new_path" = x; then
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10031        has_space=`$ECHO "$complete" | $GREP " "`
10032        if test "x$has_space" != x; then
10033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10035        fi
10036        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10037      fi
10038  fi
10039
10040      # Now join together the path and the arguments once again
10041      if test "x$arguments" != xEOL; then
10042        new_complete="$new_path ${arguments% *}"
10043      else
10044        new_complete="$new_path"
10045      fi
10046
10047  if test "x$complete" != "x$new_complete"; then
10048      FOUND_MAKE="$new_complete"
10049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10050$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10051    fi
10052
10053        fi
10054      fi
10055    fi
10056  fi
10057
10058        fi
10059        PATH=$OLD_PATH
10060      fi
10061    fi
10062
10063    if test "x$FOUND_MAKE" = x; then
10064      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
10065    fi
10066  fi
10067
10068  MAKE=$FOUND_MAKE
10069
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10071$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10072
10073
10074
10075    # Test if find supports -delete
10076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10077$as_echo_n "checking if find supports -delete... " >&6; }
10078    FIND_DELETE="-delete"
10079
10080    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10081
10082    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10083
10084    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10085    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10086        # No, it does not.
10087        rm $DELETEDIR/TestIfFindSupportsDelete
10088        FIND_DELETE="-exec rm \{\} \+"
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
10091    else
10092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10093$as_echo "yes" >&6; }
10094    fi
10095    rmdir $DELETEDIR
10096
10097
10098
10099# These tools might not be installed by default,
10100# need hint on how to install them.
10101
10102    for ac_prog in unzip
10103do
10104  # Extract the first word of "$ac_prog", so it can be a program name with args.
10105set dummy $ac_prog; ac_word=$2
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107$as_echo_n "checking for $ac_word... " >&6; }
10108if test "${ac_cv_path_UNZIP+set}" = set; then :
10109  $as_echo_n "(cached) " >&6
10110else
10111  case $UNZIP in
10112  [\\/]* | ?:[\\/]*)
10113  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10114  ;;
10115  *)
10116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117for as_dir in $PATH
10118do
10119  IFS=$as_save_IFS
10120  test -z "$as_dir" && as_dir=.
10121    for ac_exec_ext in '' $ac_executable_extensions; do
10122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10123    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125    break 2
10126  fi
10127done
10128  done
10129IFS=$as_save_IFS
10130
10131  ;;
10132esac
10133fi
10134UNZIP=$ac_cv_path_UNZIP
10135if test -n "$UNZIP"; then
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10137$as_echo "$UNZIP" >&6; }
10138else
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144  test -n "$UNZIP" && break
10145done
10146
10147
10148    if test "x$UNZIP" = x; then
10149        if test "xunzip" = x; then
10150          PROG_NAME=unzip
10151        else
10152          PROG_NAME=unzip
10153        fi
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10155$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10156        as_fn_error $? "Cannot continue" "$LINENO" 5
10157    fi
10158
10159
10160
10161    for ac_prog in zip
10162do
10163  # Extract the first word of "$ac_prog", so it can be a program name with args.
10164set dummy $ac_prog; ac_word=$2
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10166$as_echo_n "checking for $ac_word... " >&6; }
10167if test "${ac_cv_path_ZIP+set}" = set; then :
10168  $as_echo_n "(cached) " >&6
10169else
10170  case $ZIP in
10171  [\\/]* | ?:[\\/]*)
10172  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10173  ;;
10174  *)
10175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10176for as_dir in $PATH
10177do
10178  IFS=$as_save_IFS
10179  test -z "$as_dir" && as_dir=.
10180    for ac_exec_ext in '' $ac_executable_extensions; do
10181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10182    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10184    break 2
10185  fi
10186done
10187  done
10188IFS=$as_save_IFS
10189
10190  ;;
10191esac
10192fi
10193ZIP=$ac_cv_path_ZIP
10194if test -n "$ZIP"; then
10195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10196$as_echo "$ZIP" >&6; }
10197else
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199$as_echo "no" >&6; }
10200fi
10201
10202
10203  test -n "$ZIP" && break
10204done
10205
10206
10207    if test "x$ZIP" = x; then
10208        if test "xzip" = x; then
10209          PROG_NAME=zip
10210        else
10211          PROG_NAME=zip
10212        fi
10213        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10214$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10215        as_fn_error $? "Cannot continue" "$LINENO" 5
10216    fi
10217
10218
10219
10220# Non-required basic tools
10221
10222# Extract the first word of "ldd", so it can be a program name with args.
10223set dummy ldd; ac_word=$2
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225$as_echo_n "checking for $ac_word... " >&6; }
10226if test "${ac_cv_path_LDD+set}" = set; then :
10227  $as_echo_n "(cached) " >&6
10228else
10229  case $LDD in
10230  [\\/]* | ?:[\\/]*)
10231  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10232  ;;
10233  *)
10234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10235for as_dir in $PATH
10236do
10237  IFS=$as_save_IFS
10238  test -z "$as_dir" && as_dir=.
10239    for ac_exec_ext in '' $ac_executable_extensions; do
10240  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10241    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10243    break 2
10244  fi
10245done
10246  done
10247IFS=$as_save_IFS
10248
10249  ;;
10250esac
10251fi
10252LDD=$ac_cv_path_LDD
10253if test -n "$LDD"; then
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10255$as_echo "$LDD" >&6; }
10256else
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
10259fi
10260
10261
10262if test "x$LDD" = "x"; then
10263    # List shared lib dependencies is used for
10264    # debug output and checking for forbidden dependencies.
10265    # We can build without it.
10266    LDD="true"
10267fi
10268# Extract the first word of "otool", so it can be a program name with args.
10269set dummy otool; ac_word=$2
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271$as_echo_n "checking for $ac_word... " >&6; }
10272if test "${ac_cv_path_OTOOL+set}" = set; then :
10273  $as_echo_n "(cached) " >&6
10274else
10275  case $OTOOL in
10276  [\\/]* | ?:[\\/]*)
10277  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10278  ;;
10279  *)
10280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281for as_dir in $PATH
10282do
10283  IFS=$as_save_IFS
10284  test -z "$as_dir" && as_dir=.
10285    for ac_exec_ext in '' $ac_executable_extensions; do
10286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10287    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10289    break 2
10290  fi
10291done
10292  done
10293IFS=$as_save_IFS
10294
10295  ;;
10296esac
10297fi
10298OTOOL=$ac_cv_path_OTOOL
10299if test -n "$OTOOL"; then
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10301$as_echo "$OTOOL" >&6; }
10302else
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
10305fi
10306
10307
10308if test "x$OTOOL" = "x"; then
10309   OTOOL="true"
10310fi
10311for ac_prog in readelf greadelf
10312do
10313  # Extract the first word of "$ac_prog", so it can be a program name with args.
10314set dummy $ac_prog; ac_word=$2
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316$as_echo_n "checking for $ac_word... " >&6; }
10317if test "${ac_cv_path_READELF+set}" = set; then :
10318  $as_echo_n "(cached) " >&6
10319else
10320  case $READELF in
10321  [\\/]* | ?:[\\/]*)
10322  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10323  ;;
10324  *)
10325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326for as_dir in $PATH
10327do
10328  IFS=$as_save_IFS
10329  test -z "$as_dir" && as_dir=.
10330    for ac_exec_ext in '' $ac_executable_extensions; do
10331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10332    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334    break 2
10335  fi
10336done
10337  done
10338IFS=$as_save_IFS
10339
10340  ;;
10341esac
10342fi
10343READELF=$ac_cv_path_READELF
10344if test -n "$READELF"; then
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10346$as_echo "$READELF" >&6; }
10347else
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350fi
10351
10352
10353  test -n "$READELF" && break
10354done
10355
10356# Extract the first word of "hg", so it can be a program name with args.
10357set dummy hg; ac_word=$2
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359$as_echo_n "checking for $ac_word... " >&6; }
10360if test "${ac_cv_path_HG+set}" = set; then :
10361  $as_echo_n "(cached) " >&6
10362else
10363  case $HG in
10364  [\\/]* | ?:[\\/]*)
10365  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10366  ;;
10367  *)
10368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369for as_dir in $PATH
10370do
10371  IFS=$as_save_IFS
10372  test -z "$as_dir" && as_dir=.
10373    for ac_exec_ext in '' $ac_executable_extensions; do
10374  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10375    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377    break 2
10378  fi
10379done
10380  done
10381IFS=$as_save_IFS
10382
10383  ;;
10384esac
10385fi
10386HG=$ac_cv_path_HG
10387if test -n "$HG"; then
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10389$as_echo "$HG" >&6; }
10390else
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393fi
10394
10395
10396# Extract the first word of "stat", so it can be a program name with args.
10397set dummy stat; ac_word=$2
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399$as_echo_n "checking for $ac_word... " >&6; }
10400if test "${ac_cv_path_STAT+set}" = set; then :
10401  $as_echo_n "(cached) " >&6
10402else
10403  case $STAT in
10404  [\\/]* | ?:[\\/]*)
10405  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10406  ;;
10407  *)
10408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10409for as_dir in $PATH
10410do
10411  IFS=$as_save_IFS
10412  test -z "$as_dir" && as_dir=.
10413    for ac_exec_ext in '' $ac_executable_extensions; do
10414  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10415    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10417    break 2
10418  fi
10419done
10420  done
10421IFS=$as_save_IFS
10422
10423  ;;
10424esac
10425fi
10426STAT=$ac_cv_path_STAT
10427if test -n "$STAT"; then
10428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10429$as_echo "$STAT" >&6; }
10430else
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
10433fi
10434
10435
10436# Extract the first word of "time", so it can be a program name with args.
10437set dummy time; ac_word=$2
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439$as_echo_n "checking for $ac_word... " >&6; }
10440if test "${ac_cv_path_TIME+set}" = set; then :
10441  $as_echo_n "(cached) " >&6
10442else
10443  case $TIME in
10444  [\\/]* | ?:[\\/]*)
10445  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10446  ;;
10447  *)
10448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449for as_dir in $PATH
10450do
10451  IFS=$as_save_IFS
10452  test -z "$as_dir" && as_dir=.
10453    for ac_exec_ext in '' $ac_executable_extensions; do
10454  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10455    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457    break 2
10458  fi
10459done
10460  done
10461IFS=$as_save_IFS
10462
10463  ;;
10464esac
10465fi
10466TIME=$ac_cv_path_TIME
10467if test -n "$TIME"; then
10468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10469$as_echo "$TIME" >&6; }
10470else
10471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
10473fi
10474
10475
10476# Check if it's GNU time
10477IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10478if test "x$IS_GNU_TIME" != x; then
10479  IS_GNU_TIME=yes
10480else
10481  IS_GNU_TIME=no
10482fi
10483
10484
10485if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10486
10487    for ac_prog in comm
10488do
10489  # Extract the first word of "$ac_prog", so it can be a program name with args.
10490set dummy $ac_prog; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if test "${ac_cv_path_COMM+set}" = set; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $COMM in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10508    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519COMM=$ac_cv_path_COMM
10520if test -n "$COMM"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10522$as_echo "$COMM" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529  test -n "$COMM" && break
10530done
10531
10532
10533    if test "x$COMM" = x; then
10534        if test "xcomm" = x; then
10535          PROG_NAME=comm
10536        else
10537          PROG_NAME=comm
10538        fi
10539        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10540$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10541        as_fn_error $? "Cannot continue" "$LINENO" 5
10542    fi
10543
10544
10545fi
10546
10547if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10548
10549    for ac_prog in xattr
10550do
10551  # Extract the first word of "$ac_prog", so it can be a program name with args.
10552set dummy $ac_prog; ac_word=$2
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554$as_echo_n "checking for $ac_word... " >&6; }
10555if test "${ac_cv_path_XATTR+set}" = set; then :
10556  $as_echo_n "(cached) " >&6
10557else
10558  case $XATTR in
10559  [\\/]* | ?:[\\/]*)
10560  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10561  ;;
10562  *)
10563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564for as_dir in $PATH
10565do
10566  IFS=$as_save_IFS
10567  test -z "$as_dir" && as_dir=.
10568    for ac_exec_ext in '' $ac_executable_extensions; do
10569  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10570    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572    break 2
10573  fi
10574done
10575  done
10576IFS=$as_save_IFS
10577
10578  ;;
10579esac
10580fi
10581XATTR=$ac_cv_path_XATTR
10582if test -n "$XATTR"; then
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10584$as_echo "$XATTR" >&6; }
10585else
10586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
10588fi
10589
10590
10591  test -n "$XATTR" && break
10592done
10593
10594
10595    if test "x$XATTR" = x; then
10596        if test "xxattr" = x; then
10597          PROG_NAME=xattr
10598        else
10599          PROG_NAME=xattr
10600        fi
10601        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10602$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10603        as_fn_error $? "Cannot continue" "$LINENO" 5
10604    fi
10605
10606
10607  # Extract the first word of "codesign", so it can be a program name with args.
10608set dummy codesign; ac_word=$2
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10610$as_echo_n "checking for $ac_word... " >&6; }
10611if test "${ac_cv_path_CODESIGN+set}" = set; then :
10612  $as_echo_n "(cached) " >&6
10613else
10614  case $CODESIGN in
10615  [\\/]* | ?:[\\/]*)
10616  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10617  ;;
10618  *)
10619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10620for as_dir in $PATH
10621do
10622  IFS=$as_save_IFS
10623  test -z "$as_dir" && as_dir=.
10624    for ac_exec_ext in '' $ac_executable_extensions; do
10625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10626    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10628    break 2
10629  fi
10630done
10631  done
10632IFS=$as_save_IFS
10633
10634  ;;
10635esac
10636fi
10637CODESIGN=$ac_cv_path_CODESIGN
10638if test -n "$CODESIGN"; then
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10640$as_echo "$CODESIGN" >&6; }
10641else
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
10644fi
10645
10646
10647  if test "x$CODESIGN" != "x"; then
10648    # Verify that the openjdk_codesign certificate is present
10649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10650$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10651    rm -f codesign-testfile
10652    touch codesign-testfile
10653    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10654    rm -f codesign-testfile
10655    if test "x$CODESIGN" = x; then
10656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658    else
10659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10660$as_echo "yes" >&6; }
10661    fi
10662  fi
10663fi
10664
10665
10666# Check if pkg-config is available.
10667
10668
10669if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10670	if test -n "$ac_tool_prefix"; then
10671  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10672set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
10675if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10676  $as_echo_n "(cached) " >&6
10677else
10678  case $PKG_CONFIG in
10679  [\\/]* | ?:[\\/]*)
10680  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10681  ;;
10682  *)
10683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686  IFS=$as_save_IFS
10687  test -z "$as_dir" && as_dir=.
10688    for ac_exec_ext in '' $ac_executable_extensions; do
10689  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10690    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692    break 2
10693  fi
10694done
10695  done
10696IFS=$as_save_IFS
10697
10698  ;;
10699esac
10700fi
10701PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10702if test -n "$PKG_CONFIG"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10704$as_echo "$PKG_CONFIG" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711fi
10712if test -z "$ac_cv_path_PKG_CONFIG"; then
10713  ac_pt_PKG_CONFIG=$PKG_CONFIG
10714  # Extract the first word of "pkg-config", so it can be a program name with args.
10715set dummy pkg-config; ac_word=$2
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10717$as_echo_n "checking for $ac_word... " >&6; }
10718if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10719  $as_echo_n "(cached) " >&6
10720else
10721  case $ac_pt_PKG_CONFIG in
10722  [\\/]* | ?:[\\/]*)
10723  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10724  ;;
10725  *)
10726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10727for as_dir in $PATH
10728do
10729  IFS=$as_save_IFS
10730  test -z "$as_dir" && as_dir=.
10731    for ac_exec_ext in '' $ac_executable_extensions; do
10732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10733    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10735    break 2
10736  fi
10737done
10738  done
10739IFS=$as_save_IFS
10740
10741  ;;
10742esac
10743fi
10744ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10745if test -n "$ac_pt_PKG_CONFIG"; then
10746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10747$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10748else
10749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750$as_echo "no" >&6; }
10751fi
10752
10753  if test "x$ac_pt_PKG_CONFIG" = x; then
10754    PKG_CONFIG=""
10755  else
10756    case $cross_compiling:$ac_tool_warned in
10757yes:)
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10760ac_tool_warned=yes ;;
10761esac
10762    PKG_CONFIG=$ac_pt_PKG_CONFIG
10763  fi
10764else
10765  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10766fi
10767
10768fi
10769if test -n "$PKG_CONFIG"; then
10770	_pkg_min_version=0.9.0
10771	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10772$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10773	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10774		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10775$as_echo "yes" >&6; }
10776	else
10777		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10778$as_echo "no" >&6; }
10779		PKG_CONFIG=""
10780	fi
10781
10782fi
10783
10784# After basic tools have been setup, we can check build os specific details.
10785
10786###############################################################################
10787
10788# Note that this is the build platform OS version!
10789
10790OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10791OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10792OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10793OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10794
10795
10796
10797
10798
10799# Setup builddeps, for automatic downloading of tools we need.
10800# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10801# boot-jdk setup, but we need to have basic tools setup first.
10802
10803
10804# Check whether --with-builddeps-conf was given.
10805if test "${with_builddeps_conf+set}" = set; then :
10806  withval=$with_builddeps_conf;
10807fi
10808
10809
10810
10811# Check whether --with-builddeps-server was given.
10812if test "${with_builddeps_server+set}" = set; then :
10813  withval=$with_builddeps_server;
10814fi
10815
10816
10817
10818# Check whether --with-builddeps-dir was given.
10819if test "${with_builddeps_dir+set}" = set; then :
10820  withval=$with_builddeps_dir;
10821else
10822  with_builddeps_dir=/localhome/builddeps
10823fi
10824
10825
10826
10827# Check whether --with-builddeps-group was given.
10828if test "${with_builddeps_group+set}" = set; then :
10829  withval=$with_builddeps_group;
10830fi
10831
10832
10833
10834
10835    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10836        if test "x$with_builddeps_conf" != x; then
10837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10838$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10839            builddepsfile=$with_builddeps_conf
10840            if test -s $builddepsfile; then
10841                . $builddepsfile
10842                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10843$as_echo "loaded!" >&6; }
10844            else
10845               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10846           fi
10847        else
10848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10849$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10850            builddepsfile=`mktemp`
10851            touch $builddepsfile
10852            # Put all found confs into a single file.
10853            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10854            # Source the file to acquire the variables
10855            if test -s $builddepsfile; then
10856                . $builddepsfile
10857                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10858$as_echo "found at least one!" >&6; }
10859            else
10860               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10861           fi
10862        fi
10863        # Create build and target names that use _ instead of "-" and ".".
10864        # This is necessary to use them in variable names.
10865        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10866        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10867        # Extract rewrite information for build and target
10868        eval rewritten_build=\${REWRITE_${build_var}}
10869        if test "x$rewritten_build" = x; then
10870            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10871            echo Build stays the same $rewritten_build
10872        else
10873            echo Rewriting build for builddeps into $rewritten_build
10874        fi
10875        eval rewritten_target=\${REWRITE_${target_var}}
10876        if test "x$rewritten_target" = x; then
10877            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10878            echo Target stays the same $rewritten_target
10879        else
10880            echo Rewriting target for builddeps into $rewritten_target
10881        fi
10882        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10883        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10884    fi
10885    for ac_prog in 7z unzip
10886do
10887  # Extract the first word of "$ac_prog", so it can be a program name with args.
10888set dummy $ac_prog; ac_word=$2
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890$as_echo_n "checking for $ac_word... " >&6; }
10891if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10892  $as_echo_n "(cached) " >&6
10893else
10894  if test -n "$BDEPS_UNZIP"; then
10895  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10896else
10897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10898for as_dir in $PATH
10899do
10900  IFS=$as_save_IFS
10901  test -z "$as_dir" && as_dir=.
10902    for ac_exec_ext in '' $ac_executable_extensions; do
10903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10904    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10906    break 2
10907  fi
10908done
10909  done
10910IFS=$as_save_IFS
10911
10912fi
10913fi
10914BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10915if test -n "$BDEPS_UNZIP"; then
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10917$as_echo "$BDEPS_UNZIP" >&6; }
10918else
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921fi
10922
10923
10924  test -n "$BDEPS_UNZIP" && break
10925done
10926
10927    if test "x$BDEPS_UNZIP" = x7z; then
10928        BDEPS_UNZIP="7z x"
10929    fi
10930
10931    for ac_prog in wget lftp ftp
10932do
10933  # Extract the first word of "$ac_prog", so it can be a program name with args.
10934set dummy $ac_prog; ac_word=$2
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10936$as_echo_n "checking for $ac_word... " >&6; }
10937if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10938  $as_echo_n "(cached) " >&6
10939else
10940  if test -n "$BDEPS_FTP"; then
10941  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10942else
10943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10950    ac_cv_prog_BDEPS_FTP="$ac_prog"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958fi
10959fi
10960BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10961if test -n "$BDEPS_FTP"; then
10962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10963$as_echo "$BDEPS_FTP" >&6; }
10964else
10965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
10967fi
10968
10969
10970  test -n "$BDEPS_FTP" && break
10971done
10972
10973
10974
10975###############################################################################
10976#
10977# Determine OpenJDK variants, options and version numbers.
10978#
10979###############################################################################
10980
10981# We need build & target for this.
10982
10983
10984###############################################################################
10985#
10986# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10987# We always build headless support.
10988#
10989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10990$as_echo_n "checking headful support... " >&6; }
10991# Check whether --enable-headful was given.
10992if test "${enable_headful+set}" = set; then :
10993  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10994else
10995  SUPPORT_HEADFUL=yes
10996fi
10997
10998
10999SUPPORT_HEADLESS=yes
11000BUILD_HEADLESS="BUILD_HEADLESS:=true"
11001
11002if test "x$SUPPORT_HEADFUL" = xyes; then
11003    # We are building both headful and headless.
11004    headful_msg="inlude support for both headful and headless"
11005fi
11006
11007if test "x$SUPPORT_HEADFUL" = xno; then
11008    # Thus we are building headless only.
11009    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11010    headful_msg="headless only"
11011fi
11012
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11014$as_echo "$headful_msg" >&6; }
11015
11016
11017
11018
11019
11020# Control wether Hotspot runs Queens test after build.
11021# Check whether --enable-hotspot-test-in-build was given.
11022if test "${enable_hotspot_test_in_build+set}" = set; then :
11023  enableval=$enable_hotspot_test_in_build;
11024else
11025  enable_hotspot_test_in_build=no
11026fi
11027
11028if test "x$enable_hotspot_test_in_build" = "xyes"; then
11029    TEST_IN_BUILD=true
11030else
11031    TEST_IN_BUILD=false
11032fi
11033
11034
11035###############################################################################
11036#
11037# Choose cacerts source file
11038#
11039
11040# Check whether --with-cacerts-file was given.
11041if test "${with_cacerts_file+set}" = set; then :
11042  withval=$with_cacerts_file;
11043fi
11044
11045if test "x$with_cacerts_file" != x; then
11046    CACERTS_FILE=$with_cacerts_file
11047else
11048    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11049fi
11050
11051
11052###############################################################################
11053#
11054# Enable or disable unlimited crypto
11055#
11056# Check whether --enable-unlimited-crypto was given.
11057if test "${enable_unlimited_crypto+set}" = set; then :
11058  enableval=$enable_unlimited_crypto;
11059else
11060  enable_unlimited_crypto=no
11061fi
11062
11063if test "x$enable_unlimited_crypto" = "xyes"; then
11064    UNLIMITED_CRYPTO=true
11065else
11066    UNLIMITED_CRYPTO=false
11067fi
11068
11069
11070###############################################################################
11071#
11072# Enable or disable the elliptic curve crypto implementation
11073#
11074
11075
11076###############################################################################
11077#
11078# Compress jars
11079#
11080COMPRESS_JARS=false
11081
11082
11083
11084
11085# Source the version numbers
11086. $AUTOCONF_DIR/version-numbers
11087
11088# Get the settings from parameters
11089
11090# Check whether --with-milestone was given.
11091if test "${with_milestone+set}" = set; then :
11092  withval=$with_milestone;
11093fi
11094
11095if test "x$with_milestone" = xyes; then
11096  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11097elif test "x$with_milestone" != x; then
11098    MILESTONE="$with_milestone"
11099fi
11100if test "x$MILESTONE" = x; then
11101  MILESTONE=internal
11102fi
11103
11104
11105# Check whether --with-update-version was given.
11106if test "${with_update_version+set}" = set; then :
11107  withval=$with_update_version;
11108fi
11109
11110if test "x$with_update_version" = xyes; then
11111  as_fn_error $? "Update version must have a value" "$LINENO" 5
11112elif test "x$with_update_version" != x; then
11113  JDK_UPDATE_VERSION="$with_update_version"
11114fi
11115
11116
11117# Check whether --with-build-number was given.
11118if test "${with_build_number+set}" = set; then :
11119  withval=$with_build_number;
11120fi
11121
11122if test "x$with_build_number" = xyes; then
11123  as_fn_error $? "Build number must have a value" "$LINENO" 5
11124elif test "x$with_build_number" != x; then
11125  JDK_BUILD_NUMBER="$with_build_number"
11126fi
11127if test "x$JDK_BUILD_NUMBER" = x; then
11128  JDK_BUILD_NUMBER=b00
11129fi
11130
11131
11132# Check whether --with-user-release-suffix was given.
11133if test "${with_user_release_suffix+set}" = set; then :
11134  withval=$with_user_release_suffix;
11135fi
11136
11137if test "x$with_user_release_suffix" = xyes; then
11138  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11139elif test "x$with_user_release_suffix" != x; then
11140  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11141else
11142  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11143  # Avoid [:alnum:] since it depends on the locale.
11144  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11145  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11146fi
11147
11148
11149# Now set the JDK version, milestone, build number etc.
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164COPYRIGHT_YEAR=`date +'%Y'`
11165
11166
11167if test "x$JDK_UPDATE_VERSION" != x; then
11168  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11169else
11170  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11171fi
11172
11173
11174COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11175
11176
11177
11178###############################################################################
11179#
11180# Setup BootJDK, used to bootstrap the build.
11181#
11182###############################################################################
11183
11184
11185BOOT_JDK_FOUND=no
11186
11187# Check whether --with-boot-jdk was given.
11188if test "${with_boot_jdk+set}" = set; then :
11189  withval=$with_boot_jdk;
11190fi
11191
11192
11193# We look for the Boot JDK through various means, going from more certain to
11194# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11195# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11196# must check if this is indeed valid; otherwise we'll continue looking.
11197
11198# Test: Is bootjdk explicitely set by command line arguments?
11199
11200  if test "x$BOOT_JDK_FOUND" = xno; then
11201    # Now execute the test
11202
11203if test "x$with_boot_jdk" != x; then
11204    BOOT_JDK=$with_boot_jdk
11205    BOOT_JDK_FOUND=maybe
11206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11207$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11208fi
11209
11210
11211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11213      # Do we have a bin/java?
11214      if test ! -x "$BOOT_JDK/bin/java"; then
11215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11217        BOOT_JDK_FOUND=no
11218      else
11219        # Do we have a bin/javac?
11220        if test ! -x "$BOOT_JDK/bin/javac"; then
11221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11225          BOOT_JDK_FOUND=no
11226        else
11227          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11228          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11231            BOOT_JDK_FOUND=no
11232          else
11233            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11235
11236            # Extra M4 quote needed to protect [] in grep expression.
11237            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11238            if test "x$FOUND_VERSION_78" = x; then
11239              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11241              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11242$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11243              BOOT_JDK_FOUND=no
11244            else
11245              # We're done! :-)
11246              BOOT_JDK_FOUND=yes
11247
11248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11249
11250  # Input might be given as Windows format, start by converting to
11251  # unix format.
11252  path="$BOOT_JDK"
11253  new_path=`$CYGPATH -u "$path"`
11254
11255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11258  # "foo.exe" is OK but "foo" is an error.
11259  #
11260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11261  # It is also a way to make sure we got the proper file name for the real test later on.
11262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11263  if test "x$test_shortpath" = x; then
11264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11267  fi
11268
11269  # Call helper function which possibly converts this using DOS-style short mode.
11270  # If so, the updated path is stored in $new_path.
11271
11272  input_path="$new_path"
11273  # Check if we need to convert this using DOS-style short mode. If the path
11274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11275  # take no chances and rewrite it.
11276  # Note: m4 eats our [], so we need to use [ and ] instead.
11277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11278  if test "x$has_forbidden_chars" != x; then
11279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11283      # Going to short mode and back again did indeed matter. Since short mode is
11284      # case insensitive, let's make it lowercase to improve readability.
11285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11286      # Now convert it back to Unix-stile (cygpath)
11287      input_path=`$CYGPATH -u "$shortmode_path"`
11288      new_path="$input_path"
11289    fi
11290  fi
11291
11292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11293  if test "x$test_cygdrive_prefix" = x; then
11294    # As a simple fix, exclude /usr/bin since it's not a real path.
11295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11297      # a path prefixed by /cygdrive for fixpath to work.
11298      new_path="$CYGWIN_ROOT_PATH$input_path"
11299    fi
11300  fi
11301
11302
11303  if test "x$path" != "x$new_path"; then
11304    BOOT_JDK="$new_path"
11305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11307  fi
11308
11309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11310
11311  path="$BOOT_JDK"
11312  has_colon=`$ECHO $path | $GREP ^.:`
11313  new_path="$path"
11314  if test "x$has_colon" = x; then
11315    # Not in mixed or Windows style, start by that.
11316    new_path=`cmd //c echo $path`
11317  fi
11318
11319
11320  input_path="$new_path"
11321  # Check if we need to convert this using DOS-style short mode. If the path
11322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11323  # take no chances and rewrite it.
11324  # Note: m4 eats our [], so we need to use [ and ] instead.
11325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11326  if test "x$has_forbidden_chars" != x; then
11327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11329  fi
11330
11331
11332  windows_path="$new_path"
11333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11334    unix_path=`$CYGPATH -u "$windows_path"`
11335    new_path="$unix_path"
11336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11338    new_path="$unix_path"
11339  fi
11340
11341  if test "x$path" != "x$new_path"; then
11342    BOOT_JDK="$new_path"
11343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11345  fi
11346
11347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11349
11350  else
11351    # We're on a posix platform. Hooray! :)
11352    path="$BOOT_JDK"
11353    has_space=`$ECHO "$path" | $GREP " "`
11354    if test "x$has_space" != x; then
11355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11357      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11358    fi
11359
11360    # Use eval to expand a potential ~
11361    eval path="$path"
11362    if test ! -f "$path" && test ! -d "$path"; then
11363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11364    fi
11365
11366    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11367  fi
11368
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11370$as_echo_n "checking for Boot JDK... " >&6; }
11371              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11372$as_echo "$BOOT_JDK" >&6; }
11373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11374$as_echo_n "checking Boot JDK version... " >&6; }
11375              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11377$as_echo "$BOOT_JDK_VERSION" >&6; }
11378            fi # end check jdk version
11379          fi # end check rt.jar
11380        fi # end check javac
11381      fi # end check java
11382    fi # end check boot jdk found
11383  fi
11384
11385if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11386  # Having specified an argument which is incorrect will produce an instant failure;
11387  # we should not go on looking
11388  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11389fi
11390
11391# Test: Is bootjdk available from builddeps?
11392
11393  if test "x$BOOT_JDK_FOUND" = xno; then
11394    # Now execute the test
11395
11396
11397
11398    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11399        # Source the builddeps file again, to make sure it uses the latest variables!
11400        . $builddepsfile
11401        # Look for a target and build machine specific resource!
11402        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11403        if test "x$resource" = x; then
11404            # Ok, lets instead look for a target specific resource
11405            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11406        fi
11407        if test "x$resource" = x; then
11408            # Ok, lets instead look for a build specific resource
11409            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11410        fi
11411        if test "x$resource" = x; then
11412            # Ok, lets instead look for a generic resource
11413            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11414            resource=${builddep_bootjdk}
11415        fi
11416        if test "x$resource" != x; then
11417            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11418$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11419	    # If the resource in the builddeps.conf file is an existing directory,
11420	    # for example /java/linux/cups
11421	    if test -d ${resource}; then
11422	       depdir=${resource}
11423	    else
11424
11425# bootjdk is for example mymodule
11426# $resource is for example libs/general/libmymod_1_2_3.zip
11427# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11428# $with_builddeps_dir is for example /localhome/builddeps
11429# depdir is the name of the variable into which we store the depdir, eg MYMOD
11430# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11431# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11432    filename=`basename $resource`
11433    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11434    filebase=${filename%%.*}
11435    extension=${filename#*.}
11436    installdir=$with_builddeps_dir/$filebase
11437    if test ! -f $installdir/$filename.unpacked; then
11438        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11439$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11440        if test ! -d $installdir; then
11441            mkdir -p $installdir
11442        fi
11443        if test ! -d $installdir; then
11444            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11445        fi
11446        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11447        touch $tmpfile
11448        if test ! -f $tmpfile; then
11449            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11450        fi
11451
11452    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11453    # $tmpfile is the local file name for the downloaded file.
11454    VALID_TOOL=no
11455    if test "x$BDEPS_FTP" = xwget; then
11456       VALID_TOOL=yes
11457       wget -O $tmpfile $with_builddeps_server/$resource
11458    fi
11459    if test "x$BDEPS_FTP" = xlftp; then
11460       VALID_TOOL=yes
11461       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11462    fi
11463    if test "x$BDEPS_FTP" = xftp; then
11464        VALID_TOOL=yes
11465        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11466        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11467        FTPUSERPWD=${FTPSERVER%%@*}
11468        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11469            FTPUSER=${userpwd%%:*}
11470            FTPPWD=${userpwd#*@}
11471            FTPSERVER=${FTPSERVER#*@}
11472        else
11473            FTPUSER=ftp
11474            FTPPWD=ftp
11475        fi
11476        # the "pass" command does not work on some
11477        # ftp clients (read ftp.exe) but if it works,
11478        # passive mode is better!
11479        (\
11480            echo "user $FTPUSER $FTPPWD"        ;\
11481            echo "pass"                         ;\
11482            echo "bin"                          ;\
11483            echo "get $FTPPATH $tmpfile"              ;\
11484        ) | ftp -in $FTPSERVER
11485    fi
11486    if test "x$VALID_TOOL" != xyes; then
11487       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11488    fi
11489
11490        mv $tmpfile $installdir/$filename
11491        if test ! -s $installdir/$filename; then
11492            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11493        fi
11494        case "$extension" in
11495            zip)  echo "Unzipping $installdir/$filename..."
11496               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11497            ;;
11498            tar.gz) echo "Untaring $installdir/$filename..."
11499               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11500            ;;
11501            tgz) echo "Untaring $installdir/$filename..."
11502               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11503            ;;
11504            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11505            ;;
11506        esac
11507    fi
11508    if test -f $installdir/$filename.unpacked; then
11509        depdir=$installdir
11510    fi
11511
11512	    fi
11513            # Source the builddeps file again, because in the previous command, the depdir
11514            # was updated to point at the current build dependency install directory.
11515            . $builddepsfile
11516            # Now extract variables from the builddeps.conf files.
11517            theroot=${builddep_bootjdk_ROOT}
11518            thecflags=${builddep_bootjdk_CFLAGS}
11519            thelibs=${builddep_bootjdk_LIBS}
11520            if test "x$depdir" = x; then
11521                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11522            fi
11523            BOOT_JDK=$depdir
11524            if test "x$theroot" != x; then
11525               BOOT_JDK="$theroot"
11526            fi
11527            if test "x$thecflags" != x; then
11528               BOOT_JDK_CFLAGS="$thecflags"
11529            fi
11530            if test "x$thelibs" != x; then
11531               BOOT_JDK_LIBS="$thelibs"
11532            fi
11533            BOOT_JDK_FOUND=maybe
11534            else BOOT_JDK_FOUND=no
11535
11536        fi
11537        else BOOT_JDK_FOUND=no
11538
11539    fi
11540
11541
11542
11543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11545      # Do we have a bin/java?
11546      if test ! -x "$BOOT_JDK/bin/java"; then
11547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11549        BOOT_JDK_FOUND=no
11550      else
11551        # Do we have a bin/javac?
11552        if test ! -x "$BOOT_JDK/bin/javac"; then
11553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11557          BOOT_JDK_FOUND=no
11558        else
11559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11563            BOOT_JDK_FOUND=no
11564          else
11565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11567
11568            # Extra M4 quote needed to protect [] in grep expression.
11569            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11570            if test "x$FOUND_VERSION_78" = x; then
11571              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11573              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11574$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11575              BOOT_JDK_FOUND=no
11576            else
11577              # We're done! :-)
11578              BOOT_JDK_FOUND=yes
11579
11580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11581
11582  # Input might be given as Windows format, start by converting to
11583  # unix format.
11584  path="$BOOT_JDK"
11585  new_path=`$CYGPATH -u "$path"`
11586
11587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11590  # "foo.exe" is OK but "foo" is an error.
11591  #
11592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11593  # It is also a way to make sure we got the proper file name for the real test later on.
11594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11595  if test "x$test_shortpath" = x; then
11596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11599  fi
11600
11601  # Call helper function which possibly converts this using DOS-style short mode.
11602  # If so, the updated path is stored in $new_path.
11603
11604  input_path="$new_path"
11605  # Check if we need to convert this using DOS-style short mode. If the path
11606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11607  # take no chances and rewrite it.
11608  # Note: m4 eats our [], so we need to use [ and ] instead.
11609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11610  if test "x$has_forbidden_chars" != x; then
11611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11615      # Going to short mode and back again did indeed matter. Since short mode is
11616      # case insensitive, let's make it lowercase to improve readability.
11617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11618      # Now convert it back to Unix-stile (cygpath)
11619      input_path=`$CYGPATH -u "$shortmode_path"`
11620      new_path="$input_path"
11621    fi
11622  fi
11623
11624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11625  if test "x$test_cygdrive_prefix" = x; then
11626    # As a simple fix, exclude /usr/bin since it's not a real path.
11627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11629      # a path prefixed by /cygdrive for fixpath to work.
11630      new_path="$CYGWIN_ROOT_PATH$input_path"
11631    fi
11632  fi
11633
11634
11635  if test "x$path" != "x$new_path"; then
11636    BOOT_JDK="$new_path"
11637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11639  fi
11640
11641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11642
11643  path="$BOOT_JDK"
11644  has_colon=`$ECHO $path | $GREP ^.:`
11645  new_path="$path"
11646  if test "x$has_colon" = x; then
11647    # Not in mixed or Windows style, start by that.
11648    new_path=`cmd //c echo $path`
11649  fi
11650
11651
11652  input_path="$new_path"
11653  # Check if we need to convert this using DOS-style short mode. If the path
11654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11655  # take no chances and rewrite it.
11656  # Note: m4 eats our [], so we need to use [ and ] instead.
11657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11658  if test "x$has_forbidden_chars" != x; then
11659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11661  fi
11662
11663
11664  windows_path="$new_path"
11665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11666    unix_path=`$CYGPATH -u "$windows_path"`
11667    new_path="$unix_path"
11668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11670    new_path="$unix_path"
11671  fi
11672
11673  if test "x$path" != "x$new_path"; then
11674    BOOT_JDK="$new_path"
11675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11677  fi
11678
11679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11681
11682  else
11683    # We're on a posix platform. Hooray! :)
11684    path="$BOOT_JDK"
11685    has_space=`$ECHO "$path" | $GREP " "`
11686    if test "x$has_space" != x; then
11687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11690    fi
11691
11692    # Use eval to expand a potential ~
11693    eval path="$path"
11694    if test ! -f "$path" && test ! -d "$path"; then
11695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11696    fi
11697
11698    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11699  fi
11700
11701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11702$as_echo_n "checking for Boot JDK... " >&6; }
11703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11704$as_echo "$BOOT_JDK" >&6; }
11705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11706$as_echo_n "checking Boot JDK version... " >&6; }
11707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11709$as_echo "$BOOT_JDK_VERSION" >&6; }
11710            fi # end check jdk version
11711          fi # end check rt.jar
11712        fi # end check javac
11713      fi # end check java
11714    fi # end check boot jdk found
11715  fi
11716
11717
11718# Test: Is $JAVA_HOME set?
11719
11720  if test "x$BOOT_JDK_FOUND" = xno; then
11721    # Now execute the test
11722
11723    if test "x$JAVA_HOME" != x; then
11724        JAVA_HOME_PROCESSED="$JAVA_HOME"
11725
11726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11727
11728  # Input might be given as Windows format, start by converting to
11729  # unix format.
11730  path="$JAVA_HOME_PROCESSED"
11731  new_path=`$CYGPATH -u "$path"`
11732
11733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11736  # "foo.exe" is OK but "foo" is an error.
11737  #
11738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11739  # It is also a way to make sure we got the proper file name for the real test later on.
11740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11741  if test "x$test_shortpath" = x; then
11742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11743$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11744    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11745  fi
11746
11747  # Call helper function which possibly converts this using DOS-style short mode.
11748  # If so, the updated path is stored in $new_path.
11749
11750  input_path="$new_path"
11751  # Check if we need to convert this using DOS-style short mode. If the path
11752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11753  # take no chances and rewrite it.
11754  # Note: m4 eats our [], so we need to use [ and ] instead.
11755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11756  if test "x$has_forbidden_chars" != x; then
11757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11761      # Going to short mode and back again did indeed matter. Since short mode is
11762      # case insensitive, let's make it lowercase to improve readability.
11763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11764      # Now convert it back to Unix-stile (cygpath)
11765      input_path=`$CYGPATH -u "$shortmode_path"`
11766      new_path="$input_path"
11767    fi
11768  fi
11769
11770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11771  if test "x$test_cygdrive_prefix" = x; then
11772    # As a simple fix, exclude /usr/bin since it's not a real path.
11773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11775      # a path prefixed by /cygdrive for fixpath to work.
11776      new_path="$CYGWIN_ROOT_PATH$input_path"
11777    fi
11778  fi
11779
11780
11781  if test "x$path" != "x$new_path"; then
11782    JAVA_HOME_PROCESSED="$new_path"
11783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11784$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11785  fi
11786
11787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11788
11789  path="$JAVA_HOME_PROCESSED"
11790  has_colon=`$ECHO $path | $GREP ^.:`
11791  new_path="$path"
11792  if test "x$has_colon" = x; then
11793    # Not in mixed or Windows style, start by that.
11794    new_path=`cmd //c echo $path`
11795  fi
11796
11797
11798  input_path="$new_path"
11799  # Check if we need to convert this using DOS-style short mode. If the path
11800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11801  # take no chances and rewrite it.
11802  # Note: m4 eats our [], so we need to use [ and ] instead.
11803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11804  if test "x$has_forbidden_chars" != x; then
11805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11807  fi
11808
11809
11810  windows_path="$new_path"
11811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11812    unix_path=`$CYGPATH -u "$windows_path"`
11813    new_path="$unix_path"
11814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11816    new_path="$unix_path"
11817  fi
11818
11819  if test "x$path" != "x$new_path"; then
11820    JAVA_HOME_PROCESSED="$new_path"
11821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11822$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11823  fi
11824
11825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11827
11828  else
11829    # We're on a posix platform. Hooray! :)
11830    path="$JAVA_HOME_PROCESSED"
11831    has_space=`$ECHO "$path" | $GREP " "`
11832    if test "x$has_space" != x; then
11833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11834$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11836    fi
11837
11838    # Use eval to expand a potential ~
11839    eval path="$path"
11840    if test ! -f "$path" && test ! -d "$path"; then
11841      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11842    fi
11843
11844    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11845  fi
11846
11847        if test ! -d "$JAVA_HOME_PROCESSED"; then
11848            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11849$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11850        else
11851          # Aha, the user has set a JAVA_HOME
11852          # let us use that as the Boot JDK.
11853          BOOT_JDK="$JAVA_HOME_PROCESSED"
11854          BOOT_JDK_FOUND=maybe
11855          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11856$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11857        fi
11858    fi
11859
11860
11861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11863      # Do we have a bin/java?
11864      if test ! -x "$BOOT_JDK/bin/java"; then
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11867        BOOT_JDK_FOUND=no
11868      else
11869        # Do we have a bin/javac?
11870        if test ! -x "$BOOT_JDK/bin/javac"; then
11871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11875          BOOT_JDK_FOUND=no
11876        else
11877          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11878          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11879            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11881            BOOT_JDK_FOUND=no
11882          else
11883            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11885
11886            # Extra M4 quote needed to protect [] in grep expression.
11887            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11888            if test "x$FOUND_VERSION_78" = x; then
11889              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11891              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11892$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11893              BOOT_JDK_FOUND=no
11894            else
11895              # We're done! :-)
11896              BOOT_JDK_FOUND=yes
11897
11898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11899
11900  # Input might be given as Windows format, start by converting to
11901  # unix format.
11902  path="$BOOT_JDK"
11903  new_path=`$CYGPATH -u "$path"`
11904
11905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11908  # "foo.exe" is OK but "foo" is an error.
11909  #
11910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11911  # It is also a way to make sure we got the proper file name for the real test later on.
11912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11913  if test "x$test_shortpath" = x; then
11914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11917  fi
11918
11919  # Call helper function which possibly converts this using DOS-style short mode.
11920  # If so, the updated path is stored in $new_path.
11921
11922  input_path="$new_path"
11923  # Check if we need to convert this using DOS-style short mode. If the path
11924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11925  # take no chances and rewrite it.
11926  # Note: m4 eats our [], so we need to use [ and ] instead.
11927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11928  if test "x$has_forbidden_chars" != x; then
11929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11933      # Going to short mode and back again did indeed matter. Since short mode is
11934      # case insensitive, let's make it lowercase to improve readability.
11935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11936      # Now convert it back to Unix-stile (cygpath)
11937      input_path=`$CYGPATH -u "$shortmode_path"`
11938      new_path="$input_path"
11939    fi
11940  fi
11941
11942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11943  if test "x$test_cygdrive_prefix" = x; then
11944    # As a simple fix, exclude /usr/bin since it's not a real path.
11945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11947      # a path prefixed by /cygdrive for fixpath to work.
11948      new_path="$CYGWIN_ROOT_PATH$input_path"
11949    fi
11950  fi
11951
11952
11953  if test "x$path" != "x$new_path"; then
11954    BOOT_JDK="$new_path"
11955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11957  fi
11958
11959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11960
11961  path="$BOOT_JDK"
11962  has_colon=`$ECHO $path | $GREP ^.:`
11963  new_path="$path"
11964  if test "x$has_colon" = x; then
11965    # Not in mixed or Windows style, start by that.
11966    new_path=`cmd //c echo $path`
11967  fi
11968
11969
11970  input_path="$new_path"
11971  # Check if we need to convert this using DOS-style short mode. If the path
11972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11973  # take no chances and rewrite it.
11974  # Note: m4 eats our [], so we need to use [ and ] instead.
11975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11976  if test "x$has_forbidden_chars" != x; then
11977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11979  fi
11980
11981
11982  windows_path="$new_path"
11983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11984    unix_path=`$CYGPATH -u "$windows_path"`
11985    new_path="$unix_path"
11986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11988    new_path="$unix_path"
11989  fi
11990
11991  if test "x$path" != "x$new_path"; then
11992    BOOT_JDK="$new_path"
11993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11995  fi
11996
11997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11999
12000  else
12001    # We're on a posix platform. Hooray! :)
12002    path="$BOOT_JDK"
12003    has_space=`$ECHO "$path" | $GREP " "`
12004    if test "x$has_space" != x; then
12005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12007      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12008    fi
12009
12010    # Use eval to expand a potential ~
12011    eval path="$path"
12012    if test ! -f "$path" && test ! -d "$path"; then
12013      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12014    fi
12015
12016    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12017  fi
12018
12019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12020$as_echo_n "checking for Boot JDK... " >&6; }
12021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12022$as_echo "$BOOT_JDK" >&6; }
12023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12024$as_echo_n "checking Boot JDK version... " >&6; }
12025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12027$as_echo "$BOOT_JDK_VERSION" >&6; }
12028            fi # end check jdk version
12029          fi # end check rt.jar
12030        fi # end check javac
12031      fi # end check java
12032    fi # end check boot jdk found
12033  fi
12034
12035
12036# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12037
12038  if test "x$BOOT_JDK_FOUND" = xno; then
12039    # Now execute the test
12040
12041    if test -x /usr/libexec/java_home; then
12042        BOOT_JDK=`/usr/libexec/java_home`
12043        BOOT_JDK_FOUND=maybe
12044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12045$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12046    fi
12047
12048
12049    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12050    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12051      # Do we have a bin/java?
12052      if test ! -x "$BOOT_JDK/bin/java"; then
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12055        BOOT_JDK_FOUND=no
12056      else
12057        # Do we have a bin/javac?
12058        if test ! -x "$BOOT_JDK/bin/javac"; then
12059          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12061          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12062$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12063          BOOT_JDK_FOUND=no
12064        else
12065          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12066          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12069            BOOT_JDK_FOUND=no
12070          else
12071            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12072            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12073
12074            # Extra M4 quote needed to protect [] in grep expression.
12075            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12076            if test "x$FOUND_VERSION_78" = x; then
12077              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12079              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12080$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12081              BOOT_JDK_FOUND=no
12082            else
12083              # We're done! :-)
12084              BOOT_JDK_FOUND=yes
12085
12086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12087
12088  # Input might be given as Windows format, start by converting to
12089  # unix format.
12090  path="$BOOT_JDK"
12091  new_path=`$CYGPATH -u "$path"`
12092
12093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12096  # "foo.exe" is OK but "foo" is an error.
12097  #
12098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12099  # It is also a way to make sure we got the proper file name for the real test later on.
12100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12101  if test "x$test_shortpath" = x; then
12102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12103$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12104    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12105  fi
12106
12107  # Call helper function which possibly converts this using DOS-style short mode.
12108  # If so, the updated path is stored in $new_path.
12109
12110  input_path="$new_path"
12111  # Check if we need to convert this using DOS-style short mode. If the path
12112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12113  # take no chances and rewrite it.
12114  # Note: m4 eats our [], so we need to use [ and ] instead.
12115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12116  if test "x$has_forbidden_chars" != x; then
12117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12121      # Going to short mode and back again did indeed matter. Since short mode is
12122      # case insensitive, let's make it lowercase to improve readability.
12123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12124      # Now convert it back to Unix-stile (cygpath)
12125      input_path=`$CYGPATH -u "$shortmode_path"`
12126      new_path="$input_path"
12127    fi
12128  fi
12129
12130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12131  if test "x$test_cygdrive_prefix" = x; then
12132    # As a simple fix, exclude /usr/bin since it's not a real path.
12133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12135      # a path prefixed by /cygdrive for fixpath to work.
12136      new_path="$CYGWIN_ROOT_PATH$input_path"
12137    fi
12138  fi
12139
12140
12141  if test "x$path" != "x$new_path"; then
12142    BOOT_JDK="$new_path"
12143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12145  fi
12146
12147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12148
12149  path="$BOOT_JDK"
12150  has_colon=`$ECHO $path | $GREP ^.:`
12151  new_path="$path"
12152  if test "x$has_colon" = x; then
12153    # Not in mixed or Windows style, start by that.
12154    new_path=`cmd //c echo $path`
12155  fi
12156
12157
12158  input_path="$new_path"
12159  # Check if we need to convert this using DOS-style short mode. If the path
12160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12161  # take no chances and rewrite it.
12162  # Note: m4 eats our [], so we need to use [ and ] instead.
12163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12164  if test "x$has_forbidden_chars" != x; then
12165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12167  fi
12168
12169
12170  windows_path="$new_path"
12171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12172    unix_path=`$CYGPATH -u "$windows_path"`
12173    new_path="$unix_path"
12174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12176    new_path="$unix_path"
12177  fi
12178
12179  if test "x$path" != "x$new_path"; then
12180    BOOT_JDK="$new_path"
12181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12183  fi
12184
12185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12187
12188  else
12189    # We're on a posix platform. Hooray! :)
12190    path="$BOOT_JDK"
12191    has_space=`$ECHO "$path" | $GREP " "`
12192    if test "x$has_space" != x; then
12193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12195      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12196    fi
12197
12198    # Use eval to expand a potential ~
12199    eval path="$path"
12200    if test ! -f "$path" && test ! -d "$path"; then
12201      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12202    fi
12203
12204    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12205  fi
12206
12207              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12208$as_echo_n "checking for Boot JDK... " >&6; }
12209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12210$as_echo "$BOOT_JDK" >&6; }
12211              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12212$as_echo_n "checking Boot JDK version... " >&6; }
12213              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12215$as_echo "$BOOT_JDK_VERSION" >&6; }
12216            fi # end check jdk version
12217          fi # end check rt.jar
12218        fi # end check javac
12219      fi # end check java
12220    fi # end check boot jdk found
12221  fi
12222
12223
12224# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12225
12226  if test "x$BOOT_JDK_FOUND" = xno; then
12227    # Now execute the test
12228
12229    # Extract the first word of "javac", so it can be a program name with args.
12230set dummy javac; ac_word=$2
12231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12232$as_echo_n "checking for $ac_word... " >&6; }
12233if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12234  $as_echo_n "(cached) " >&6
12235else
12236  case $JAVAC_CHECK in
12237  [\\/]* | ?:[\\/]*)
12238  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12239  ;;
12240  *)
12241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12242for as_dir in $PATH
12243do
12244  IFS=$as_save_IFS
12245  test -z "$as_dir" && as_dir=.
12246    for ac_exec_ext in '' $ac_executable_extensions; do
12247  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12248    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12250    break 2
12251  fi
12252done
12253  done
12254IFS=$as_save_IFS
12255
12256  ;;
12257esac
12258fi
12259JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12260if test -n "$JAVAC_CHECK"; then
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12262$as_echo "$JAVAC_CHECK" >&6; }
12263else
12264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
12266fi
12267
12268
12269    # Extract the first word of "java", so it can be a program name with args.
12270set dummy java; ac_word=$2
12271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12272$as_echo_n "checking for $ac_word... " >&6; }
12273if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12274  $as_echo_n "(cached) " >&6
12275else
12276  case $JAVA_CHECK in
12277  [\\/]* | ?:[\\/]*)
12278  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12279  ;;
12280  *)
12281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12282for as_dir in $PATH
12283do
12284  IFS=$as_save_IFS
12285  test -z "$as_dir" && as_dir=.
12286    for ac_exec_ext in '' $ac_executable_extensions; do
12287  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12288    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12290    break 2
12291  fi
12292done
12293  done
12294IFS=$as_save_IFS
12295
12296  ;;
12297esac
12298fi
12299JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12300if test -n "$JAVA_CHECK"; then
12301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12302$as_echo "$JAVA_CHECK" >&6; }
12303else
12304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12305$as_echo "no" >&6; }
12306fi
12307
12308
12309    BINARY="$JAVAC_CHECK"
12310    if test "x$JAVAC_CHECK" = x; then
12311        BINARY="$JAVA_CHECK"
12312    fi
12313    if test "x$BINARY" != x; then
12314        # So there is a java(c) binary, it might be part of a JDK.
12315        # Lets find the JDK/JRE directory by following symbolic links.
12316        # Linux/GNU systems often have links from /usr/bin/java to
12317        # /etc/alternatives/java to the real JDK binary.
12318
12319    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12320        # Follow a chain of symbolic links. Use readlink
12321        # where it exists, else fall back to horribly
12322        # complicated shell code.
12323        if test "x$READLINK_TESTED" != yes; then
12324            # On MacOSX there is a readlink tool with a different
12325            # purpose than the GNU readlink tool. Check the found readlink.
12326            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12327            if test "x$ISGNU" = x; then
12328                 # A readlink that we do not know how to use.
12329                 # Are there other non-GNU readlinks out there?
12330                 READLINK_TESTED=yes
12331                 READLINK=
12332            fi
12333        fi
12334
12335        if test "x$READLINK" != x; then
12336            BINARY=`$READLINK -f $BINARY`
12337        else
12338            # Save the current directory for restoring afterwards
12339            STARTDIR=$PWD
12340            COUNTER=0
12341            sym_link_dir=`$DIRNAME $BINARY`
12342            sym_link_file=`$BASENAME $BINARY`
12343            cd $sym_link_dir
12344            # Use -P flag to resolve symlinks in directories.
12345            cd `$THEPWDCMD -P`
12346            sym_link_dir=`$THEPWDCMD -P`
12347            # Resolve file symlinks
12348            while test $COUNTER -lt 20; do
12349                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12350                if test "x$ISLINK" == x; then
12351                    # This is not a symbolic link! We are done!
12352                    break
12353                fi
12354                # Again resolve directory symlinks since the target of the just found
12355                # link could be in a different directory
12356                cd `$DIRNAME $ISLINK`
12357                sym_link_dir=`$THEPWDCMD -P`
12358                sym_link_file=`$BASENAME $ISLINK`
12359                let COUNTER=COUNTER+1
12360            done
12361            cd $STARTDIR
12362            BINARY=$sym_link_dir/$sym_link_file
12363        fi
12364    fi
12365
12366        BOOT_JDK=`dirname "$BINARY"`
12367        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12368        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12369            # Looks like we found ourselves an JDK
12370            BOOT_JDK_FOUND=maybe
12371            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12372$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12373        fi
12374    fi
12375
12376
12377    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12378    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12379      # Do we have a bin/java?
12380      if test ! -x "$BOOT_JDK/bin/java"; then
12381        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12383        BOOT_JDK_FOUND=no
12384      else
12385        # Do we have a bin/javac?
12386        if test ! -x "$BOOT_JDK/bin/javac"; then
12387          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12389          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12390$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12391          BOOT_JDK_FOUND=no
12392        else
12393          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12394          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12397            BOOT_JDK_FOUND=no
12398          else
12399            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12400            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12401
12402            # Extra M4 quote needed to protect [] in grep expression.
12403            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12404            if test "x$FOUND_VERSION_78" = x; then
12405              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12407              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12408$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12409              BOOT_JDK_FOUND=no
12410            else
12411              # We're done! :-)
12412              BOOT_JDK_FOUND=yes
12413
12414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12415
12416  # Input might be given as Windows format, start by converting to
12417  # unix format.
12418  path="$BOOT_JDK"
12419  new_path=`$CYGPATH -u "$path"`
12420
12421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12424  # "foo.exe" is OK but "foo" is an error.
12425  #
12426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12427  # It is also a way to make sure we got the proper file name for the real test later on.
12428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12429  if test "x$test_shortpath" = x; then
12430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12431$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12432    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12433  fi
12434
12435  # Call helper function which possibly converts this using DOS-style short mode.
12436  # If so, the updated path is stored in $new_path.
12437
12438  input_path="$new_path"
12439  # Check if we need to convert this using DOS-style short mode. If the path
12440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12441  # take no chances and rewrite it.
12442  # Note: m4 eats our [], so we need to use [ and ] instead.
12443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12444  if test "x$has_forbidden_chars" != x; then
12445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12449      # Going to short mode and back again did indeed matter. Since short mode is
12450      # case insensitive, let's make it lowercase to improve readability.
12451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12452      # Now convert it back to Unix-stile (cygpath)
12453      input_path=`$CYGPATH -u "$shortmode_path"`
12454      new_path="$input_path"
12455    fi
12456  fi
12457
12458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12459  if test "x$test_cygdrive_prefix" = x; then
12460    # As a simple fix, exclude /usr/bin since it's not a real path.
12461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12463      # a path prefixed by /cygdrive for fixpath to work.
12464      new_path="$CYGWIN_ROOT_PATH$input_path"
12465    fi
12466  fi
12467
12468
12469  if test "x$path" != "x$new_path"; then
12470    BOOT_JDK="$new_path"
12471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12473  fi
12474
12475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12476
12477  path="$BOOT_JDK"
12478  has_colon=`$ECHO $path | $GREP ^.:`
12479  new_path="$path"
12480  if test "x$has_colon" = x; then
12481    # Not in mixed or Windows style, start by that.
12482    new_path=`cmd //c echo $path`
12483  fi
12484
12485
12486  input_path="$new_path"
12487  # Check if we need to convert this using DOS-style short mode. If the path
12488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12489  # take no chances and rewrite it.
12490  # Note: m4 eats our [], so we need to use [ and ] instead.
12491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12492  if test "x$has_forbidden_chars" != x; then
12493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12495  fi
12496
12497
12498  windows_path="$new_path"
12499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12500    unix_path=`$CYGPATH -u "$windows_path"`
12501    new_path="$unix_path"
12502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12504    new_path="$unix_path"
12505  fi
12506
12507  if test "x$path" != "x$new_path"; then
12508    BOOT_JDK="$new_path"
12509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12511  fi
12512
12513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12515
12516  else
12517    # We're on a posix platform. Hooray! :)
12518    path="$BOOT_JDK"
12519    has_space=`$ECHO "$path" | $GREP " "`
12520    if test "x$has_space" != x; then
12521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12524    fi
12525
12526    # Use eval to expand a potential ~
12527    eval path="$path"
12528    if test ! -f "$path" && test ! -d "$path"; then
12529      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12530    fi
12531
12532    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12533  fi
12534
12535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12536$as_echo_n "checking for Boot JDK... " >&6; }
12537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12538$as_echo "$BOOT_JDK" >&6; }
12539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12540$as_echo_n "checking Boot JDK version... " >&6; }
12541              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12543$as_echo "$BOOT_JDK_VERSION" >&6; }
12544            fi # end check jdk version
12545          fi # end check rt.jar
12546        fi # end check javac
12547      fi # end check java
12548    fi # end check boot jdk found
12549  fi
12550
12551
12552# Test: Is there a JDK installed in default, well-known locations?
12553
12554  if test "x$BOOT_JDK_FOUND" = xno; then
12555    # Now execute the test
12556
12557  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12558
12559  if test "x$BOOT_JDK_FOUND" = xno; then
12560    # Now execute the test
12561
12562  if test "x$ProgramW6432" != x; then
12563    VIRTUAL_DIR="$ProgramW6432/Java"
12564
12565  windows_path="$VIRTUAL_DIR"
12566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12567    unix_path=`$CYGPATH -u "$windows_path"`
12568    VIRTUAL_DIR="$unix_path"
12569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12571    VIRTUAL_DIR="$unix_path"
12572  fi
12573
12574
12575  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12576  BOOT_JDK_SUFFIX=""
12577  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12578  if test "x$ALL_JDKS_FOUND" != x; then
12579    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12580
12581  if test "x$BOOT_JDK_FOUND" = xno; then
12582    # Now execute the test
12583
12584        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12585        if test -d "$BOOT_JDK"; then
12586          BOOT_JDK_FOUND=maybe
12587          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12588$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12589        fi
12590
12591
12592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12594      # Do we have a bin/java?
12595      if test ! -x "$BOOT_JDK/bin/java"; then
12596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12598        BOOT_JDK_FOUND=no
12599      else
12600        # Do we have a bin/javac?
12601        if test ! -x "$BOOT_JDK/bin/javac"; then
12602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12606          BOOT_JDK_FOUND=no
12607        else
12608          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12609          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12612            BOOT_JDK_FOUND=no
12613          else
12614            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12616
12617            # Extra M4 quote needed to protect [] in grep expression.
12618            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12619            if test "x$FOUND_VERSION_78" = x; then
12620              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12622              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12623$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12624              BOOT_JDK_FOUND=no
12625            else
12626              # We're done! :-)
12627              BOOT_JDK_FOUND=yes
12628
12629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12630
12631  # Input might be given as Windows format, start by converting to
12632  # unix format.
12633  path="$BOOT_JDK"
12634  new_path=`$CYGPATH -u "$path"`
12635
12636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12639  # "foo.exe" is OK but "foo" is an error.
12640  #
12641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12642  # It is also a way to make sure we got the proper file name for the real test later on.
12643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12644  if test "x$test_shortpath" = x; then
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12648  fi
12649
12650  # Call helper function which possibly converts this using DOS-style short mode.
12651  # If so, the updated path is stored in $new_path.
12652
12653  input_path="$new_path"
12654  # Check if we need to convert this using DOS-style short mode. If the path
12655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12656  # take no chances and rewrite it.
12657  # Note: m4 eats our [], so we need to use [ and ] instead.
12658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12659  if test "x$has_forbidden_chars" != x; then
12660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12664      # Going to short mode and back again did indeed matter. Since short mode is
12665      # case insensitive, let's make it lowercase to improve readability.
12666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12667      # Now convert it back to Unix-stile (cygpath)
12668      input_path=`$CYGPATH -u "$shortmode_path"`
12669      new_path="$input_path"
12670    fi
12671  fi
12672
12673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12674  if test "x$test_cygdrive_prefix" = x; then
12675    # As a simple fix, exclude /usr/bin since it's not a real path.
12676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12678      # a path prefixed by /cygdrive for fixpath to work.
12679      new_path="$CYGWIN_ROOT_PATH$input_path"
12680    fi
12681  fi
12682
12683
12684  if test "x$path" != "x$new_path"; then
12685    BOOT_JDK="$new_path"
12686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12688  fi
12689
12690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12691
12692  path="$BOOT_JDK"
12693  has_colon=`$ECHO $path | $GREP ^.:`
12694  new_path="$path"
12695  if test "x$has_colon" = x; then
12696    # Not in mixed or Windows style, start by that.
12697    new_path=`cmd //c echo $path`
12698  fi
12699
12700
12701  input_path="$new_path"
12702  # Check if we need to convert this using DOS-style short mode. If the path
12703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12704  # take no chances and rewrite it.
12705  # Note: m4 eats our [], so we need to use [ and ] instead.
12706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12707  if test "x$has_forbidden_chars" != x; then
12708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12710  fi
12711
12712
12713  windows_path="$new_path"
12714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12715    unix_path=`$CYGPATH -u "$windows_path"`
12716    new_path="$unix_path"
12717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12719    new_path="$unix_path"
12720  fi
12721
12722  if test "x$path" != "x$new_path"; then
12723    BOOT_JDK="$new_path"
12724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12726  fi
12727
12728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12730
12731  else
12732    # We're on a posix platform. Hooray! :)
12733    path="$BOOT_JDK"
12734    has_space=`$ECHO "$path" | $GREP " "`
12735    if test "x$has_space" != x; then
12736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12739    fi
12740
12741    # Use eval to expand a potential ~
12742    eval path="$path"
12743    if test ! -f "$path" && test ! -d "$path"; then
12744      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12745    fi
12746
12747    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12748  fi
12749
12750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12751$as_echo_n "checking for Boot JDK... " >&6; }
12752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12753$as_echo "$BOOT_JDK" >&6; }
12754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12755$as_echo_n "checking Boot JDK version... " >&6; }
12756              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12758$as_echo "$BOOT_JDK_VERSION" >&6; }
12759            fi # end check jdk version
12760          fi # end check rt.jar
12761        fi # end check javac
12762      fi # end check java
12763    fi # end check boot jdk found
12764  fi
12765
12766    done
12767  fi
12768
12769  fi
12770
12771
12772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12774      # Do we have a bin/java?
12775      if test ! -x "$BOOT_JDK/bin/java"; then
12776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12778        BOOT_JDK_FOUND=no
12779      else
12780        # Do we have a bin/javac?
12781        if test ! -x "$BOOT_JDK/bin/javac"; then
12782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12786          BOOT_JDK_FOUND=no
12787        else
12788          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12789          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12792            BOOT_JDK_FOUND=no
12793          else
12794            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12795            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12796
12797            # Extra M4 quote needed to protect [] in grep expression.
12798            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12799            if test "x$FOUND_VERSION_78" = x; then
12800              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12802              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12803$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12804              BOOT_JDK_FOUND=no
12805            else
12806              # We're done! :-)
12807              BOOT_JDK_FOUND=yes
12808
12809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12810
12811  # Input might be given as Windows format, start by converting to
12812  # unix format.
12813  path="$BOOT_JDK"
12814  new_path=`$CYGPATH -u "$path"`
12815
12816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12819  # "foo.exe" is OK but "foo" is an error.
12820  #
12821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12822  # It is also a way to make sure we got the proper file name for the real test later on.
12823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12824  if test "x$test_shortpath" = x; then
12825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12828  fi
12829
12830  # Call helper function which possibly converts this using DOS-style short mode.
12831  # If so, the updated path is stored in $new_path.
12832
12833  input_path="$new_path"
12834  # Check if we need to convert this using DOS-style short mode. If the path
12835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12836  # take no chances and rewrite it.
12837  # Note: m4 eats our [], so we need to use [ and ] instead.
12838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12839  if test "x$has_forbidden_chars" != x; then
12840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12844      # Going to short mode and back again did indeed matter. Since short mode is
12845      # case insensitive, let's make it lowercase to improve readability.
12846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12847      # Now convert it back to Unix-stile (cygpath)
12848      input_path=`$CYGPATH -u "$shortmode_path"`
12849      new_path="$input_path"
12850    fi
12851  fi
12852
12853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12854  if test "x$test_cygdrive_prefix" = x; then
12855    # As a simple fix, exclude /usr/bin since it's not a real path.
12856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12858      # a path prefixed by /cygdrive for fixpath to work.
12859      new_path="$CYGWIN_ROOT_PATH$input_path"
12860    fi
12861  fi
12862
12863
12864  if test "x$path" != "x$new_path"; then
12865    BOOT_JDK="$new_path"
12866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12868  fi
12869
12870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12871
12872  path="$BOOT_JDK"
12873  has_colon=`$ECHO $path | $GREP ^.:`
12874  new_path="$path"
12875  if test "x$has_colon" = x; then
12876    # Not in mixed or Windows style, start by that.
12877    new_path=`cmd //c echo $path`
12878  fi
12879
12880
12881  input_path="$new_path"
12882  # Check if we need to convert this using DOS-style short mode. If the path
12883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12884  # take no chances and rewrite it.
12885  # Note: m4 eats our [], so we need to use [ and ] instead.
12886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12887  if test "x$has_forbidden_chars" != x; then
12888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12890  fi
12891
12892
12893  windows_path="$new_path"
12894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12895    unix_path=`$CYGPATH -u "$windows_path"`
12896    new_path="$unix_path"
12897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12899    new_path="$unix_path"
12900  fi
12901
12902  if test "x$path" != "x$new_path"; then
12903    BOOT_JDK="$new_path"
12904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12906  fi
12907
12908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12910
12911  else
12912    # We're on a posix platform. Hooray! :)
12913    path="$BOOT_JDK"
12914    has_space=`$ECHO "$path" | $GREP " "`
12915    if test "x$has_space" != x; then
12916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12919    fi
12920
12921    # Use eval to expand a potential ~
12922    eval path="$path"
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    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12928  fi
12929
12930              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12931$as_echo_n "checking for Boot JDK... " >&6; }
12932              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12933$as_echo "$BOOT_JDK" >&6; }
12934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12935$as_echo_n "checking Boot JDK version... " >&6; }
12936              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12937              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12938$as_echo "$BOOT_JDK_VERSION" >&6; }
12939            fi # end check jdk version
12940          fi # end check rt.jar
12941        fi # end check javac
12942      fi # end check java
12943    fi # end check boot jdk found
12944  fi
12945
12946
12947  if test "x$BOOT_JDK_FOUND" = xno; then
12948    # Now execute the test
12949
12950  if test "x$PROGRAMW6432" != x; then
12951    VIRTUAL_DIR="$PROGRAMW6432/Java"
12952
12953  windows_path="$VIRTUAL_DIR"
12954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12955    unix_path=`$CYGPATH -u "$windows_path"`
12956    VIRTUAL_DIR="$unix_path"
12957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12959    VIRTUAL_DIR="$unix_path"
12960  fi
12961
12962
12963  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12964  BOOT_JDK_SUFFIX=""
12965  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12966  if test "x$ALL_JDKS_FOUND" != x; then
12967    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12968
12969  if test "x$BOOT_JDK_FOUND" = xno; then
12970    # Now execute the test
12971
12972        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12973        if test -d "$BOOT_JDK"; then
12974          BOOT_JDK_FOUND=maybe
12975          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12976$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12977        fi
12978
12979
12980    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12981    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12982      # Do we have a bin/java?
12983      if test ! -x "$BOOT_JDK/bin/java"; then
12984        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12986        BOOT_JDK_FOUND=no
12987      else
12988        # Do we have a bin/javac?
12989        if test ! -x "$BOOT_JDK/bin/javac"; then
12990          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12992          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12993$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12994          BOOT_JDK_FOUND=no
12995        else
12996          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12997          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13000            BOOT_JDK_FOUND=no
13001          else
13002            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13003            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13004
13005            # Extra M4 quote needed to protect [] in grep expression.
13006            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13007            if test "x$FOUND_VERSION_78" = x; then
13008              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13010              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13011$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13012              BOOT_JDK_FOUND=no
13013            else
13014              # We're done! :-)
13015              BOOT_JDK_FOUND=yes
13016
13017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13018
13019  # Input might be given as Windows format, start by converting to
13020  # unix format.
13021  path="$BOOT_JDK"
13022  new_path=`$CYGPATH -u "$path"`
13023
13024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13027  # "foo.exe" is OK but "foo" is an error.
13028  #
13029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13030  # It is also a way to make sure we got the proper file name for the real test later on.
13031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13032  if test "x$test_shortpath" = x; then
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13036  fi
13037
13038  # Call helper function which possibly converts this using DOS-style short mode.
13039  # If so, the updated path is stored in $new_path.
13040
13041  input_path="$new_path"
13042  # Check if we need to convert this using DOS-style short mode. If the path
13043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13044  # take no chances and rewrite it.
13045  # Note: m4 eats our [], so we need to use [ and ] instead.
13046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13047  if test "x$has_forbidden_chars" != x; then
13048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13052      # Going to short mode and back again did indeed matter. Since short mode is
13053      # case insensitive, let's make it lowercase to improve readability.
13054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13055      # Now convert it back to Unix-stile (cygpath)
13056      input_path=`$CYGPATH -u "$shortmode_path"`
13057      new_path="$input_path"
13058    fi
13059  fi
13060
13061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13062  if test "x$test_cygdrive_prefix" = x; then
13063    # As a simple fix, exclude /usr/bin since it's not a real path.
13064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13066      # a path prefixed by /cygdrive for fixpath to work.
13067      new_path="$CYGWIN_ROOT_PATH$input_path"
13068    fi
13069  fi
13070
13071
13072  if test "x$path" != "x$new_path"; then
13073    BOOT_JDK="$new_path"
13074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13076  fi
13077
13078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13079
13080  path="$BOOT_JDK"
13081  has_colon=`$ECHO $path | $GREP ^.:`
13082  new_path="$path"
13083  if test "x$has_colon" = x; then
13084    # Not in mixed or Windows style, start by that.
13085    new_path=`cmd //c echo $path`
13086  fi
13087
13088
13089  input_path="$new_path"
13090  # Check if we need to convert this using DOS-style short mode. If the path
13091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13092  # take no chances and rewrite it.
13093  # Note: m4 eats our [], so we need to use [ and ] instead.
13094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13095  if test "x$has_forbidden_chars" != x; then
13096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13098  fi
13099
13100
13101  windows_path="$new_path"
13102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13103    unix_path=`$CYGPATH -u "$windows_path"`
13104    new_path="$unix_path"
13105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13107    new_path="$unix_path"
13108  fi
13109
13110  if test "x$path" != "x$new_path"; then
13111    BOOT_JDK="$new_path"
13112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13114  fi
13115
13116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13118
13119  else
13120    # We're on a posix platform. Hooray! :)
13121    path="$BOOT_JDK"
13122    has_space=`$ECHO "$path" | $GREP " "`
13123    if test "x$has_space" != x; then
13124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13126      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13127    fi
13128
13129    # Use eval to expand a potential ~
13130    eval path="$path"
13131    if test ! -f "$path" && test ! -d "$path"; then
13132      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13133    fi
13134
13135    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13136  fi
13137
13138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13139$as_echo_n "checking for Boot JDK... " >&6; }
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13141$as_echo "$BOOT_JDK" >&6; }
13142              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13143$as_echo_n "checking Boot JDK version... " >&6; }
13144              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13146$as_echo "$BOOT_JDK_VERSION" >&6; }
13147            fi # end check jdk version
13148          fi # end check rt.jar
13149        fi # end check javac
13150      fi # end check java
13151    fi # end check boot jdk found
13152  fi
13153
13154    done
13155  fi
13156
13157  fi
13158
13159
13160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13162      # Do we have a bin/java?
13163      if test ! -x "$BOOT_JDK/bin/java"; then
13164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13166        BOOT_JDK_FOUND=no
13167      else
13168        # Do we have a bin/javac?
13169        if test ! -x "$BOOT_JDK/bin/javac"; then
13170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13174          BOOT_JDK_FOUND=no
13175        else
13176          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13177          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13180            BOOT_JDK_FOUND=no
13181          else
13182            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13183            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13184
13185            # Extra M4 quote needed to protect [] in grep expression.
13186            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13187            if test "x$FOUND_VERSION_78" = x; then
13188              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13190              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13191$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13192              BOOT_JDK_FOUND=no
13193            else
13194              # We're done! :-)
13195              BOOT_JDK_FOUND=yes
13196
13197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13198
13199  # Input might be given as Windows format, start by converting to
13200  # unix format.
13201  path="$BOOT_JDK"
13202  new_path=`$CYGPATH -u "$path"`
13203
13204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13207  # "foo.exe" is OK but "foo" is an error.
13208  #
13209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13210  # It is also a way to make sure we got the proper file name for the real test later on.
13211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13212  if test "x$test_shortpath" = x; then
13213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13216  fi
13217
13218  # Call helper function which possibly converts this using DOS-style short mode.
13219  # If so, the updated path is stored in $new_path.
13220
13221  input_path="$new_path"
13222  # Check if we need to convert this using DOS-style short mode. If the path
13223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13224  # take no chances and rewrite it.
13225  # Note: m4 eats our [], so we need to use [ and ] instead.
13226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13227  if test "x$has_forbidden_chars" != x; then
13228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13232      # Going to short mode and back again did indeed matter. Since short mode is
13233      # case insensitive, let's make it lowercase to improve readability.
13234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13235      # Now convert it back to Unix-stile (cygpath)
13236      input_path=`$CYGPATH -u "$shortmode_path"`
13237      new_path="$input_path"
13238    fi
13239  fi
13240
13241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13242  if test "x$test_cygdrive_prefix" = x; then
13243    # As a simple fix, exclude /usr/bin since it's not a real path.
13244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13246      # a path prefixed by /cygdrive for fixpath to work.
13247      new_path="$CYGWIN_ROOT_PATH$input_path"
13248    fi
13249  fi
13250
13251
13252  if test "x$path" != "x$new_path"; then
13253    BOOT_JDK="$new_path"
13254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13256  fi
13257
13258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13259
13260  path="$BOOT_JDK"
13261  has_colon=`$ECHO $path | $GREP ^.:`
13262  new_path="$path"
13263  if test "x$has_colon" = x; then
13264    # Not in mixed or Windows style, start by that.
13265    new_path=`cmd //c echo $path`
13266  fi
13267
13268
13269  input_path="$new_path"
13270  # Check if we need to convert this using DOS-style short mode. If the path
13271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13272  # take no chances and rewrite it.
13273  # Note: m4 eats our [], so we need to use [ and ] instead.
13274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13275  if test "x$has_forbidden_chars" != x; then
13276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13278  fi
13279
13280
13281  windows_path="$new_path"
13282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13283    unix_path=`$CYGPATH -u "$windows_path"`
13284    new_path="$unix_path"
13285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13287    new_path="$unix_path"
13288  fi
13289
13290  if test "x$path" != "x$new_path"; then
13291    BOOT_JDK="$new_path"
13292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13294  fi
13295
13296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13298
13299  else
13300    # We're on a posix platform. Hooray! :)
13301    path="$BOOT_JDK"
13302    has_space=`$ECHO "$path" | $GREP " "`
13303    if test "x$has_space" != x; then
13304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13307    fi
13308
13309    # Use eval to expand a potential ~
13310    eval path="$path"
13311    if test ! -f "$path" && test ! -d "$path"; then
13312      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13313    fi
13314
13315    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13316  fi
13317
13318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13319$as_echo_n "checking for Boot JDK... " >&6; }
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13321$as_echo "$BOOT_JDK" >&6; }
13322              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13323$as_echo_n "checking Boot JDK version... " >&6; }
13324              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13325              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13326$as_echo "$BOOT_JDK_VERSION" >&6; }
13327            fi # end check jdk version
13328          fi # end check rt.jar
13329        fi # end check javac
13330      fi # end check java
13331    fi # end check boot jdk found
13332  fi
13333
13334
13335  if test "x$BOOT_JDK_FOUND" = xno; then
13336    # Now execute the test
13337
13338  if test "x$PROGRAMFILES" != x; then
13339    VIRTUAL_DIR="$PROGRAMFILES/Java"
13340
13341  windows_path="$VIRTUAL_DIR"
13342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13343    unix_path=`$CYGPATH -u "$windows_path"`
13344    VIRTUAL_DIR="$unix_path"
13345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13347    VIRTUAL_DIR="$unix_path"
13348  fi
13349
13350
13351  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13352  BOOT_JDK_SUFFIX=""
13353  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13354  if test "x$ALL_JDKS_FOUND" != x; then
13355    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13356
13357  if test "x$BOOT_JDK_FOUND" = xno; then
13358    # Now execute the test
13359
13360        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13361        if test -d "$BOOT_JDK"; then
13362          BOOT_JDK_FOUND=maybe
13363          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13364$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13365        fi
13366
13367
13368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13370      # Do we have a bin/java?
13371      if test ! -x "$BOOT_JDK/bin/java"; then
13372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13374        BOOT_JDK_FOUND=no
13375      else
13376        # Do we have a bin/javac?
13377        if test ! -x "$BOOT_JDK/bin/javac"; then
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13382          BOOT_JDK_FOUND=no
13383        else
13384          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13385          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13388            BOOT_JDK_FOUND=no
13389          else
13390            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13392
13393            # Extra M4 quote needed to protect [] in grep expression.
13394            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13395            if test "x$FOUND_VERSION_78" = x; then
13396              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13398              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13399$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13400              BOOT_JDK_FOUND=no
13401            else
13402              # We're done! :-)
13403              BOOT_JDK_FOUND=yes
13404
13405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13406
13407  # Input might be given as Windows format, start by converting to
13408  # unix format.
13409  path="$BOOT_JDK"
13410  new_path=`$CYGPATH -u "$path"`
13411
13412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13415  # "foo.exe" is OK but "foo" is an error.
13416  #
13417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13418  # It is also a way to make sure we got the proper file name for the real test later on.
13419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13420  if test "x$test_shortpath" = x; then
13421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13423    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13424  fi
13425
13426  # Call helper function which possibly converts this using DOS-style short mode.
13427  # If so, the updated path is stored in $new_path.
13428
13429  input_path="$new_path"
13430  # Check if we need to convert this using DOS-style short mode. If the path
13431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13432  # take no chances and rewrite it.
13433  # Note: m4 eats our [], so we need to use [ and ] instead.
13434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13435  if test "x$has_forbidden_chars" != x; then
13436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13440      # Going to short mode and back again did indeed matter. Since short mode is
13441      # case insensitive, let's make it lowercase to improve readability.
13442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13443      # Now convert it back to Unix-stile (cygpath)
13444      input_path=`$CYGPATH -u "$shortmode_path"`
13445      new_path="$input_path"
13446    fi
13447  fi
13448
13449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13450  if test "x$test_cygdrive_prefix" = x; then
13451    # As a simple fix, exclude /usr/bin since it's not a real path.
13452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13454      # a path prefixed by /cygdrive for fixpath to work.
13455      new_path="$CYGWIN_ROOT_PATH$input_path"
13456    fi
13457  fi
13458
13459
13460  if test "x$path" != "x$new_path"; then
13461    BOOT_JDK="$new_path"
13462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13464  fi
13465
13466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13467
13468  path="$BOOT_JDK"
13469  has_colon=`$ECHO $path | $GREP ^.:`
13470  new_path="$path"
13471  if test "x$has_colon" = x; then
13472    # Not in mixed or Windows style, start by that.
13473    new_path=`cmd //c echo $path`
13474  fi
13475
13476
13477  input_path="$new_path"
13478  # Check if we need to convert this using DOS-style short mode. If the path
13479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13480  # take no chances and rewrite it.
13481  # Note: m4 eats our [], so we need to use [ and ] instead.
13482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13483  if test "x$has_forbidden_chars" != x; then
13484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13486  fi
13487
13488
13489  windows_path="$new_path"
13490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13491    unix_path=`$CYGPATH -u "$windows_path"`
13492    new_path="$unix_path"
13493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13495    new_path="$unix_path"
13496  fi
13497
13498  if test "x$path" != "x$new_path"; then
13499    BOOT_JDK="$new_path"
13500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13502  fi
13503
13504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13506
13507  else
13508    # We're on a posix platform. Hooray! :)
13509    path="$BOOT_JDK"
13510    has_space=`$ECHO "$path" | $GREP " "`
13511    if test "x$has_space" != x; then
13512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13515    fi
13516
13517    # Use eval to expand a potential ~
13518    eval path="$path"
13519    if test ! -f "$path" && test ! -d "$path"; then
13520      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13521    fi
13522
13523    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13524  fi
13525
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13527$as_echo_n "checking for Boot JDK... " >&6; }
13528              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13529$as_echo "$BOOT_JDK" >&6; }
13530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13531$as_echo_n "checking Boot JDK version... " >&6; }
13532              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13533              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13534$as_echo "$BOOT_JDK_VERSION" >&6; }
13535            fi # end check jdk version
13536          fi # end check rt.jar
13537        fi # end check javac
13538      fi # end check java
13539    fi # end check boot jdk found
13540  fi
13541
13542    done
13543  fi
13544
13545  fi
13546
13547
13548    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13549    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13550      # Do we have a bin/java?
13551      if test ! -x "$BOOT_JDK/bin/java"; then
13552        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13554        BOOT_JDK_FOUND=no
13555      else
13556        # Do we have a bin/javac?
13557        if test ! -x "$BOOT_JDK/bin/javac"; then
13558          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13560          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13561$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13562          BOOT_JDK_FOUND=no
13563        else
13564          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13565          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13566            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13568            BOOT_JDK_FOUND=no
13569          else
13570            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13572
13573            # Extra M4 quote needed to protect [] in grep expression.
13574            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13575            if test "x$FOUND_VERSION_78" = x; then
13576              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13578              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13579$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13580              BOOT_JDK_FOUND=no
13581            else
13582              # We're done! :-)
13583              BOOT_JDK_FOUND=yes
13584
13585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13586
13587  # Input might be given as Windows format, start by converting to
13588  # unix format.
13589  path="$BOOT_JDK"
13590  new_path=`$CYGPATH -u "$path"`
13591
13592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13595  # "foo.exe" is OK but "foo" is an error.
13596  #
13597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13598  # It is also a way to make sure we got the proper file name for the real test later on.
13599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13600  if test "x$test_shortpath" = x; then
13601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13604  fi
13605
13606  # Call helper function which possibly converts this using DOS-style short mode.
13607  # If so, the updated path is stored in $new_path.
13608
13609  input_path="$new_path"
13610  # Check if we need to convert this using DOS-style short mode. If the path
13611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13612  # take no chances and rewrite it.
13613  # Note: m4 eats our [], so we need to use [ and ] instead.
13614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13615  if test "x$has_forbidden_chars" != x; then
13616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13620      # Going to short mode and back again did indeed matter. Since short mode is
13621      # case insensitive, let's make it lowercase to improve readability.
13622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13623      # Now convert it back to Unix-stile (cygpath)
13624      input_path=`$CYGPATH -u "$shortmode_path"`
13625      new_path="$input_path"
13626    fi
13627  fi
13628
13629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13630  if test "x$test_cygdrive_prefix" = x; then
13631    # As a simple fix, exclude /usr/bin since it's not a real path.
13632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13634      # a path prefixed by /cygdrive for fixpath to work.
13635      new_path="$CYGWIN_ROOT_PATH$input_path"
13636    fi
13637  fi
13638
13639
13640  if test "x$path" != "x$new_path"; then
13641    BOOT_JDK="$new_path"
13642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13644  fi
13645
13646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13647
13648  path="$BOOT_JDK"
13649  has_colon=`$ECHO $path | $GREP ^.:`
13650  new_path="$path"
13651  if test "x$has_colon" = x; then
13652    # Not in mixed or Windows style, start by that.
13653    new_path=`cmd //c echo $path`
13654  fi
13655
13656
13657  input_path="$new_path"
13658  # Check if we need to convert this using DOS-style short mode. If the path
13659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13660  # take no chances and rewrite it.
13661  # Note: m4 eats our [], so we need to use [ and ] instead.
13662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13663  if test "x$has_forbidden_chars" != x; then
13664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13666  fi
13667
13668
13669  windows_path="$new_path"
13670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13671    unix_path=`$CYGPATH -u "$windows_path"`
13672    new_path="$unix_path"
13673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13675    new_path="$unix_path"
13676  fi
13677
13678  if test "x$path" != "x$new_path"; then
13679    BOOT_JDK="$new_path"
13680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13682  fi
13683
13684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13686
13687  else
13688    # We're on a posix platform. Hooray! :)
13689    path="$BOOT_JDK"
13690    has_space=`$ECHO "$path" | $GREP " "`
13691    if test "x$has_space" != x; then
13692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13694      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13695    fi
13696
13697    # Use eval to expand a potential ~
13698    eval path="$path"
13699    if test ! -f "$path" && test ! -d "$path"; then
13700      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13701    fi
13702
13703    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13704  fi
13705
13706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13707$as_echo_n "checking for Boot JDK... " >&6; }
13708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13709$as_echo "$BOOT_JDK" >&6; }
13710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13711$as_echo_n "checking Boot JDK version... " >&6; }
13712              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13713              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13714$as_echo "$BOOT_JDK_VERSION" >&6; }
13715            fi # end check jdk version
13716          fi # end check rt.jar
13717        fi # end check javac
13718      fi # end check java
13719    fi # end check boot jdk found
13720  fi
13721
13722
13723  if test "x$BOOT_JDK_FOUND" = xno; then
13724    # Now execute the test
13725
13726  if test "x$ProgramFiles" != x; then
13727    VIRTUAL_DIR="$ProgramFiles/Java"
13728
13729  windows_path="$VIRTUAL_DIR"
13730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13731    unix_path=`$CYGPATH -u "$windows_path"`
13732    VIRTUAL_DIR="$unix_path"
13733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13735    VIRTUAL_DIR="$unix_path"
13736  fi
13737
13738
13739  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13740  BOOT_JDK_SUFFIX=""
13741  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13742  if test "x$ALL_JDKS_FOUND" != x; then
13743    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13744
13745  if test "x$BOOT_JDK_FOUND" = xno; then
13746    # Now execute the test
13747
13748        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13749        if test -d "$BOOT_JDK"; then
13750          BOOT_JDK_FOUND=maybe
13751          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13752$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13753        fi
13754
13755
13756    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13757    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13758      # Do we have a bin/java?
13759      if test ! -x "$BOOT_JDK/bin/java"; then
13760        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13762        BOOT_JDK_FOUND=no
13763      else
13764        # Do we have a bin/javac?
13765        if test ! -x "$BOOT_JDK/bin/javac"; then
13766          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13768          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13769$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13770          BOOT_JDK_FOUND=no
13771        else
13772          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13773          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13774            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13776            BOOT_JDK_FOUND=no
13777          else
13778            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13779            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13780
13781            # Extra M4 quote needed to protect [] in grep expression.
13782            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13783            if test "x$FOUND_VERSION_78" = x; then
13784              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13786              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13787$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13788              BOOT_JDK_FOUND=no
13789            else
13790              # We're done! :-)
13791              BOOT_JDK_FOUND=yes
13792
13793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13794
13795  # Input might be given as Windows format, start by converting to
13796  # unix format.
13797  path="$BOOT_JDK"
13798  new_path=`$CYGPATH -u "$path"`
13799
13800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13803  # "foo.exe" is OK but "foo" is an error.
13804  #
13805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13806  # It is also a way to make sure we got the proper file name for the real test later on.
13807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13808  if test "x$test_shortpath" = x; then
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13811    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13812  fi
13813
13814  # Call helper function which possibly converts this using DOS-style short mode.
13815  # If so, the updated path is stored in $new_path.
13816
13817  input_path="$new_path"
13818  # Check if we need to convert this using DOS-style short mode. If the path
13819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13820  # take no chances and rewrite it.
13821  # Note: m4 eats our [], so we need to use [ and ] instead.
13822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13823  if test "x$has_forbidden_chars" != x; then
13824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13828      # Going to short mode and back again did indeed matter. Since short mode is
13829      # case insensitive, let's make it lowercase to improve readability.
13830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13831      # Now convert it back to Unix-stile (cygpath)
13832      input_path=`$CYGPATH -u "$shortmode_path"`
13833      new_path="$input_path"
13834    fi
13835  fi
13836
13837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13838  if test "x$test_cygdrive_prefix" = x; then
13839    # As a simple fix, exclude /usr/bin since it's not a real path.
13840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13842      # a path prefixed by /cygdrive for fixpath to work.
13843      new_path="$CYGWIN_ROOT_PATH$input_path"
13844    fi
13845  fi
13846
13847
13848  if test "x$path" != "x$new_path"; then
13849    BOOT_JDK="$new_path"
13850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13852  fi
13853
13854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13855
13856  path="$BOOT_JDK"
13857  has_colon=`$ECHO $path | $GREP ^.:`
13858  new_path="$path"
13859  if test "x$has_colon" = x; then
13860    # Not in mixed or Windows style, start by that.
13861    new_path=`cmd //c echo $path`
13862  fi
13863
13864
13865  input_path="$new_path"
13866  # Check if we need to convert this using DOS-style short mode. If the path
13867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13868  # take no chances and rewrite it.
13869  # Note: m4 eats our [], so we need to use [ and ] instead.
13870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13871  if test "x$has_forbidden_chars" != x; then
13872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13874  fi
13875
13876
13877  windows_path="$new_path"
13878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13879    unix_path=`$CYGPATH -u "$windows_path"`
13880    new_path="$unix_path"
13881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13883    new_path="$unix_path"
13884  fi
13885
13886  if test "x$path" != "x$new_path"; then
13887    BOOT_JDK="$new_path"
13888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13890  fi
13891
13892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13894
13895  else
13896    # We're on a posix platform. Hooray! :)
13897    path="$BOOT_JDK"
13898    has_space=`$ECHO "$path" | $GREP " "`
13899    if test "x$has_space" != x; then
13900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13902      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13903    fi
13904
13905    # Use eval to expand a potential ~
13906    eval path="$path"
13907    if test ! -f "$path" && test ! -d "$path"; then
13908      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13909    fi
13910
13911    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13912  fi
13913
13914              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13915$as_echo_n "checking for Boot JDK... " >&6; }
13916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13917$as_echo "$BOOT_JDK" >&6; }
13918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13919$as_echo_n "checking Boot JDK version... " >&6; }
13920              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13922$as_echo "$BOOT_JDK_VERSION" >&6; }
13923            fi # end check jdk version
13924          fi # end check rt.jar
13925        fi # end check javac
13926      fi # end check java
13927    fi # end check boot jdk found
13928  fi
13929
13930    done
13931  fi
13932
13933  fi
13934
13935
13936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13938      # Do we have a bin/java?
13939      if test ! -x "$BOOT_JDK/bin/java"; then
13940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13942        BOOT_JDK_FOUND=no
13943      else
13944        # Do we have a bin/javac?
13945        if test ! -x "$BOOT_JDK/bin/javac"; then
13946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13950          BOOT_JDK_FOUND=no
13951        else
13952          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13953          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13956            BOOT_JDK_FOUND=no
13957          else
13958            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13960
13961            # Extra M4 quote needed to protect [] in grep expression.
13962            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13963            if test "x$FOUND_VERSION_78" = x; then
13964              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13966              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13967$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13968              BOOT_JDK_FOUND=no
13969            else
13970              # We're done! :-)
13971              BOOT_JDK_FOUND=yes
13972
13973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13974
13975  # Input might be given as Windows format, start by converting to
13976  # unix format.
13977  path="$BOOT_JDK"
13978  new_path=`$CYGPATH -u "$path"`
13979
13980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13983  # "foo.exe" is OK but "foo" is an error.
13984  #
13985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13986  # It is also a way to make sure we got the proper file name for the real test later on.
13987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13988  if test "x$test_shortpath" = x; then
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13992  fi
13993
13994  # Call helper function which possibly converts this using DOS-style short mode.
13995  # If so, the updated path is stored in $new_path.
13996
13997  input_path="$new_path"
13998  # Check if we need to convert this using DOS-style short mode. If the path
13999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14000  # take no chances and rewrite it.
14001  # Note: m4 eats our [], so we need to use [ and ] instead.
14002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14003  if test "x$has_forbidden_chars" != x; then
14004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14008      # Going to short mode and back again did indeed matter. Since short mode is
14009      # case insensitive, let's make it lowercase to improve readability.
14010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14011      # Now convert it back to Unix-stile (cygpath)
14012      input_path=`$CYGPATH -u "$shortmode_path"`
14013      new_path="$input_path"
14014    fi
14015  fi
14016
14017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14018  if test "x$test_cygdrive_prefix" = x; then
14019    # As a simple fix, exclude /usr/bin since it's not a real path.
14020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14022      # a path prefixed by /cygdrive for fixpath to work.
14023      new_path="$CYGWIN_ROOT_PATH$input_path"
14024    fi
14025  fi
14026
14027
14028  if test "x$path" != "x$new_path"; then
14029    BOOT_JDK="$new_path"
14030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14032  fi
14033
14034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14035
14036  path="$BOOT_JDK"
14037  has_colon=`$ECHO $path | $GREP ^.:`
14038  new_path="$path"
14039  if test "x$has_colon" = x; then
14040    # Not in mixed or Windows style, start by that.
14041    new_path=`cmd //c echo $path`
14042  fi
14043
14044
14045  input_path="$new_path"
14046  # Check if we need to convert this using DOS-style short mode. If the path
14047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14048  # take no chances and rewrite it.
14049  # Note: m4 eats our [], so we need to use [ and ] instead.
14050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14051  if test "x$has_forbidden_chars" != x; then
14052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14054  fi
14055
14056
14057  windows_path="$new_path"
14058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14059    unix_path=`$CYGPATH -u "$windows_path"`
14060    new_path="$unix_path"
14061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14063    new_path="$unix_path"
14064  fi
14065
14066  if test "x$path" != "x$new_path"; then
14067    BOOT_JDK="$new_path"
14068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14070  fi
14071
14072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14074
14075  else
14076    # We're on a posix platform. Hooray! :)
14077    path="$BOOT_JDK"
14078    has_space=`$ECHO "$path" | $GREP " "`
14079    if test "x$has_space" != x; then
14080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14082      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14083    fi
14084
14085    # Use eval to expand a potential ~
14086    eval path="$path"
14087    if test ! -f "$path" && test ! -d "$path"; then
14088      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14089    fi
14090
14091    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14092  fi
14093
14094              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14095$as_echo_n "checking for Boot JDK... " >&6; }
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14097$as_echo "$BOOT_JDK" >&6; }
14098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14099$as_echo_n "checking Boot JDK version... " >&6; }
14100              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14102$as_echo "$BOOT_JDK_VERSION" >&6; }
14103            fi # end check jdk version
14104          fi # end check rt.jar
14105        fi # end check javac
14106      fi # end check java
14107    fi # end check boot jdk found
14108  fi
14109
14110
14111  if test "x$BOOT_JDK_FOUND" = xno; then
14112    # Now execute the test
14113
14114  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14115  BOOT_JDK_SUFFIX=""
14116  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14117  if test "x$ALL_JDKS_FOUND" != x; then
14118    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14119
14120  if test "x$BOOT_JDK_FOUND" = xno; then
14121    # Now execute the test
14122
14123        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14124        if test -d "$BOOT_JDK"; then
14125          BOOT_JDK_FOUND=maybe
14126          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14127$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14128        fi
14129
14130
14131    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14132    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14133      # Do we have a bin/java?
14134      if test ! -x "$BOOT_JDK/bin/java"; then
14135        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14137        BOOT_JDK_FOUND=no
14138      else
14139        # Do we have a bin/javac?
14140        if test ! -x "$BOOT_JDK/bin/javac"; then
14141          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14143          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14144$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14145          BOOT_JDK_FOUND=no
14146        else
14147          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14148          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14151            BOOT_JDK_FOUND=no
14152          else
14153            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14154            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14155
14156            # Extra M4 quote needed to protect [] in grep expression.
14157            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14158            if test "x$FOUND_VERSION_78" = x; then
14159              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14161              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14162$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14163              BOOT_JDK_FOUND=no
14164            else
14165              # We're done! :-)
14166              BOOT_JDK_FOUND=yes
14167
14168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14169
14170  # Input might be given as Windows format, start by converting to
14171  # unix format.
14172  path="$BOOT_JDK"
14173  new_path=`$CYGPATH -u "$path"`
14174
14175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14178  # "foo.exe" is OK but "foo" is an error.
14179  #
14180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14181  # It is also a way to make sure we got the proper file name for the real test later on.
14182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14183  if test "x$test_shortpath" = x; then
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14187  fi
14188
14189  # Call helper function which possibly converts this using DOS-style short mode.
14190  # If so, the updated path is stored in $new_path.
14191
14192  input_path="$new_path"
14193  # Check if we need to convert this using DOS-style short mode. If the path
14194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14195  # take no chances and rewrite it.
14196  # Note: m4 eats our [], so we need to use [ and ] instead.
14197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14198  if test "x$has_forbidden_chars" != x; then
14199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14203      # Going to short mode and back again did indeed matter. Since short mode is
14204      # case insensitive, let's make it lowercase to improve readability.
14205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14206      # Now convert it back to Unix-stile (cygpath)
14207      input_path=`$CYGPATH -u "$shortmode_path"`
14208      new_path="$input_path"
14209    fi
14210  fi
14211
14212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14213  if test "x$test_cygdrive_prefix" = x; then
14214    # As a simple fix, exclude /usr/bin since it's not a real path.
14215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14217      # a path prefixed by /cygdrive for fixpath to work.
14218      new_path="$CYGWIN_ROOT_PATH$input_path"
14219    fi
14220  fi
14221
14222
14223  if test "x$path" != "x$new_path"; then
14224    BOOT_JDK="$new_path"
14225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14227  fi
14228
14229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14230
14231  path="$BOOT_JDK"
14232  has_colon=`$ECHO $path | $GREP ^.:`
14233  new_path="$path"
14234  if test "x$has_colon" = x; then
14235    # Not in mixed or Windows style, start by that.
14236    new_path=`cmd //c echo $path`
14237  fi
14238
14239
14240  input_path="$new_path"
14241  # Check if we need to convert this using DOS-style short mode. If the path
14242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14243  # take no chances and rewrite it.
14244  # Note: m4 eats our [], so we need to use [ and ] instead.
14245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14246  if test "x$has_forbidden_chars" != x; then
14247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14249  fi
14250
14251
14252  windows_path="$new_path"
14253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14254    unix_path=`$CYGPATH -u "$windows_path"`
14255    new_path="$unix_path"
14256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14258    new_path="$unix_path"
14259  fi
14260
14261  if test "x$path" != "x$new_path"; then
14262    BOOT_JDK="$new_path"
14263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14265  fi
14266
14267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14269
14270  else
14271    # We're on a posix platform. Hooray! :)
14272    path="$BOOT_JDK"
14273    has_space=`$ECHO "$path" | $GREP " "`
14274    if test "x$has_space" != x; then
14275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14278    fi
14279
14280    # Use eval to expand a potential ~
14281    eval path="$path"
14282    if test ! -f "$path" && test ! -d "$path"; then
14283      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14284    fi
14285
14286    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14287  fi
14288
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14290$as_echo_n "checking for Boot JDK... " >&6; }
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14292$as_echo "$BOOT_JDK" >&6; }
14293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14294$as_echo_n "checking Boot JDK version... " >&6; }
14295              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14297$as_echo "$BOOT_JDK_VERSION" >&6; }
14298            fi # end check jdk version
14299          fi # end check rt.jar
14300        fi # end check javac
14301      fi # end check java
14302    fi # end check boot jdk found
14303  fi
14304
14305    done
14306  fi
14307
14308
14309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14311      # Do we have a bin/java?
14312      if test ! -x "$BOOT_JDK/bin/java"; then
14313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14315        BOOT_JDK_FOUND=no
14316      else
14317        # Do we have a bin/javac?
14318        if test ! -x "$BOOT_JDK/bin/javac"; then
14319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14323          BOOT_JDK_FOUND=no
14324        else
14325          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14326          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14329            BOOT_JDK_FOUND=no
14330          else
14331            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14333
14334            # Extra M4 quote needed to protect [] in grep expression.
14335            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14336            if test "x$FOUND_VERSION_78" = x; then
14337              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14339              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14340$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14341              BOOT_JDK_FOUND=no
14342            else
14343              # We're done! :-)
14344              BOOT_JDK_FOUND=yes
14345
14346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14347
14348  # Input might be given as Windows format, start by converting to
14349  # unix format.
14350  path="$BOOT_JDK"
14351  new_path=`$CYGPATH -u "$path"`
14352
14353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14356  # "foo.exe" is OK but "foo" is an error.
14357  #
14358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14359  # It is also a way to make sure we got the proper file name for the real test later on.
14360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14361  if test "x$test_shortpath" = x; then
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14365  fi
14366
14367  # Call helper function which possibly converts this using DOS-style short mode.
14368  # If so, the updated path is stored in $new_path.
14369
14370  input_path="$new_path"
14371  # Check if we need to convert this using DOS-style short mode. If the path
14372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14373  # take no chances and rewrite it.
14374  # Note: m4 eats our [], so we need to use [ and ] instead.
14375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14376  if test "x$has_forbidden_chars" != x; then
14377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14381      # Going to short mode and back again did indeed matter. Since short mode is
14382      # case insensitive, let's make it lowercase to improve readability.
14383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384      # Now convert it back to Unix-stile (cygpath)
14385      input_path=`$CYGPATH -u "$shortmode_path"`
14386      new_path="$input_path"
14387    fi
14388  fi
14389
14390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14391  if test "x$test_cygdrive_prefix" = x; then
14392    # As a simple fix, exclude /usr/bin since it's not a real path.
14393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14395      # a path prefixed by /cygdrive for fixpath to work.
14396      new_path="$CYGWIN_ROOT_PATH$input_path"
14397    fi
14398  fi
14399
14400
14401  if test "x$path" != "x$new_path"; then
14402    BOOT_JDK="$new_path"
14403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14405  fi
14406
14407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14408
14409  path="$BOOT_JDK"
14410  has_colon=`$ECHO $path | $GREP ^.:`
14411  new_path="$path"
14412  if test "x$has_colon" = x; then
14413    # Not in mixed or Windows style, start by that.
14414    new_path=`cmd //c echo $path`
14415  fi
14416
14417
14418  input_path="$new_path"
14419  # Check if we need to convert this using DOS-style short mode. If the path
14420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14421  # take no chances and rewrite it.
14422  # Note: m4 eats our [], so we need to use [ and ] instead.
14423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14424  if test "x$has_forbidden_chars" != x; then
14425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14427  fi
14428
14429
14430  windows_path="$new_path"
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432    unix_path=`$CYGPATH -u "$windows_path"`
14433    new_path="$unix_path"
14434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14436    new_path="$unix_path"
14437  fi
14438
14439  if test "x$path" != "x$new_path"; then
14440    BOOT_JDK="$new_path"
14441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14443  fi
14444
14445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14447
14448  else
14449    # We're on a posix platform. Hooray! :)
14450    path="$BOOT_JDK"
14451    has_space=`$ECHO "$path" | $GREP " "`
14452    if test "x$has_space" != x; then
14453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14456    fi
14457
14458    # Use eval to expand a potential ~
14459    eval path="$path"
14460    if test ! -f "$path" && test ! -d "$path"; then
14461      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14462    fi
14463
14464    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14465  fi
14466
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14468$as_echo_n "checking for Boot JDK... " >&6; }
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14470$as_echo "$BOOT_JDK" >&6; }
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14472$as_echo_n "checking Boot JDK version... " >&6; }
14473              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14474              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14475$as_echo "$BOOT_JDK_VERSION" >&6; }
14476            fi # end check jdk version
14477          fi # end check rt.jar
14478        fi # end check javac
14479      fi # end check java
14480    fi # end check boot jdk found
14481  fi
14482
14483  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14484
14485  if test "x$BOOT_JDK_FOUND" = xno; then
14486    # Now execute the test
14487
14488  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14489  BOOT_JDK_SUFFIX="/Contents/Home"
14490  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14491  if test "x$ALL_JDKS_FOUND" != x; then
14492    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14493
14494  if test "x$BOOT_JDK_FOUND" = xno; then
14495    # Now execute the test
14496
14497        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14498        if test -d "$BOOT_JDK"; then
14499          BOOT_JDK_FOUND=maybe
14500          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14501$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14502        fi
14503
14504
14505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14507      # Do we have a bin/java?
14508      if test ! -x "$BOOT_JDK/bin/java"; then
14509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14511        BOOT_JDK_FOUND=no
14512      else
14513        # Do we have a bin/javac?
14514        if test ! -x "$BOOT_JDK/bin/javac"; then
14515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14519          BOOT_JDK_FOUND=no
14520        else
14521          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14522          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14523            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14525            BOOT_JDK_FOUND=no
14526          else
14527            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14528            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14529
14530            # Extra M4 quote needed to protect [] in grep expression.
14531            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14532            if test "x$FOUND_VERSION_78" = x; then
14533              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14535              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14536$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14537              BOOT_JDK_FOUND=no
14538            else
14539              # We're done! :-)
14540              BOOT_JDK_FOUND=yes
14541
14542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14543
14544  # Input might be given as Windows format, start by converting to
14545  # unix format.
14546  path="$BOOT_JDK"
14547  new_path=`$CYGPATH -u "$path"`
14548
14549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14552  # "foo.exe" is OK but "foo" is an error.
14553  #
14554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14555  # It is also a way to make sure we got the proper file name for the real test later on.
14556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14557  if test "x$test_shortpath" = x; then
14558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14561  fi
14562
14563  # Call helper function which possibly converts this using DOS-style short mode.
14564  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14577      # Going to short mode and back again did indeed matter. Since short mode is
14578      # case insensitive, let's make it lowercase to improve readability.
14579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14580      # Now convert it back to Unix-stile (cygpath)
14581      input_path=`$CYGPATH -u "$shortmode_path"`
14582      new_path="$input_path"
14583    fi
14584  fi
14585
14586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14587  if test "x$test_cygdrive_prefix" = x; then
14588    # As a simple fix, exclude /usr/bin since it's not a real path.
14589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14591      # a path prefixed by /cygdrive for fixpath to work.
14592      new_path="$CYGWIN_ROOT_PATH$input_path"
14593    fi
14594  fi
14595
14596
14597  if test "x$path" != "x$new_path"; then
14598    BOOT_JDK="$new_path"
14599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14601  fi
14602
14603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14604
14605  path="$BOOT_JDK"
14606  has_colon=`$ECHO $path | $GREP ^.:`
14607  new_path="$path"
14608  if test "x$has_colon" = x; then
14609    # Not in mixed or Windows style, start by that.
14610    new_path=`cmd //c echo $path`
14611  fi
14612
14613
14614  input_path="$new_path"
14615  # Check if we need to convert this using DOS-style short mode. If the path
14616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14617  # take no chances and rewrite it.
14618  # Note: m4 eats our [], so we need to use [ and ] instead.
14619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14620  if test "x$has_forbidden_chars" != x; then
14621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14623  fi
14624
14625
14626  windows_path="$new_path"
14627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14628    unix_path=`$CYGPATH -u "$windows_path"`
14629    new_path="$unix_path"
14630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14632    new_path="$unix_path"
14633  fi
14634
14635  if test "x$path" != "x$new_path"; then
14636    BOOT_JDK="$new_path"
14637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14639  fi
14640
14641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14643
14644  else
14645    # We're on a posix platform. Hooray! :)
14646    path="$BOOT_JDK"
14647    has_space=`$ECHO "$path" | $GREP " "`
14648    if test "x$has_space" != x; then
14649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14652    fi
14653
14654    # Use eval to expand a potential ~
14655    eval path="$path"
14656    if test ! -f "$path" && test ! -d "$path"; then
14657      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14658    fi
14659
14660    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14661  fi
14662
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14664$as_echo_n "checking for Boot JDK... " >&6; }
14665              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14666$as_echo "$BOOT_JDK" >&6; }
14667              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14668$as_echo_n "checking Boot JDK version... " >&6; }
14669              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14670              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14671$as_echo "$BOOT_JDK_VERSION" >&6; }
14672            fi # end check jdk version
14673          fi # end check rt.jar
14674        fi # end check javac
14675      fi # end check java
14676    fi # end check boot jdk found
14677  fi
14678
14679    done
14680  fi
14681
14682
14683    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14684    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14685      # Do we have a bin/java?
14686      if test ! -x "$BOOT_JDK/bin/java"; then
14687        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14689        BOOT_JDK_FOUND=no
14690      else
14691        # Do we have a bin/javac?
14692        if test ! -x "$BOOT_JDK/bin/javac"; then
14693          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14695          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14696$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14697          BOOT_JDK_FOUND=no
14698        else
14699          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14700          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14703            BOOT_JDK_FOUND=no
14704          else
14705            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14706            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14707
14708            # Extra M4 quote needed to protect [] in grep expression.
14709            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14710            if test "x$FOUND_VERSION_78" = x; then
14711              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14713              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14714$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14715              BOOT_JDK_FOUND=no
14716            else
14717              # We're done! :-)
14718              BOOT_JDK_FOUND=yes
14719
14720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14721
14722  # Input might be given as Windows format, start by converting to
14723  # unix format.
14724  path="$BOOT_JDK"
14725  new_path=`$CYGPATH -u "$path"`
14726
14727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14730  # "foo.exe" is OK but "foo" is an error.
14731  #
14732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14733  # It is also a way to make sure we got the proper file name for the real test later on.
14734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14735  if test "x$test_shortpath" = x; then
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14739  fi
14740
14741  # Call helper function which possibly converts this using DOS-style short mode.
14742  # If so, the updated path is stored in $new_path.
14743
14744  input_path="$new_path"
14745  # Check if we need to convert this using DOS-style short mode. If the path
14746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14747  # take no chances and rewrite it.
14748  # Note: m4 eats our [], so we need to use [ and ] instead.
14749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14750  if test "x$has_forbidden_chars" != x; then
14751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14755      # Going to short mode and back again did indeed matter. Since short mode is
14756      # case insensitive, let's make it lowercase to improve readability.
14757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14758      # Now convert it back to Unix-stile (cygpath)
14759      input_path=`$CYGPATH -u "$shortmode_path"`
14760      new_path="$input_path"
14761    fi
14762  fi
14763
14764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14765  if test "x$test_cygdrive_prefix" = x; then
14766    # As a simple fix, exclude /usr/bin since it's not a real path.
14767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14769      # a path prefixed by /cygdrive for fixpath to work.
14770      new_path="$CYGWIN_ROOT_PATH$input_path"
14771    fi
14772  fi
14773
14774
14775  if test "x$path" != "x$new_path"; then
14776    BOOT_JDK="$new_path"
14777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14779  fi
14780
14781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14782
14783  path="$BOOT_JDK"
14784  has_colon=`$ECHO $path | $GREP ^.:`
14785  new_path="$path"
14786  if test "x$has_colon" = x; then
14787    # Not in mixed or Windows style, start by that.
14788    new_path=`cmd //c echo $path`
14789  fi
14790
14791
14792  input_path="$new_path"
14793  # Check if we need to convert this using DOS-style short mode. If the path
14794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14795  # take no chances and rewrite it.
14796  # Note: m4 eats our [], so we need to use [ and ] instead.
14797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14798  if test "x$has_forbidden_chars" != x; then
14799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14801  fi
14802
14803
14804  windows_path="$new_path"
14805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14806    unix_path=`$CYGPATH -u "$windows_path"`
14807    new_path="$unix_path"
14808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14810    new_path="$unix_path"
14811  fi
14812
14813  if test "x$path" != "x$new_path"; then
14814    BOOT_JDK="$new_path"
14815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14817  fi
14818
14819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14821
14822  else
14823    # We're on a posix platform. Hooray! :)
14824    path="$BOOT_JDK"
14825    has_space=`$ECHO "$path" | $GREP " "`
14826    if test "x$has_space" != x; then
14827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14830    fi
14831
14832    # Use eval to expand a potential ~
14833    eval path="$path"
14834    if test ! -f "$path" && test ! -d "$path"; then
14835      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14836    fi
14837
14838    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14839  fi
14840
14841              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14842$as_echo_n "checking for Boot JDK... " >&6; }
14843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14844$as_echo "$BOOT_JDK" >&6; }
14845              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14846$as_echo_n "checking Boot JDK version... " >&6; }
14847              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14848              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14849$as_echo "$BOOT_JDK_VERSION" >&6; }
14850            fi # end check jdk version
14851          fi # end check rt.jar
14852        fi # end check javac
14853      fi # end check java
14854    fi # end check boot jdk found
14855  fi
14856
14857
14858  if test "x$BOOT_JDK_FOUND" = xno; then
14859    # Now execute the test
14860
14861  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14862  BOOT_JDK_SUFFIX="/Contents/Home"
14863  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14864  if test "x$ALL_JDKS_FOUND" != x; then
14865    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14866
14867  if test "x$BOOT_JDK_FOUND" = xno; then
14868    # Now execute the test
14869
14870        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14871        if test -d "$BOOT_JDK"; then
14872          BOOT_JDK_FOUND=maybe
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14874$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14875        fi
14876
14877
14878    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14879    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14880      # Do we have a bin/java?
14881      if test ! -x "$BOOT_JDK/bin/java"; then
14882        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14884        BOOT_JDK_FOUND=no
14885      else
14886        # Do we have a bin/javac?
14887        if test ! -x "$BOOT_JDK/bin/javac"; then
14888          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14890          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14891$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14892          BOOT_JDK_FOUND=no
14893        else
14894          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14895          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14896            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14898            BOOT_JDK_FOUND=no
14899          else
14900            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14902
14903            # Extra M4 quote needed to protect [] in grep expression.
14904            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14905            if test "x$FOUND_VERSION_78" = x; then
14906              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14908              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14909$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14910              BOOT_JDK_FOUND=no
14911            else
14912              # We're done! :-)
14913              BOOT_JDK_FOUND=yes
14914
14915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14916
14917  # Input might be given as Windows format, start by converting to
14918  # unix format.
14919  path="$BOOT_JDK"
14920  new_path=`$CYGPATH -u "$path"`
14921
14922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14925  # "foo.exe" is OK but "foo" is an error.
14926  #
14927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14928  # It is also a way to make sure we got the proper file name for the real test later on.
14929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14930  if test "x$test_shortpath" = x; then
14931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14934  fi
14935
14936  # Call helper function which possibly converts this using DOS-style short mode.
14937  # If so, the updated path is stored in $new_path.
14938
14939  input_path="$new_path"
14940  # Check if we need to convert this using DOS-style short mode. If the path
14941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14942  # take no chances and rewrite it.
14943  # Note: m4 eats our [], so we need to use [ and ] instead.
14944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14945  if test "x$has_forbidden_chars" != x; then
14946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14950      # Going to short mode and back again did indeed matter. Since short mode is
14951      # case insensitive, let's make it lowercase to improve readability.
14952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14953      # Now convert it back to Unix-stile (cygpath)
14954      input_path=`$CYGPATH -u "$shortmode_path"`
14955      new_path="$input_path"
14956    fi
14957  fi
14958
14959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14960  if test "x$test_cygdrive_prefix" = x; then
14961    # As a simple fix, exclude /usr/bin since it's not a real path.
14962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14964      # a path prefixed by /cygdrive for fixpath to work.
14965      new_path="$CYGWIN_ROOT_PATH$input_path"
14966    fi
14967  fi
14968
14969
14970  if test "x$path" != "x$new_path"; then
14971    BOOT_JDK="$new_path"
14972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14974  fi
14975
14976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14977
14978  path="$BOOT_JDK"
14979  has_colon=`$ECHO $path | $GREP ^.:`
14980  new_path="$path"
14981  if test "x$has_colon" = x; then
14982    # Not in mixed or Windows style, start by that.
14983    new_path=`cmd //c echo $path`
14984  fi
14985
14986
14987  input_path="$new_path"
14988  # Check if we need to convert this using DOS-style short mode. If the path
14989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14990  # take no chances and rewrite it.
14991  # Note: m4 eats our [], so we need to use [ and ] instead.
14992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14993  if test "x$has_forbidden_chars" != x; then
14994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14996  fi
14997
14998
14999  windows_path="$new_path"
15000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15001    unix_path=`$CYGPATH -u "$windows_path"`
15002    new_path="$unix_path"
15003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15005    new_path="$unix_path"
15006  fi
15007
15008  if test "x$path" != "x$new_path"; then
15009    BOOT_JDK="$new_path"
15010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15012  fi
15013
15014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15016
15017  else
15018    # We're on a posix platform. Hooray! :)
15019    path="$BOOT_JDK"
15020    has_space=`$ECHO "$path" | $GREP " "`
15021    if test "x$has_space" != x; then
15022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15024      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15025    fi
15026
15027    # Use eval to expand a potential ~
15028    eval path="$path"
15029    if test ! -f "$path" && test ! -d "$path"; then
15030      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15031    fi
15032
15033    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15034  fi
15035
15036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15037$as_echo_n "checking for Boot JDK... " >&6; }
15038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15039$as_echo "$BOOT_JDK" >&6; }
15040              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15041$as_echo_n "checking Boot JDK version... " >&6; }
15042              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15043              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15044$as_echo "$BOOT_JDK_VERSION" >&6; }
15045            fi # end check jdk version
15046          fi # end check rt.jar
15047        fi # end check javac
15048      fi # end check java
15049    fi # end check boot jdk found
15050  fi
15051
15052    done
15053  fi
15054
15055
15056    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15057    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15058      # Do we have a bin/java?
15059      if test ! -x "$BOOT_JDK/bin/java"; then
15060        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15062        BOOT_JDK_FOUND=no
15063      else
15064        # Do we have a bin/javac?
15065        if test ! -x "$BOOT_JDK/bin/javac"; then
15066          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15069$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15070          BOOT_JDK_FOUND=no
15071        else
15072          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15073          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15074            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15076            BOOT_JDK_FOUND=no
15077          else
15078            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15080
15081            # Extra M4 quote needed to protect [] in grep expression.
15082            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15083            if test "x$FOUND_VERSION_78" = x; then
15084              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15086              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15087$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15088              BOOT_JDK_FOUND=no
15089            else
15090              # We're done! :-)
15091              BOOT_JDK_FOUND=yes
15092
15093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15094
15095  # Input might be given as Windows format, start by converting to
15096  # unix format.
15097  path="$BOOT_JDK"
15098  new_path=`$CYGPATH -u "$path"`
15099
15100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15103  # "foo.exe" is OK but "foo" is an error.
15104  #
15105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15106  # It is also a way to make sure we got the proper file name for the real test later on.
15107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15108  if test "x$test_shortpath" = x; then
15109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15111    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15112  fi
15113
15114  # Call helper function which possibly converts this using DOS-style short mode.
15115  # If so, the updated path is stored in $new_path.
15116
15117  input_path="$new_path"
15118  # Check if we need to convert this using DOS-style short mode. If the path
15119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15120  # take no chances and rewrite it.
15121  # Note: m4 eats our [], so we need to use [ and ] instead.
15122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15123  if test "x$has_forbidden_chars" != x; then
15124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15128      # Going to short mode and back again did indeed matter. Since short mode is
15129      # case insensitive, let's make it lowercase to improve readability.
15130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15131      # Now convert it back to Unix-stile (cygpath)
15132      input_path=`$CYGPATH -u "$shortmode_path"`
15133      new_path="$input_path"
15134    fi
15135  fi
15136
15137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15138  if test "x$test_cygdrive_prefix" = x; then
15139    # As a simple fix, exclude /usr/bin since it's not a real path.
15140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15142      # a path prefixed by /cygdrive for fixpath to work.
15143      new_path="$CYGWIN_ROOT_PATH$input_path"
15144    fi
15145  fi
15146
15147
15148  if test "x$path" != "x$new_path"; then
15149    BOOT_JDK="$new_path"
15150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15152  fi
15153
15154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15155
15156  path="$BOOT_JDK"
15157  has_colon=`$ECHO $path | $GREP ^.:`
15158  new_path="$path"
15159  if test "x$has_colon" = x; then
15160    # Not in mixed or Windows style, start by that.
15161    new_path=`cmd //c echo $path`
15162  fi
15163
15164
15165  input_path="$new_path"
15166  # Check if we need to convert this using DOS-style short mode. If the path
15167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15168  # take no chances and rewrite it.
15169  # Note: m4 eats our [], so we need to use [ and ] instead.
15170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15171  if test "x$has_forbidden_chars" != x; then
15172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15174  fi
15175
15176
15177  windows_path="$new_path"
15178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15179    unix_path=`$CYGPATH -u "$windows_path"`
15180    new_path="$unix_path"
15181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15183    new_path="$unix_path"
15184  fi
15185
15186  if test "x$path" != "x$new_path"; then
15187    BOOT_JDK="$new_path"
15188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15190  fi
15191
15192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15194
15195  else
15196    # We're on a posix platform. Hooray! :)
15197    path="$BOOT_JDK"
15198    has_space=`$ECHO "$path" | $GREP " "`
15199    if test "x$has_space" != x; then
15200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15202      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15203    fi
15204
15205    # Use eval to expand a potential ~
15206    eval path="$path"
15207    if test ! -f "$path" && test ! -d "$path"; then
15208      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15209    fi
15210
15211    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15212  fi
15213
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15215$as_echo_n "checking for Boot JDK... " >&6; }
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15217$as_echo "$BOOT_JDK" >&6; }
15218              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15219$as_echo_n "checking Boot JDK version... " >&6; }
15220              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15221              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15222$as_echo "$BOOT_JDK_VERSION" >&6; }
15223            fi # end check jdk version
15224          fi # end check rt.jar
15225        fi # end check javac
15226      fi # end check java
15227    fi # end check boot jdk found
15228  fi
15229
15230  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15231
15232  if test "x$BOOT_JDK_FOUND" = xno; then
15233    # Now execute the test
15234
15235  BOOT_JDK_PREFIX="/usr/lib/jvm"
15236  BOOT_JDK_SUFFIX=""
15237  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15238  if test "x$ALL_JDKS_FOUND" != x; then
15239    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15240
15241  if test "x$BOOT_JDK_FOUND" = xno; then
15242    # Now execute the test
15243
15244        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15245        if test -d "$BOOT_JDK"; then
15246          BOOT_JDK_FOUND=maybe
15247          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15248$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15249        fi
15250
15251
15252    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15253    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15254      # Do we have a bin/java?
15255      if test ! -x "$BOOT_JDK/bin/java"; then
15256        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15258        BOOT_JDK_FOUND=no
15259      else
15260        # Do we have a bin/javac?
15261        if test ! -x "$BOOT_JDK/bin/javac"; then
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15265$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15266          BOOT_JDK_FOUND=no
15267        else
15268          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15269          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15272            BOOT_JDK_FOUND=no
15273          else
15274            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15275            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15276
15277            # Extra M4 quote needed to protect [] in grep expression.
15278            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15279            if test "x$FOUND_VERSION_78" = x; then
15280              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15282              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15283$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15284              BOOT_JDK_FOUND=no
15285            else
15286              # We're done! :-)
15287              BOOT_JDK_FOUND=yes
15288
15289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15290
15291  # Input might be given as Windows format, start by converting to
15292  # unix format.
15293  path="$BOOT_JDK"
15294  new_path=`$CYGPATH -u "$path"`
15295
15296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15299  # "foo.exe" is OK but "foo" is an error.
15300  #
15301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15302  # It is also a way to make sure we got the proper file name for the real test later on.
15303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15304  if test "x$test_shortpath" = x; then
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15308  fi
15309
15310  # Call helper function which possibly converts this using DOS-style short mode.
15311  # If so, the updated path is stored in $new_path.
15312
15313  input_path="$new_path"
15314  # Check if we need to convert this using DOS-style short mode. If the path
15315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15316  # take no chances and rewrite it.
15317  # Note: m4 eats our [], so we need to use [ and ] instead.
15318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15319  if test "x$has_forbidden_chars" != x; then
15320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15324      # Going to short mode and back again did indeed matter. Since short mode is
15325      # case insensitive, let's make it lowercase to improve readability.
15326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15327      # Now convert it back to Unix-stile (cygpath)
15328      input_path=`$CYGPATH -u "$shortmode_path"`
15329      new_path="$input_path"
15330    fi
15331  fi
15332
15333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15334  if test "x$test_cygdrive_prefix" = x; then
15335    # As a simple fix, exclude /usr/bin since it's not a real path.
15336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15338      # a path prefixed by /cygdrive for fixpath to work.
15339      new_path="$CYGWIN_ROOT_PATH$input_path"
15340    fi
15341  fi
15342
15343
15344  if test "x$path" != "x$new_path"; then
15345    BOOT_JDK="$new_path"
15346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15348  fi
15349
15350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15351
15352  path="$BOOT_JDK"
15353  has_colon=`$ECHO $path | $GREP ^.:`
15354  new_path="$path"
15355  if test "x$has_colon" = x; then
15356    # Not in mixed or Windows style, start by that.
15357    new_path=`cmd //c echo $path`
15358  fi
15359
15360
15361  input_path="$new_path"
15362  # Check if we need to convert this using DOS-style short mode. If the path
15363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15364  # take no chances and rewrite it.
15365  # Note: m4 eats our [], so we need to use [ and ] instead.
15366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15367  if test "x$has_forbidden_chars" != x; then
15368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15370  fi
15371
15372
15373  windows_path="$new_path"
15374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15375    unix_path=`$CYGPATH -u "$windows_path"`
15376    new_path="$unix_path"
15377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15379    new_path="$unix_path"
15380  fi
15381
15382  if test "x$path" != "x$new_path"; then
15383    BOOT_JDK="$new_path"
15384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15386  fi
15387
15388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15390
15391  else
15392    # We're on a posix platform. Hooray! :)
15393    path="$BOOT_JDK"
15394    has_space=`$ECHO "$path" | $GREP " "`
15395    if test "x$has_space" != x; then
15396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15398      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15399    fi
15400
15401    # Use eval to expand a potential ~
15402    eval path="$path"
15403    if test ! -f "$path" && test ! -d "$path"; then
15404      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15405    fi
15406
15407    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15408  fi
15409
15410              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15411$as_echo_n "checking for Boot JDK... " >&6; }
15412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15413$as_echo "$BOOT_JDK" >&6; }
15414              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15415$as_echo_n "checking Boot JDK version... " >&6; }
15416              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15417              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15418$as_echo "$BOOT_JDK_VERSION" >&6; }
15419            fi # end check jdk version
15420          fi # end check rt.jar
15421        fi # end check javac
15422      fi # end check java
15423    fi # end check boot jdk found
15424  fi
15425
15426    done
15427  fi
15428
15429
15430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15432      # Do we have a bin/java?
15433      if test ! -x "$BOOT_JDK/bin/java"; then
15434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15436        BOOT_JDK_FOUND=no
15437      else
15438        # Do we have a bin/javac?
15439        if test ! -x "$BOOT_JDK/bin/javac"; then
15440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15444          BOOT_JDK_FOUND=no
15445        else
15446          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15447          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15448            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15450            BOOT_JDK_FOUND=no
15451          else
15452            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15454
15455            # Extra M4 quote needed to protect [] in grep expression.
15456            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15457            if test "x$FOUND_VERSION_78" = x; then
15458              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15460              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15461$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15462              BOOT_JDK_FOUND=no
15463            else
15464              # We're done! :-)
15465              BOOT_JDK_FOUND=yes
15466
15467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15468
15469  # Input might be given as Windows format, start by converting to
15470  # unix format.
15471  path="$BOOT_JDK"
15472  new_path=`$CYGPATH -u "$path"`
15473
15474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15477  # "foo.exe" is OK but "foo" is an error.
15478  #
15479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15480  # It is also a way to make sure we got the proper file name for the real test later on.
15481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15482  if test "x$test_shortpath" = x; then
15483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15485    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15486  fi
15487
15488  # Call helper function which possibly converts this using DOS-style short mode.
15489  # If so, the updated path is stored in $new_path.
15490
15491  input_path="$new_path"
15492  # Check if we need to convert this using DOS-style short mode. If the path
15493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15494  # take no chances and rewrite it.
15495  # Note: m4 eats our [], so we need to use [ and ] instead.
15496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15497  if test "x$has_forbidden_chars" != x; then
15498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15502      # Going to short mode and back again did indeed matter. Since short mode is
15503      # case insensitive, let's make it lowercase to improve readability.
15504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15505      # Now convert it back to Unix-stile (cygpath)
15506      input_path=`$CYGPATH -u "$shortmode_path"`
15507      new_path="$input_path"
15508    fi
15509  fi
15510
15511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15512  if test "x$test_cygdrive_prefix" = x; then
15513    # As a simple fix, exclude /usr/bin since it's not a real path.
15514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15516      # a path prefixed by /cygdrive for fixpath to work.
15517      new_path="$CYGWIN_ROOT_PATH$input_path"
15518    fi
15519  fi
15520
15521
15522  if test "x$path" != "x$new_path"; then
15523    BOOT_JDK="$new_path"
15524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15526  fi
15527
15528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15529
15530  path="$BOOT_JDK"
15531  has_colon=`$ECHO $path | $GREP ^.:`
15532  new_path="$path"
15533  if test "x$has_colon" = x; then
15534    # Not in mixed or Windows style, start by that.
15535    new_path=`cmd //c echo $path`
15536  fi
15537
15538
15539  input_path="$new_path"
15540  # Check if we need to convert this using DOS-style short mode. If the path
15541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15542  # take no chances and rewrite it.
15543  # Note: m4 eats our [], so we need to use [ and ] instead.
15544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15545  if test "x$has_forbidden_chars" != x; then
15546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15548  fi
15549
15550
15551  windows_path="$new_path"
15552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15553    unix_path=`$CYGPATH -u "$windows_path"`
15554    new_path="$unix_path"
15555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15557    new_path="$unix_path"
15558  fi
15559
15560  if test "x$path" != "x$new_path"; then
15561    BOOT_JDK="$new_path"
15562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15564  fi
15565
15566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15568
15569  else
15570    # We're on a posix platform. Hooray! :)
15571    path="$BOOT_JDK"
15572    has_space=`$ECHO "$path" | $GREP " "`
15573    if test "x$has_space" != x; then
15574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15576      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15577    fi
15578
15579    # Use eval to expand a potential ~
15580    eval path="$path"
15581    if test ! -f "$path" && test ! -d "$path"; then
15582      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15583    fi
15584
15585    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15586  fi
15587
15588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15589$as_echo_n "checking for Boot JDK... " >&6; }
15590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15591$as_echo "$BOOT_JDK" >&6; }
15592              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15593$as_echo_n "checking Boot JDK version... " >&6; }
15594              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15595              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15596$as_echo "$BOOT_JDK_VERSION" >&6; }
15597            fi # end check jdk version
15598          fi # end check rt.jar
15599        fi # end check javac
15600      fi # end check java
15601    fi # end check boot jdk found
15602  fi
15603
15604  fi
15605
15606
15607    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15608    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15609      # Do we have a bin/java?
15610      if test ! -x "$BOOT_JDK/bin/java"; then
15611        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15613        BOOT_JDK_FOUND=no
15614      else
15615        # Do we have a bin/javac?
15616        if test ! -x "$BOOT_JDK/bin/javac"; then
15617          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15619          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15620$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15621          BOOT_JDK_FOUND=no
15622        else
15623          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15624          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15625            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15627            BOOT_JDK_FOUND=no
15628          else
15629            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15630            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15631
15632            # Extra M4 quote needed to protect [] in grep expression.
15633            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15634            if test "x$FOUND_VERSION_78" = x; then
15635              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15637              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15638$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15639              BOOT_JDK_FOUND=no
15640            else
15641              # We're done! :-)
15642              BOOT_JDK_FOUND=yes
15643
15644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15645
15646  # Input might be given as Windows format, start by converting to
15647  # unix format.
15648  path="$BOOT_JDK"
15649  new_path=`$CYGPATH -u "$path"`
15650
15651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15654  # "foo.exe" is OK but "foo" is an error.
15655  #
15656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15657  # It is also a way to make sure we got the proper file name for the real test later on.
15658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15659  if test "x$test_shortpath" = x; then
15660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15661$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15662    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15663  fi
15664
15665  # Call helper function which possibly converts this using DOS-style short mode.
15666  # If so, the updated path is stored in $new_path.
15667
15668  input_path="$new_path"
15669  # Check if we need to convert this using DOS-style short mode. If the path
15670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15671  # take no chances and rewrite it.
15672  # Note: m4 eats our [], so we need to use [ and ] instead.
15673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15674  if test "x$has_forbidden_chars" != x; then
15675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15679      # Going to short mode and back again did indeed matter. Since short mode is
15680      # case insensitive, let's make it lowercase to improve readability.
15681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15682      # Now convert it back to Unix-stile (cygpath)
15683      input_path=`$CYGPATH -u "$shortmode_path"`
15684      new_path="$input_path"
15685    fi
15686  fi
15687
15688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15689  if test "x$test_cygdrive_prefix" = x; then
15690    # As a simple fix, exclude /usr/bin since it's not a real path.
15691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15693      # a path prefixed by /cygdrive for fixpath to work.
15694      new_path="$CYGWIN_ROOT_PATH$input_path"
15695    fi
15696  fi
15697
15698
15699  if test "x$path" != "x$new_path"; then
15700    BOOT_JDK="$new_path"
15701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15703  fi
15704
15705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15706
15707  path="$BOOT_JDK"
15708  has_colon=`$ECHO $path | $GREP ^.:`
15709  new_path="$path"
15710  if test "x$has_colon" = x; then
15711    # Not in mixed or Windows style, start by that.
15712    new_path=`cmd //c echo $path`
15713  fi
15714
15715
15716  input_path="$new_path"
15717  # Check if we need to convert this using DOS-style short mode. If the path
15718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15719  # take no chances and rewrite it.
15720  # Note: m4 eats our [], so we need to use [ and ] instead.
15721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15722  if test "x$has_forbidden_chars" != x; then
15723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15725  fi
15726
15727
15728  windows_path="$new_path"
15729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15730    unix_path=`$CYGPATH -u "$windows_path"`
15731    new_path="$unix_path"
15732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15734    new_path="$unix_path"
15735  fi
15736
15737  if test "x$path" != "x$new_path"; then
15738    BOOT_JDK="$new_path"
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15741  fi
15742
15743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15745
15746  else
15747    # We're on a posix platform. Hooray! :)
15748    path="$BOOT_JDK"
15749    has_space=`$ECHO "$path" | $GREP " "`
15750    if test "x$has_space" != x; then
15751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15752$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15753      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15754    fi
15755
15756    # Use eval to expand a potential ~
15757    eval path="$path"
15758    if test ! -f "$path" && test ! -d "$path"; then
15759      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15760    fi
15761
15762    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15763  fi
15764
15765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15766$as_echo_n "checking for Boot JDK... " >&6; }
15767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15768$as_echo "$BOOT_JDK" >&6; }
15769              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15770$as_echo_n "checking Boot JDK version... " >&6; }
15771              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15773$as_echo "$BOOT_JDK_VERSION" >&6; }
15774            fi # end check jdk version
15775          fi # end check rt.jar
15776        fi # end check javac
15777      fi # end check java
15778    fi # end check boot jdk found
15779  fi
15780
15781
15782# If we haven't found anything yet, we've truly lost. Give up.
15783if test "x$BOOT_JDK_FOUND" = xno; then
15784
15785    # Print a helpful message on how to acquire the necessary build dependency.
15786    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15787    MISSING_DEPENDENCY=openjdk
15788    PKGHANDLER_COMMAND=
15789
15790    case $PKGHANDLER in
15791	apt-get)
15792                apt_help     $MISSING_DEPENDENCY ;;
15793    yum)
15794                yum_help     $MISSING_DEPENDENCY ;;
15795	port)
15796                port_help    $MISSING_DEPENDENCY ;;
15797	pkgutil)
15798                pkgutil_help $MISSING_DEPENDENCY ;;
15799	pkgadd)
15800                pkgadd_help  $MISSING_DEPENDENCY ;;
15801    * )
15802      break ;;
15803    esac
15804
15805    if test "x$PKGHANDLER_COMMAND" != x; then
15806        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15807    fi
15808
15809  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15810$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15811  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15812$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15813  as_fn_error $? "Cannot continue" "$LINENO" 5
15814fi
15815
15816# Setup proper paths for what we found
15817BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15818if test ! -f "$BOOT_RTJAR"; then
15819    # On MacOSX it is called classes.jar
15820    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15821    if test -f "$BOOT_RTJAR"; then
15822      # Remove the ..
15823      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15824    fi
15825fi
15826BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15827BOOT_JDK="$BOOT_JDK"
15828
15829
15830
15831
15832# Setup tools from the Boot JDK.
15833
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15835$as_echo_n "checking for java in Boot JDK... " >&6; }
15836  JAVA=$BOOT_JDK/bin/java
15837  if test ! -x $JAVA; then
15838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15839$as_echo "not found" >&6; }
15840      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15841$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15842      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15843  fi
15844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15845$as_echo "ok" >&6; }
15846
15847
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15849$as_echo_n "checking for javac in Boot JDK... " >&6; }
15850  JAVAC=$BOOT_JDK/bin/javac
15851  if test ! -x $JAVAC; then
15852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15853$as_echo "not found" >&6; }
15854      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15855$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15856      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15857  fi
15858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15859$as_echo "ok" >&6; }
15860
15861
15862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15863$as_echo_n "checking for javah in Boot JDK... " >&6; }
15864  JAVAH=$BOOT_JDK/bin/javah
15865  if test ! -x $JAVAH; then
15866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15867$as_echo "not found" >&6; }
15868      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15869$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15870      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15871  fi
15872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15873$as_echo "ok" >&6; }
15874
15875
15876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15877$as_echo_n "checking for javap in Boot JDK... " >&6; }
15878  JAVAP=$BOOT_JDK/bin/javap
15879  if test ! -x $JAVAP; then
15880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15881$as_echo "not found" >&6; }
15882      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15883$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15884      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15885  fi
15886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15887$as_echo "ok" >&6; }
15888
15889
15890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15891$as_echo_n "checking for jar in Boot JDK... " >&6; }
15892  JAR=$BOOT_JDK/bin/jar
15893  if test ! -x $JAR; then
15894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15895$as_echo "not found" >&6; }
15896      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15897$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15898      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15899  fi
15900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15901$as_echo "ok" >&6; }
15902
15903
15904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15905$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15906  RMIC=$BOOT_JDK/bin/rmic
15907  if test ! -x $RMIC; then
15908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15909$as_echo "not found" >&6; }
15910      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15912      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15913  fi
15914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15915$as_echo "ok" >&6; }
15916
15917
15918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15919$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15920  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15921  if test ! -x $NATIVE2ASCII; then
15922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15923$as_echo "not found" >&6; }
15924      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15925$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15926      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15927  fi
15928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15929$as_echo "ok" >&6; }
15930
15931
15932# Finally, set some other options...
15933
15934# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15935BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15936
15937
15938
15939
15940##############################################################################
15941#
15942# Specify options for anything that is run with the Boot JDK.
15943#
15944
15945# Check whether --with-boot-jdk-jvmargs was given.
15946if test "${with_boot_jdk_jvmargs+set}" = set; then :
15947  withval=$with_boot_jdk_jvmargs;
15948fi
15949
15950
15951if test "x$with_boot_jdk_jvmargs" = x; then
15952    # Not all JVM:s accept the same arguments on the command line.
15953    # OpenJDK specific increase in thread stack for JDK build,
15954    # well more specifically, when running javac.
15955    if test "x$BUILD_NUM_BITS" = x32; then
15956       STACK_SIZE=768
15957    else
15958       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15959       # since 64-bit pointers are pushed on the stach. Apparently, we need
15960       # to increase the stack space when javacing the JDK....
15961       STACK_SIZE=1536
15962    fi
15963
15964    # Minimum amount of heap memory.
15965
15966    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15967    $ECHO "Command: $JAVA -Xms64M -version" >&5
15968    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15969    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15970    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15971    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15972        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15973	JVM_ARG_OK=true
15974    else
15975	$ECHO "Arg failed:" >&5
15976	$ECHO "$OUTPUT" >&5
15977	JVM_ARG_OK=false
15978    fi
15979
15980    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15981        # Why does macosx need more heap? Its the huge JDK batch.
15982
15983    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15984    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15985    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15986    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15987    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15988    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15989        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15990	JVM_ARG_OK=true
15991    else
15992	$ECHO "Arg failed:" >&5
15993	$ECHO "$OUTPUT" >&5
15994	JVM_ARG_OK=false
15995    fi
15996
15997    else
15998
15999    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16000    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16001    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16002    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16003    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16004    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16005        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16006	JVM_ARG_OK=true
16007    else
16008	$ECHO "Arg failed:" >&5
16009	$ECHO "$OUTPUT" >&5
16010	JVM_ARG_OK=false
16011    fi
16012
16013    fi
16014    # When is adding -client something that speeds up the JVM?
16015    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16016
16017    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16018    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16019    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16020    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16021    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16022    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16023        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16024	JVM_ARG_OK=true
16025    else
16026	$ECHO "Arg failed:" >&5
16027	$ECHO "$OUTPUT" >&5
16028	JVM_ARG_OK=false
16029    fi
16030
16031
16032    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16033    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16034    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16035    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16036    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16037    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16038        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16039	JVM_ARG_OK=true
16040    else
16041	$ECHO "Arg failed:" >&5
16042	$ECHO "$OUTPUT" >&5
16043	JVM_ARG_OK=false
16044    fi
16045
16046
16047    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16048    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16049    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16050    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16051    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16052    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16053        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16054	JVM_ARG_OK=true
16055    else
16056	$ECHO "Arg failed:" >&5
16057	$ECHO "$OUTPUT" >&5
16058	JVM_ARG_OK=false
16059    fi
16060
16061    # Disable special log output when a debug build is used as Boot JDK...
16062
16063    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16064    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16065    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16066    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16067    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16068    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16069        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16070	JVM_ARG_OK=true
16071    else
16072	$ECHO "Arg failed:" >&5
16073	$ECHO "$OUTPUT" >&5
16074	JVM_ARG_OK=false
16075    fi
16076
16077fi
16078
16079BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16080
16081
16082
16083###############################################################################
16084#
16085# Configure the sources to use. We can add or override individual directories.
16086#
16087###############################################################################
16088
16089
16090
16091# Where are the sources. Any of these can be overridden
16092# using --with-override-corba and the likes.
16093LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16094CORBA_TOPDIR="$SRC_ROOT/corba"
16095JAXP_TOPDIR="$SRC_ROOT/jaxp"
16096JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16097HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16098NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16099JDK_TOPDIR="$SRC_ROOT/jdk"
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110###############################################################################
16111#
16112# Pickup additional source for a component from outside of the source root
16113# or override source for a component.
16114#
16115
16116# Check whether --with-add-source-root was given.
16117if test "${with_add_source_root+set}" = set; then :
16118  withval=$with_add_source_root;
16119fi
16120
16121
16122
16123# Check whether --with-override-source-root was given.
16124if test "${with_override_source_root+set}" = set; then :
16125  withval=$with_override_source_root;
16126fi
16127
16128
16129
16130# Check whether --with-adds-and-overrides was given.
16131if test "${with_adds_and_overrides+set}" = set; then :
16132  withval=$with_adds_and_overrides;
16133fi
16134
16135
16136if test "x$with_adds_and_overrides" != x; then
16137    with_add_source_root="$with_adds_and_overrides/adds"
16138    with_override_source_root="$with_adds_and_overrides/overrides"
16139fi
16140
16141if test "x$with_add_source_root" != x; then
16142    if ! test -d $with_add_source_root; then
16143       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16144    fi
16145    CURDIR="$PWD"
16146    cd "$with_add_source_root"
16147    ADD_SRC_ROOT="`pwd`"
16148    cd "$CURDIR"
16149    # Verify that the addon source root does not have any root makefiles.
16150    # If it does, then it is usually an error, prevent this.
16151    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16152       test -f $with_add_source_root/langtools/make/Makefile; then
16153        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
16154    fi
16155    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16156       test -f $with_add_source_root/corba/make/Makefile; then
16157        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
16158    fi
16159    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16160       test -f $with_add_source_root/jaxp/make/Makefile; then
16161        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
16162    fi
16163    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16164       test -f $with_add_source_root/jaxws/make/Makefile; then
16165        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
16166    fi
16167    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16168       test -f $with_add_source_root/hotspot/make/Makefile; then
16169        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
16170    fi
16171    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16172       test -f $with_add_source_root/jdk/make/Makefile; then
16173        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
16174    fi
16175fi
16176
16177
16178if test "x$with_override_source_root" != x; then
16179    if ! test -d $with_override_source_root; then
16180       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16181    fi
16182    CURDIR="$PWD"
16183    cd "$with_override_source_root"
16184    OVERRIDE_SRC_ROOT="`pwd`"
16185    cd "$CURDIR"
16186    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16187       test -f $with_override_source_root/langtools/make/Makefile; then
16188        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
16189    fi
16190    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16191       test -f $with_override_source_root/corba/make/Makefile; then
16192        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
16193    fi
16194    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16195       test -f $with_override_source_root/jaxp/make/Makefile; then
16196        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
16197    fi
16198    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16199       test -f $with_override_source_root/jaxws/make/Makefile; then
16200        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
16201    fi
16202    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16203       test -f $with_override_source_root/hotspot/make/Makefile; then
16204        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
16205    fi
16206    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16207       test -f $with_override_source_root/jdk/make/Makefile; then
16208        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
16209    fi
16210fi
16211
16212
16213###############################################################################
16214#
16215# Override a repo completely, this is used for example when you have 3 small
16216# development sandboxes of the langtools sources and want to avoid having 3 full
16217# OpenJDK sources checked out on disk.
16218#
16219# Assuming that the 3 langtools sandboxes are located here:
16220# /home/fredrik/sandbox1/langtools
16221# /home/fredrik/sandbox2/langtools
16222# /home/fredrik/sandbox3/langtools
16223#
16224# From the source root you create build subdirs manually:
16225#     mkdir -p build1 build2 build3
16226# in each build directory run:
16227#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16228#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16229#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16230#
16231
16232
16233# Check whether --with-override-langtools was given.
16234if test "${with_override_langtools+set}" = set; then :
16235  withval=$with_override_langtools;
16236fi
16237
16238
16239
16240# Check whether --with-override-corba was given.
16241if test "${with_override_corba+set}" = set; then :
16242  withval=$with_override_corba;
16243fi
16244
16245
16246
16247# Check whether --with-override-jaxp was given.
16248if test "${with_override_jaxp+set}" = set; then :
16249  withval=$with_override_jaxp;
16250fi
16251
16252
16253
16254# Check whether --with-override-jaxws was given.
16255if test "${with_override_jaxws+set}" = set; then :
16256  withval=$with_override_jaxws;
16257fi
16258
16259
16260
16261# Check whether --with-override-hotspot was given.
16262if test "${with_override_hotspot+set}" = set; then :
16263  withval=$with_override_hotspot;
16264fi
16265
16266
16267
16268# Check whether --with-override-jdk was given.
16269if test "${with_override_jdk+set}" = set; then :
16270  withval=$with_override_jdk;
16271fi
16272
16273
16274if test "x$with_override_langtools" != x; then
16275    CURDIR="$PWD"
16276    cd "$with_override_langtools"
16277    LANGTOOLS_TOPDIR="`pwd`"
16278    cd "$CURDIR"
16279    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16280        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16281    fi
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16283$as_echo_n "checking if langtools should be overridden... " >&6; }
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16285$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16286fi
16287if test "x$with_override_corba" != x; then
16288    CURDIR="$PWD"
16289    cd "$with_override_corba"
16290    CORBA_TOPDIR="`pwd`"
16291    cd "$CURDIR"
16292    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16293        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16294    fi
16295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16296$as_echo_n "checking if corba should be overridden... " >&6; }
16297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16298$as_echo "yes with $CORBA_TOPDIR" >&6; }
16299fi
16300if test "x$with_override_jaxp" != x; then
16301    CURDIR="$PWD"
16302    cd "$with_override_jaxp"
16303    JAXP_TOPDIR="`pwd`"
16304    cd "$CURDIR"
16305    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16306        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16307    fi
16308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16309$as_echo_n "checking if jaxp should be overridden... " >&6; }
16310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16311$as_echo "yes with $JAXP_TOPDIR" >&6; }
16312fi
16313if test "x$with_override_jaxws" != x; then
16314    CURDIR="$PWD"
16315    cd "$with_override_jaxws"
16316    JAXWS_TOPDIR="`pwd`"
16317    cd "$CURDIR"
16318    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16319        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16320    fi
16321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16322$as_echo_n "checking if jaxws should be overridden... " >&6; }
16323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16324$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16325fi
16326if test "x$with_override_hotspot" != x; then
16327    CURDIR="$PWD"
16328    cd "$with_override_hotspot"
16329    HOTSPOT_TOPDIR="`pwd`"
16330    cd "$CURDIR"
16331    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16332       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16333        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16334    fi
16335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16336$as_echo_n "checking if hotspot should be overridden... " >&6; }
16337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16338$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16339fi
16340if test "x$with_override_nashorn" != x; then
16341    CURDIR="$PWD"
16342    cd "$with_override_nashorn"
16343    NASHORN_TOPDIR="`pwd`"
16344    cd "$CURDIR"
16345    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16346        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16347    fi
16348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16349$as_echo_n "checking if nashorn should be overridden... " >&6; }
16350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16351$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16352fi
16353if test "x$with_override_jdk" != x; then
16354    CURDIR="$PWD"
16355    cd "$with_override_jdk"
16356    JDK_TOPDIR="`pwd`"
16357    cd "$CURDIR"
16358    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16359        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16360    fi
16361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16362$as_echo_n "checking if JDK should be overridden... " >&6; }
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16364$as_echo "yes with $JDK_TOPDIR" >&6; }
16365fi
16366
16367
16368
16369BUILD_OUTPUT="$OUTPUT_ROOT"
16370
16371
16372HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16373BUILD_HOTSPOT=true
16374
16375
16376
16377# Check whether --with-import-hotspot was given.
16378if test "${with_import_hotspot+set}" = set; then :
16379  withval=$with_import_hotspot;
16380fi
16381
16382if test "x$with_import_hotspot" != x; then
16383    CURDIR="$PWD"
16384    cd "$with_import_hotspot"
16385    HOTSPOT_DIST="`pwd`"
16386    cd "$CURDIR"
16387    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16388        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16389    fi
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16391$as_echo_n "checking if hotspot should be imported... " >&6; }
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16393$as_echo "yes from $HOTSPOT_DIST" >&6; }
16394    BUILD_HOTSPOT=false
16395fi
16396
16397JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16398
16399
16400###############################################################################
16401#
16402# Setup the toolchain (compilers etc), i.e. the tools that need to be
16403# cross-compilation aware.
16404#
16405###############################################################################
16406
16407
16408###############################################################################
16409#
16410# Configure the development tool paths and potential sysroot.
16411#
16412ac_ext=cpp
16413ac_cpp='$CXXCPP $CPPFLAGS'
16414ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16415ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16416ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16417
16418
16419# The option used to specify the target .o,.a or .so file.
16420# When compiling, how to specify the to be created object file.
16421CC_OUT_OPTION='-o$(SPACE)'
16422# When linking, how to specify the to be created executable.
16423EXE_OUT_OPTION='-o$(SPACE)'
16424# When linking, how to specify the to be created dynamically linkable library.
16425LD_OUT_OPTION='-o$(SPACE)'
16426# When archiving, how to specify the to be create static archive for object files.
16427AR_OUT_OPTION='rcs$(SPACE)'
16428
16429
16430
16431
16432
16433# Locate the actual tools
16434
16435
16436# Check whether --with-jtreg was given.
16437if test "${with_jtreg+set}" = set; then :
16438  withval=$with_jtreg;
16439else
16440  with_jtreg=no
16441fi
16442
16443
16444  if test "x$with_jtreg" = xno; then
16445    # jtreg disabled
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16447$as_echo_n "checking for jtreg... " >&6; }
16448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16449$as_echo "no" >&6; }
16450  else
16451    if test "x$with_jtreg" != xyes; then
16452      # with path specified.
16453      JT_HOME="$with_jtreg"
16454    fi
16455
16456    if test "x$JT_HOME" != x; then
16457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16458$as_echo_n "checking for jtreg... " >&6; }
16459
16460      # use JT_HOME enviroment var.
16461
16462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16463
16464  # Input might be given as Windows format, start by converting to
16465  # unix format.
16466  path="$JT_HOME"
16467  new_path=`$CYGPATH -u "$path"`
16468
16469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16472  # "foo.exe" is OK but "foo" is an error.
16473  #
16474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16475  # It is also a way to make sure we got the proper file name for the real test later on.
16476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16477  if test "x$test_shortpath" = x; then
16478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16479$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16480    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16481  fi
16482
16483  # Call helper function which possibly converts this using DOS-style short mode.
16484  # If so, the updated path is stored in $new_path.
16485
16486  input_path="$new_path"
16487  # Check if we need to convert this using DOS-style short mode. If the path
16488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16489  # take no chances and rewrite it.
16490  # Note: m4 eats our [], so we need to use [ and ] instead.
16491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16492  if test "x$has_forbidden_chars" != x; then
16493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16497      # Going to short mode and back again did indeed matter. Since short mode is
16498      # case insensitive, let's make it lowercase to improve readability.
16499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16500      # Now convert it back to Unix-stile (cygpath)
16501      input_path=`$CYGPATH -u "$shortmode_path"`
16502      new_path="$input_path"
16503    fi
16504  fi
16505
16506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16507  if test "x$test_cygdrive_prefix" = x; then
16508    # As a simple fix, exclude /usr/bin since it's not a real path.
16509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16511      # a path prefixed by /cygdrive for fixpath to work.
16512      new_path="$CYGWIN_ROOT_PATH$input_path"
16513    fi
16514  fi
16515
16516
16517  if test "x$path" != "x$new_path"; then
16518    JT_HOME="$new_path"
16519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16520$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16521  fi
16522
16523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524
16525  path="$JT_HOME"
16526  has_colon=`$ECHO $path | $GREP ^.:`
16527  new_path="$path"
16528  if test "x$has_colon" = x; then
16529    # Not in mixed or Windows style, start by that.
16530    new_path=`cmd //c echo $path`
16531  fi
16532
16533
16534  input_path="$new_path"
16535  # Check if we need to convert this using DOS-style short mode. If the path
16536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16537  # take no chances and rewrite it.
16538  # Note: m4 eats our [], so we need to use [ and ] instead.
16539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16540  if test "x$has_forbidden_chars" != x; then
16541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16543  fi
16544
16545
16546  windows_path="$new_path"
16547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16548    unix_path=`$CYGPATH -u "$windows_path"`
16549    new_path="$unix_path"
16550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16552    new_path="$unix_path"
16553  fi
16554
16555  if test "x$path" != "x$new_path"; then
16556    JT_HOME="$new_path"
16557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16558$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16559  fi
16560
16561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16563
16564  else
16565    # We're on a posix platform. Hooray! :)
16566    path="$JT_HOME"
16567    has_space=`$ECHO "$path" | $GREP " "`
16568    if test "x$has_space" != x; then
16569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16570$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16572    fi
16573
16574    # Use eval to expand a potential ~
16575    eval path="$path"
16576    if test ! -f "$path" && test ! -d "$path"; then
16577      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16578    fi
16579
16580    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16581  fi
16582
16583
16584      # jtreg win32 script works for everybody
16585      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16586
16587      if test ! -f "$JTREGEXE"; then
16588        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16589      fi
16590
16591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16592$as_echo "$JTREGEXE" >&6; }
16593    else
16594      # try to find jtreg on path
16595
16596    for ac_prog in jtreg
16597do
16598  # Extract the first word of "$ac_prog", so it can be a program name with args.
16599set dummy $ac_prog; ac_word=$2
16600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16601$as_echo_n "checking for $ac_word... " >&6; }
16602if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16603  $as_echo_n "(cached) " >&6
16604else
16605  case $JTREGEXE in
16606  [\\/]* | ?:[\\/]*)
16607  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16608  ;;
16609  *)
16610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16611for as_dir in $PATH
16612do
16613  IFS=$as_save_IFS
16614  test -z "$as_dir" && as_dir=.
16615    for ac_exec_ext in '' $ac_executable_extensions; do
16616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16617    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16619    break 2
16620  fi
16621done
16622  done
16623IFS=$as_save_IFS
16624
16625  ;;
16626esac
16627fi
16628JTREGEXE=$ac_cv_path_JTREGEXE
16629if test -n "$JTREGEXE"; then
16630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16631$as_echo "$JTREGEXE" >&6; }
16632else
16633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16634$as_echo "no" >&6; }
16635fi
16636
16637
16638  test -n "$JTREGEXE" && break
16639done
16640
16641
16642    if test "x$JTREGEXE" = x; then
16643        if test "xjtreg" = x; then
16644          PROG_NAME=jtregexe
16645        else
16646          PROG_NAME=jtreg
16647        fi
16648        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16649$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16650        as_fn_error $? "Cannot continue" "$LINENO" 5
16651    fi
16652
16653
16654      JT_HOME="`$DIRNAME $JTREGEXE`"
16655    fi
16656  fi
16657
16658
16659
16660
16661
16662if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16663
16664  # Store path to cygwin link.exe to help excluding it when searching for
16665  # VS linker. This must be done before changing the PATH when looking for VS.
16666  # Extract the first word of "link", so it can be a program name with args.
16667set dummy link; ac_word=$2
16668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16669$as_echo_n "checking for $ac_word... " >&6; }
16670if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16671  $as_echo_n "(cached) " >&6
16672else
16673  case $CYGWIN_LINK in
16674  [\\/]* | ?:[\\/]*)
16675  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16676  ;;
16677  *)
16678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16679for as_dir in $PATH
16680do
16681  IFS=$as_save_IFS
16682  test -z "$as_dir" && as_dir=.
16683    for ac_exec_ext in '' $ac_executable_extensions; do
16684  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16685    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16687    break 2
16688  fi
16689done
16690  done
16691IFS=$as_save_IFS
16692
16693  ;;
16694esac
16695fi
16696CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16697if test -n "$CYGWIN_LINK"; then
16698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16699$as_echo "$CYGWIN_LINK" >&6; }
16700else
16701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16702$as_echo "no" >&6; }
16703fi
16704
16705
16706  if test "x$CYGWIN_LINK" != x; then
16707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16708$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16709    "$CYGWIN_LINK" --version > /dev/null
16710    if test $? -eq 0 ; then
16711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16712$as_echo "yes" >&6; }
16713    else
16714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16715$as_echo "no" >&6; }
16716      # This might be the VS linker. Don't exclude it later on.
16717      CYGWIN_LINK=""
16718    fi
16719  fi
16720
16721  # First-hand choice is to locate and run the vsvars bat file.
16722
16723  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16724    VCVARSFILE="vc/bin/vcvars32.bat"
16725  else
16726    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16727  fi
16728
16729  VS_ENV_CMD=""
16730  VS_ENV_ARGS=""
16731  if test "x$with_toolsdir" != x; then
16732
16733  if test "x$VS_ENV_CMD" = x; then
16734    VS100BASE="$with_toolsdir/../.."
16735    METHOD="--with-tools-dir"
16736
16737  windows_path="$VS100BASE"
16738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16739    unix_path=`$CYGPATH -u "$windows_path"`
16740    VS100BASE="$unix_path"
16741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16743    VS100BASE="$unix_path"
16744  fi
16745
16746    if test -d "$VS100BASE"; then
16747      if test -f "$VS100BASE/$VCVARSFILE"; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16749$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16750        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16751      else
16752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16753$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16755$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16756      fi
16757    fi
16758  fi
16759
16760  fi
16761
16762  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16763    # Having specified an argument which is incorrect will produce an instant failure;
16764    # we should not go on looking
16765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16766$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16767    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16768$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16769    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16770  fi
16771
16772  if test "x$VS100COMNTOOLS" != x; then
16773
16774  if test "x$VS_ENV_CMD" = x; then
16775    VS100BASE="$VS100COMNTOOLS/../.."
16776    METHOD="VS100COMNTOOLS variable"
16777
16778  windows_path="$VS100BASE"
16779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780    unix_path=`$CYGPATH -u "$windows_path"`
16781    VS100BASE="$unix_path"
16782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16784    VS100BASE="$unix_path"
16785  fi
16786
16787    if test -d "$VS100BASE"; then
16788      if test -f "$VS100BASE/$VCVARSFILE"; then
16789        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16790$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16791        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16792      else
16793        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16794$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16795        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16796$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16797      fi
16798    fi
16799  fi
16800
16801  fi
16802  if test "x$PROGRAMFILES" != x; then
16803
16804  if test "x$VS_ENV_CMD" = x; then
16805    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16806    METHOD="well-known name"
16807
16808  windows_path="$VS100BASE"
16809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810    unix_path=`$CYGPATH -u "$windows_path"`
16811    VS100BASE="$unix_path"
16812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16814    VS100BASE="$unix_path"
16815  fi
16816
16817    if test -d "$VS100BASE"; then
16818      if test -f "$VS100BASE/$VCVARSFILE"; then
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16820$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16821        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16822      else
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16824$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16826$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16827      fi
16828    fi
16829  fi
16830
16831  fi
16832
16833  if test "x$VS_ENV_CMD" = x; then
16834    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16835    METHOD="well-known name"
16836
16837  windows_path="$VS100BASE"
16838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839    unix_path=`$CYGPATH -u "$windows_path"`
16840    VS100BASE="$unix_path"
16841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16843    VS100BASE="$unix_path"
16844  fi
16845
16846    if test -d "$VS100BASE"; then
16847      if test -f "$VS100BASE/$VCVARSFILE"; then
16848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16849$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16850        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16851      else
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16853$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16856      fi
16857    fi
16858  fi
16859
16860
16861  if test "x$VS_ENV_CMD" = x; then
16862    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16863    METHOD="well-known name"
16864
16865  windows_path="$VS100BASE"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    VS100BASE="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    VS100BASE="$unix_path"
16872  fi
16873
16874    if test -d "$VS100BASE"; then
16875      if test -f "$VS100BASE/$VCVARSFILE"; then
16876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16877$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16878        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16879      else
16880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16881$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16882        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16883$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16884      fi
16885    fi
16886  fi
16887
16888
16889  if test "x$ProgramW6432" != x; then
16890
16891  if test "x$VS_ENV_CMD" = x; then
16892    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16893    METHOD="well-known name"
16894
16895  windows_path="$WIN_SDK_BASE"
16896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897    unix_path=`$CYGPATH -u "$windows_path"`
16898    WIN_SDK_BASE="$unix_path"
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16901    WIN_SDK_BASE="$unix_path"
16902  fi
16903
16904    if test -d "$WIN_SDK_BASE"; then
16905      # There have been cases of partial or broken SDK installations. A missing
16906      # lib dir is not going to work.
16907      if test ! -d "$WIN_SDK_BASE/../lib"; then
16908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16909$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16911$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16912      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16914$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16915        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16916        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16917          VS_ENV_ARGS="/x86"
16918        else
16919          VS_ENV_ARGS="/x64"
16920        fi
16921      else
16922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16923$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16924        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16925$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16926      fi
16927    fi
16928  fi
16929
16930  fi
16931  if test "x$PROGRAMW6432" != x; then
16932
16933  if test "x$VS_ENV_CMD" = x; then
16934    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16935    METHOD="well-known name"
16936
16937  windows_path="$WIN_SDK_BASE"
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939    unix_path=`$CYGPATH -u "$windows_path"`
16940    WIN_SDK_BASE="$unix_path"
16941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16943    WIN_SDK_BASE="$unix_path"
16944  fi
16945
16946    if test -d "$WIN_SDK_BASE"; then
16947      # There have been cases of partial or broken SDK installations. A missing
16948      # lib dir is not going to work.
16949      if test ! -d "$WIN_SDK_BASE/../lib"; then
16950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16951$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16953$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16954      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16957        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16958        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16959          VS_ENV_ARGS="/x86"
16960        else
16961          VS_ENV_ARGS="/x64"
16962        fi
16963      else
16964        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16965$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16966        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16967$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16968      fi
16969    fi
16970  fi
16971
16972  fi
16973  if test "x$PROGRAMFILES" != x; then
16974
16975  if test "x$VS_ENV_CMD" = x; then
16976    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16977    METHOD="well-known name"
16978
16979  windows_path="$WIN_SDK_BASE"
16980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16981    unix_path=`$CYGPATH -u "$windows_path"`
16982    WIN_SDK_BASE="$unix_path"
16983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16985    WIN_SDK_BASE="$unix_path"
16986  fi
16987
16988    if test -d "$WIN_SDK_BASE"; then
16989      # There have been cases of partial or broken SDK installations. A missing
16990      # lib dir is not going to work.
16991      if test ! -d "$WIN_SDK_BASE/../lib"; then
16992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16993$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16995$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16996      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16999        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17000        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17001          VS_ENV_ARGS="/x86"
17002        else
17003          VS_ENV_ARGS="/x64"
17004        fi
17005      else
17006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17007$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17009$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17010      fi
17011    fi
17012  fi
17013
17014  fi
17015
17016  if test "x$VS_ENV_CMD" = x; then
17017    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17018    METHOD="well-known name"
17019
17020  windows_path="$WIN_SDK_BASE"
17021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17022    unix_path=`$CYGPATH -u "$windows_path"`
17023    WIN_SDK_BASE="$unix_path"
17024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17026    WIN_SDK_BASE="$unix_path"
17027  fi
17028
17029    if test -d "$WIN_SDK_BASE"; then
17030      # There have been cases of partial or broken SDK installations. A missing
17031      # lib dir is not going to work.
17032      if test ! -d "$WIN_SDK_BASE/../lib"; then
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17034$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17036$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17037      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17040        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17041        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17042          VS_ENV_ARGS="/x86"
17043        else
17044          VS_ENV_ARGS="/x64"
17045        fi
17046      else
17047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17048$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17050$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17051      fi
17052    fi
17053  fi
17054
17055
17056  if test "x$VS_ENV_CMD" = x; then
17057    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17058    METHOD="well-known name"
17059
17060  windows_path="$WIN_SDK_BASE"
17061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17062    unix_path=`$CYGPATH -u "$windows_path"`
17063    WIN_SDK_BASE="$unix_path"
17064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17066    WIN_SDK_BASE="$unix_path"
17067  fi
17068
17069    if test -d "$WIN_SDK_BASE"; then
17070      # There have been cases of partial or broken SDK installations. A missing
17071      # lib dir is not going to work.
17072      if test ! -d "$WIN_SDK_BASE/../lib"; then
17073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17075        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17076$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17077      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17080        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17081        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17082          VS_ENV_ARGS="/x86"
17083        else
17084          VS_ENV_ARGS="/x64"
17085        fi
17086      else
17087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17090$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17091      fi
17092    fi
17093  fi
17094
17095
17096  if test "x$VS_ENV_CMD" != x; then
17097    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17098
17099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17100
17101  # First separate the path from the arguments. This will split at the first
17102  # space.
17103  complete="$VS_ENV_CMD"
17104  path="${complete%% *}"
17105  tmp="$complete EOL"
17106  arguments="${tmp#* }"
17107
17108  # Input might be given as Windows format, start by converting to
17109  # unix format.
17110  new_path=`$CYGPATH -u "$path"`
17111
17112  # Now try to locate executable using which
17113  new_path=`$WHICH "$new_path" 2> /dev/null`
17114  # bat and cmd files are not always considered executable in cygwin causing which
17115  # to not find them
17116  if test "x$new_path" = x \
17117           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17118           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17119    new_path=`$CYGPATH -u "$path"`
17120  fi
17121  if test "x$new_path" = x; then
17122    # Oops. Which didn't find the executable.
17123    # The splitting of arguments from the executable at a space might have been incorrect,
17124    # since paths with space are more likely in Windows. Give it another try with the whole
17125    # argument.
17126    path="$complete"
17127    arguments="EOL"
17128    new_path=`$CYGPATH -u "$path"`
17129    new_path=`$WHICH "$new_path" 2> /dev/null`
17130    # bat and cmd files are not always considered executable in cygwin causing which
17131    # to not find them
17132    if test "x$new_path" = x \
17133             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17134             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17135      new_path=`$CYGPATH -u "$path"`
17136    fi
17137    if test "x$new_path" = x; then
17138      # It's still not found. Now this is an unrecoverable error.
17139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17140$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17141      has_space=`$ECHO "$complete" | $GREP " "`
17142      if test "x$has_space" != x; then
17143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17145      fi
17146      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17147    fi
17148  fi
17149
17150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17153  # "foo.exe" is OK but "foo" is an error.
17154  #
17155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17156  # It is also a way to make sure we got the proper file name for the real test later on.
17157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17158  if test "x$test_shortpath" = x; then
17159    # Short path failed, file does not exist as specified.
17160    # Try adding .exe or .cmd
17161    if test -f "${new_path}.exe"; then
17162       input_to_shortpath="${new_path}.exe"
17163    elif test -f "${new_path}.cmd"; then
17164       input_to_shortpath="${new_path}.cmd"
17165    else
17166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17167$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17170      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17171    fi
17172  else
17173    input_to_shortpath="$new_path"
17174  fi
17175
17176  # Call helper function which possibly converts this using DOS-style short mode.
17177  # If so, the updated path is stored in $new_path.
17178  new_path="$input_to_shortpath"
17179
17180  input_path="$input_to_shortpath"
17181  # Check if we need to convert this using DOS-style short mode. If the path
17182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17183  # take no chances and rewrite it.
17184  # Note: m4 eats our [], so we need to use [ and ] instead.
17185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17186  if test "x$has_forbidden_chars" != x; then
17187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17191      # Going to short mode and back again did indeed matter. Since short mode is
17192      # case insensitive, let's make it lowercase to improve readability.
17193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17194      # Now convert it back to Unix-stile (cygpath)
17195      input_path=`$CYGPATH -u "$shortmode_path"`
17196      new_path="$input_path"
17197    fi
17198  fi
17199
17200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17201  if test "x$test_cygdrive_prefix" = x; then
17202    # As a simple fix, exclude /usr/bin since it's not a real path.
17203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17205      # a path prefixed by /cygdrive for fixpath to work.
17206      new_path="$CYGWIN_ROOT_PATH$input_path"
17207    fi
17208  fi
17209
17210  # remove trailing .exe if any
17211  new_path="${new_path/%.exe/}"
17212
17213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214
17215  # First separate the path from the arguments. This will split at the first
17216  # space.
17217  complete="$VS_ENV_CMD"
17218  path="${complete%% *}"
17219  tmp="$complete EOL"
17220  arguments="${tmp#* }"
17221
17222  # Input might be given as Windows format, start by converting to
17223  # unix format.
17224  new_path="$path"
17225
17226  windows_path="$new_path"
17227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17228    unix_path=`$CYGPATH -u "$windows_path"`
17229    new_path="$unix_path"
17230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17232    new_path="$unix_path"
17233  fi
17234
17235
17236  # Now try to locate executable using which
17237  new_path=`$WHICH "$new_path" 2> /dev/null`
17238
17239  if test "x$new_path" = x; then
17240    # Oops. Which didn't find the executable.
17241    # The splitting of arguments from the executable at a space might have been incorrect,
17242    # since paths with space are more likely in Windows. Give it another try with the whole
17243    # argument.
17244    path="$complete"
17245    arguments="EOL"
17246    new_path="$path"
17247
17248  windows_path="$new_path"
17249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17250    unix_path=`$CYGPATH -u "$windows_path"`
17251    new_path="$unix_path"
17252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17254    new_path="$unix_path"
17255  fi
17256
17257
17258    new_path=`$WHICH "$new_path" 2> /dev/null`
17259
17260    if test "x$new_path" = x; then
17261      # It's still not found. Now this is an unrecoverable error.
17262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17263$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17264      has_space=`$ECHO "$complete" | $GREP " "`
17265      if test "x$has_space" != x; then
17266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17268      fi
17269      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17270    fi
17271  fi
17272
17273  # Now new_path has a complete unix path to the binary
17274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17275    # Keep paths in /bin as-is, but remove trailing .exe if any
17276    new_path="${new_path/%.exe/}"
17277    # Do not save /bin paths to all_fixpath_prefixes!
17278  else
17279    # Not in mixed or Windows style, start by that.
17280    new_path=`cmd //c echo $new_path`
17281
17282  input_path="$new_path"
17283  # Check if we need to convert this using DOS-style short mode. If the path
17284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17285  # take no chances and rewrite it.
17286  # Note: m4 eats our [], so we need to use [ and ] instead.
17287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17288  if test "x$has_forbidden_chars" != x; then
17289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17291  fi
17292
17293    # Output is in $new_path
17294
17295  windows_path="$new_path"
17296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17297    unix_path=`$CYGPATH -u "$windows_path"`
17298    new_path="$unix_path"
17299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17301    new_path="$unix_path"
17302  fi
17303
17304    # remove trailing .exe if any
17305    new_path="${new_path/%.exe/}"
17306
17307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17309  fi
17310
17311  else
17312    # We're on a posix platform. Hooray! :)
17313    # First separate the path from the arguments. This will split at the first
17314    # space.
17315    complete="$VS_ENV_CMD"
17316    path="${complete%% *}"
17317    tmp="$complete EOL"
17318    arguments="${tmp#* }"
17319
17320    # Cannot rely on the command "which" here since it doesn't always work.
17321    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17322    if test -z "$is_absolute_path"; then
17323      # Path to executable is not absolute. Find it.
17324      IFS_save="$IFS"
17325      IFS=:
17326      for p in $PATH; do
17327        if test -f "$p/$path" && test -x "$p/$path"; then
17328          new_path="$p/$path"
17329          break
17330        fi
17331      done
17332      IFS="$IFS_save"
17333    else
17334      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17335$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17336      new_path="$path"
17337    fi
17338
17339    if test "x$new_path" = x; then
17340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17341$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17342        has_space=`$ECHO "$complete" | $GREP " "`
17343        if test "x$has_space" != x; then
17344          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17345$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17346        fi
17347        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17348      fi
17349  fi
17350
17351      # Now join together the path and the arguments once again
17352      if test "x$arguments" != xEOL; then
17353        new_complete="$new_path ${arguments% *}"
17354      else
17355        new_complete="$new_path"
17356      fi
17357
17358  if test "x$complete" != "x$new_complete"; then
17359      VS_ENV_CMD="$new_complete"
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17361$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17362    fi
17363
17364
17365    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17366    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17367$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17368    cd $OUTPUT_ROOT
17369    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17370    # to autoconf standards.
17371
17372    #----
17373
17374    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17375    # but calculate the difference in Cygwin environment before/after running it and then
17376    # apply the diff.
17377
17378    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17379      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17380      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17381      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17382    else
17383      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17384      _dosbash=`cmd //c echo \`which bash\``
17385    fi
17386
17387    # generate the set of exported vars before/after the vs10 setup
17388    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17389    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17390    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17391    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17392
17393    # Now execute the newly created bat file.
17394    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17395    cmd /c localdevenvtmp.bat | cat
17396
17397    # apply the diff (less some non-vs10 vars named by "!")
17398    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17399    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17400    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17401
17402    # cleanup
17403    $RM localdevenvtmp*
17404    #----
17405    cd $CURDIR
17406    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17408$as_echo "no" >&6; }
17409      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17410$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17411      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17412$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17413      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17414$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17415      as_fn_error $? "Cannot continue" "$LINENO" 5
17416    fi
17417
17418    # Now set all paths and other env variables. This will allow the rest of
17419    # the configure script to find and run the compiler in the proper way.
17420    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17421$as_echo "$as_me: Setting extracted environment variables" >&6;}
17422    . $OUTPUT_ROOT/localdevenv.sh
17423  else
17424    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17425    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17426$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17427  fi
17428
17429  # At this point, we should have corrent variables in the environment, or we can't continue.
17430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17431$as_echo_n "checking for Visual Studio variables... " >&6; }
17432
17433  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17434    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17436$as_echo "present but broken" >&6; }
17437      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17438    else
17439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17440$as_echo "ok" >&6; }
17441      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17442      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17443      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17444      VS_PATH="$PATH"
17445
17446
17447
17448    fi
17449  else
17450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17451$as_echo "not found" >&6; }
17452
17453    if test "x$VS_ENV_CMD" = x; then
17454      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17455$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17456      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17457$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17458    else
17459      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17460$as_echo "$as_me: Running the extraction script failed." >&6;}
17461    fi
17462    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17463$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17464    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17465$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17466    as_fn_error $? "Cannot continue" "$LINENO" 5
17467  fi
17468
17469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17470$as_echo_n "checking for msvcr100.dll... " >&6; }
17471
17472# Check whether --with-msvcr-dll was given.
17473if test "${with_msvcr_dll+set}" = set; then :
17474  withval=$with_msvcr_dll;
17475fi
17476
17477  if test "x$with_msvcr_dll" != x; then
17478    MSVCR_DLL="$with_msvcr_dll"
17479  else
17480    if test "x$VCINSTALLDIR" != x; then
17481      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17482        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17483      else
17484        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17485        if test "x$MSVCR_DLL" = x; then
17486          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17487        fi
17488      fi
17489      if test "x$MSVCR_DLL" != x; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17491$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17492      else
17493        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17494$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17495      fi
17496    fi
17497    # Try some fallback alternatives
17498    if test "x$MSVCR_DLL" = x; then
17499      # If visual studio express is installed, there is usually one with the debugger
17500      if test "x$VS100COMNTOOLS" != x; then
17501        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17502          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17503          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17504$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17505        fi
17506      fi
17507    fi
17508    if test "x$MSVCR_DLL" = x; then
17509      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17510        # Fallback for 32bit builds, look in the windows directory.
17511        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17512          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17513$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17514          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17515        fi
17516      fi
17517    fi
17518  fi
17519  if test "x$MSVCR_DLL" = x; then
17520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17523  fi
17524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17525$as_echo "$MSVCR_DLL" >&6; }
17526
17527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17528
17529  # Input might be given as Windows format, start by converting to
17530  # unix format.
17531  path="$MSVCR_DLL"
17532  new_path=`$CYGPATH -u "$path"`
17533
17534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17537  # "foo.exe" is OK but "foo" is an error.
17538  #
17539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17540  # It is also a way to make sure we got the proper file name for the real test later on.
17541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17542  if test "x$test_shortpath" = x; then
17543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17544$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17545    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17546  fi
17547
17548  # Call helper function which possibly converts this using DOS-style short mode.
17549  # If so, the updated path is stored in $new_path.
17550
17551  input_path="$new_path"
17552  # Check if we need to convert this using DOS-style short mode. If the path
17553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17554  # take no chances and rewrite it.
17555  # Note: m4 eats our [], so we need to use [ and ] instead.
17556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17557  if test "x$has_forbidden_chars" != x; then
17558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17562      # Going to short mode and back again did indeed matter. Since short mode is
17563      # case insensitive, let's make it lowercase to improve readability.
17564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17565      # Now convert it back to Unix-stile (cygpath)
17566      input_path=`$CYGPATH -u "$shortmode_path"`
17567      new_path="$input_path"
17568    fi
17569  fi
17570
17571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17572  if test "x$test_cygdrive_prefix" = x; then
17573    # As a simple fix, exclude /usr/bin since it's not a real path.
17574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17576      # a path prefixed by /cygdrive for fixpath to work.
17577      new_path="$CYGWIN_ROOT_PATH$input_path"
17578    fi
17579  fi
17580
17581
17582  if test "x$path" != "x$new_path"; then
17583    MSVCR_DLL="$new_path"
17584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17585$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17586  fi
17587
17588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17589
17590  path="$MSVCR_DLL"
17591  has_colon=`$ECHO $path | $GREP ^.:`
17592  new_path="$path"
17593  if test "x$has_colon" = x; then
17594    # Not in mixed or Windows style, start by that.
17595    new_path=`cmd //c echo $path`
17596  fi
17597
17598
17599  input_path="$new_path"
17600  # Check if we need to convert this using DOS-style short mode. If the path
17601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17602  # take no chances and rewrite it.
17603  # Note: m4 eats our [], so we need to use [ and ] instead.
17604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17605  if test "x$has_forbidden_chars" != x; then
17606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17608  fi
17609
17610
17611  windows_path="$new_path"
17612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17613    unix_path=`$CYGPATH -u "$windows_path"`
17614    new_path="$unix_path"
17615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17617    new_path="$unix_path"
17618  fi
17619
17620  if test "x$path" != "x$new_path"; then
17621    MSVCR_DLL="$new_path"
17622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17623$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17624  fi
17625
17626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17628
17629  else
17630    # We're on a posix platform. Hooray! :)
17631    path="$MSVCR_DLL"
17632    has_space=`$ECHO "$path" | $GREP " "`
17633    if test "x$has_space" != x; then
17634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17635$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17636      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17637    fi
17638
17639    # Use eval to expand a potential ~
17640    eval path="$path"
17641    if test ! -f "$path" && test ! -d "$path"; then
17642      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17643    fi
17644
17645    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17646  fi
17647
17648
17649
17650
17651# Check whether --with-dxsdk was given.
17652if test "${with_dxsdk+set}" = set; then :
17653  withval=$with_dxsdk;
17654fi
17655
17656
17657# Check whether --with-dxsdk-lib was given.
17658if test "${with_dxsdk_lib+set}" = set; then :
17659  withval=$with_dxsdk_lib;
17660fi
17661
17662
17663# Check whether --with-dxsdk-include was given.
17664if test "${with_dxsdk_include+set}" = set; then :
17665  withval=$with_dxsdk_include;
17666fi
17667
17668
17669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17670$as_echo_n "checking for DirectX SDK... " >&6; }
17671
17672  if test "x$with_dxsdk" != x; then
17673    dxsdk_path="$with_dxsdk"
17674  elif test "x$DXSDK_DIR" != x; then
17675    dxsdk_path="$DXSDK_DIR"
17676  elif test -d "C:/DXSDK"; then
17677    dxsdk_path="C:/DXSDK"
17678  else
17679    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17680  fi
17681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17682$as_echo "$dxsdk_path" >&6; }
17683
17684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17685
17686  # Input might be given as Windows format, start by converting to
17687  # unix format.
17688  path="$dxsdk_path"
17689  new_path=`$CYGPATH -u "$path"`
17690
17691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17694  # "foo.exe" is OK but "foo" is an error.
17695  #
17696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17697  # It is also a way to make sure we got the proper file name for the real test later on.
17698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17699  if test "x$test_shortpath" = x; then
17700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17701$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17702    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17703  fi
17704
17705  # Call helper function which possibly converts this using DOS-style short mode.
17706  # If so, the updated path is stored in $new_path.
17707
17708  input_path="$new_path"
17709  # Check if we need to convert this using DOS-style short mode. If the path
17710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17711  # take no chances and rewrite it.
17712  # Note: m4 eats our [], so we need to use [ and ] instead.
17713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17714  if test "x$has_forbidden_chars" != x; then
17715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17719      # Going to short mode and back again did indeed matter. Since short mode is
17720      # case insensitive, let's make it lowercase to improve readability.
17721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17722      # Now convert it back to Unix-stile (cygpath)
17723      input_path=`$CYGPATH -u "$shortmode_path"`
17724      new_path="$input_path"
17725    fi
17726  fi
17727
17728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17729  if test "x$test_cygdrive_prefix" = x; then
17730    # As a simple fix, exclude /usr/bin since it's not a real path.
17731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17733      # a path prefixed by /cygdrive for fixpath to work.
17734      new_path="$CYGWIN_ROOT_PATH$input_path"
17735    fi
17736  fi
17737
17738
17739  if test "x$path" != "x$new_path"; then
17740    dxsdk_path="$new_path"
17741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17742$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17743  fi
17744
17745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17746
17747  path="$dxsdk_path"
17748  has_colon=`$ECHO $path | $GREP ^.:`
17749  new_path="$path"
17750  if test "x$has_colon" = x; then
17751    # Not in mixed or Windows style, start by that.
17752    new_path=`cmd //c echo $path`
17753  fi
17754
17755
17756  input_path="$new_path"
17757  # Check if we need to convert this using DOS-style short mode. If the path
17758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17759  # take no chances and rewrite it.
17760  # Note: m4 eats our [], so we need to use [ and ] instead.
17761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17762  if test "x$has_forbidden_chars" != x; then
17763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17765  fi
17766
17767
17768  windows_path="$new_path"
17769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17770    unix_path=`$CYGPATH -u "$windows_path"`
17771    new_path="$unix_path"
17772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17774    new_path="$unix_path"
17775  fi
17776
17777  if test "x$path" != "x$new_path"; then
17778    dxsdk_path="$new_path"
17779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17780$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17781  fi
17782
17783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17785
17786  else
17787    # We're on a posix platform. Hooray! :)
17788    path="$dxsdk_path"
17789    has_space=`$ECHO "$path" | $GREP " "`
17790    if test "x$has_space" != x; then
17791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17792$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17793      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17794    fi
17795
17796    # Use eval to expand a potential ~
17797    eval path="$path"
17798    if test ! -f "$path" && test ! -d "$path"; then
17799      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17800    fi
17801
17802    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17803  fi
17804
17805
17806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17807$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17808  if test "x$with_dxsdk_lib" != x; then
17809    DXSDK_LIB_PATH="$with_dxsdk_lib"
17810  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17811    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17812  else
17813    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17814  fi
17815  # dsound.lib is linked to in jsoundds
17816  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17817    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17818  fi
17819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17820$as_echo "$DXSDK_LIB_PATH" >&6; }
17821
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823
17824  # Input might be given as Windows format, start by converting to
17825  # unix format.
17826  path="$DXSDK_LIB_PATH"
17827  new_path=`$CYGPATH -u "$path"`
17828
17829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17832  # "foo.exe" is OK but "foo" is an error.
17833  #
17834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17835  # It is also a way to make sure we got the proper file name for the real test later on.
17836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17837  if test "x$test_shortpath" = x; then
17838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17839$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17840    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17841  fi
17842
17843  # Call helper function which possibly converts this using DOS-style short mode.
17844  # If so, the updated path is stored in $new_path.
17845
17846  input_path="$new_path"
17847  # Check if we need to convert this using DOS-style short mode. If the path
17848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17849  # take no chances and rewrite it.
17850  # Note: m4 eats our [], so we need to use [ and ] instead.
17851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17852  if test "x$has_forbidden_chars" != x; then
17853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17857      # Going to short mode and back again did indeed matter. Since short mode is
17858      # case insensitive, let's make it lowercase to improve readability.
17859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17860      # Now convert it back to Unix-stile (cygpath)
17861      input_path=`$CYGPATH -u "$shortmode_path"`
17862      new_path="$input_path"
17863    fi
17864  fi
17865
17866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17867  if test "x$test_cygdrive_prefix" = x; then
17868    # As a simple fix, exclude /usr/bin since it's not a real path.
17869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17871      # a path prefixed by /cygdrive for fixpath to work.
17872      new_path="$CYGWIN_ROOT_PATH$input_path"
17873    fi
17874  fi
17875
17876
17877  if test "x$path" != "x$new_path"; then
17878    DXSDK_LIB_PATH="$new_path"
17879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17880$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17881  fi
17882
17883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17884
17885  path="$DXSDK_LIB_PATH"
17886  has_colon=`$ECHO $path | $GREP ^.:`
17887  new_path="$path"
17888  if test "x$has_colon" = x; then
17889    # Not in mixed or Windows style, start by that.
17890    new_path=`cmd //c echo $path`
17891  fi
17892
17893
17894  input_path="$new_path"
17895  # Check if we need to convert this using DOS-style short mode. If the path
17896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17897  # take no chances and rewrite it.
17898  # Note: m4 eats our [], so we need to use [ and ] instead.
17899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17900  if test "x$has_forbidden_chars" != x; then
17901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17903  fi
17904
17905
17906  windows_path="$new_path"
17907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17908    unix_path=`$CYGPATH -u "$windows_path"`
17909    new_path="$unix_path"
17910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17912    new_path="$unix_path"
17913  fi
17914
17915  if test "x$path" != "x$new_path"; then
17916    DXSDK_LIB_PATH="$new_path"
17917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17918$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17919  fi
17920
17921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17923
17924  else
17925    # We're on a posix platform. Hooray! :)
17926    path="$DXSDK_LIB_PATH"
17927    has_space=`$ECHO "$path" | $GREP " "`
17928    if test "x$has_space" != x; then
17929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17930$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17932    fi
17933
17934    # Use eval to expand a potential ~
17935    eval path="$path"
17936    if test ! -f "$path" && test ! -d "$path"; then
17937      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17938    fi
17939
17940    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17941  fi
17942
17943
17944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17945$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17946  if test "x$with_dxsdk_include" != x; then
17947    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17948  else
17949    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17950  fi
17951  # dsound.h is included in jsoundds
17952  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17953    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17954  fi
17955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17956$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17957
17958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17959
17960  # Input might be given as Windows format, start by converting to
17961  # unix format.
17962  path="$DXSDK_INCLUDE_PATH"
17963  new_path=`$CYGPATH -u "$path"`
17964
17965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17968  # "foo.exe" is OK but "foo" is an error.
17969  #
17970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17971  # It is also a way to make sure we got the proper file name for the real test later on.
17972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17973  if test "x$test_shortpath" = x; then
17974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17975$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17976    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17977  fi
17978
17979  # Call helper function which possibly converts this using DOS-style short mode.
17980  # If so, the updated path is stored in $new_path.
17981
17982  input_path="$new_path"
17983  # Check if we need to convert this using DOS-style short mode. If the path
17984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17985  # take no chances and rewrite it.
17986  # Note: m4 eats our [], so we need to use [ and ] instead.
17987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17988  if test "x$has_forbidden_chars" != x; then
17989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17993      # Going to short mode and back again did indeed matter. Since short mode is
17994      # case insensitive, let's make it lowercase to improve readability.
17995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17996      # Now convert it back to Unix-stile (cygpath)
17997      input_path=`$CYGPATH -u "$shortmode_path"`
17998      new_path="$input_path"
17999    fi
18000  fi
18001
18002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18003  if test "x$test_cygdrive_prefix" = x; then
18004    # As a simple fix, exclude /usr/bin since it's not a real path.
18005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18007      # a path prefixed by /cygdrive for fixpath to work.
18008      new_path="$CYGWIN_ROOT_PATH$input_path"
18009    fi
18010  fi
18011
18012
18013  if test "x$path" != "x$new_path"; then
18014    DXSDK_INCLUDE_PATH="$new_path"
18015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18016$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18017  fi
18018
18019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18020
18021  path="$DXSDK_INCLUDE_PATH"
18022  has_colon=`$ECHO $path | $GREP ^.:`
18023  new_path="$path"
18024  if test "x$has_colon" = x; then
18025    # Not in mixed or Windows style, start by that.
18026    new_path=`cmd //c echo $path`
18027  fi
18028
18029
18030  input_path="$new_path"
18031  # Check if we need to convert this using DOS-style short mode. If the path
18032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18033  # take no chances and rewrite it.
18034  # Note: m4 eats our [], so we need to use [ and ] instead.
18035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18036  if test "x$has_forbidden_chars" != x; then
18037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18039  fi
18040
18041
18042  windows_path="$new_path"
18043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18044    unix_path=`$CYGPATH -u "$windows_path"`
18045    new_path="$unix_path"
18046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18048    new_path="$unix_path"
18049  fi
18050
18051  if test "x$path" != "x$new_path"; then
18052    DXSDK_INCLUDE_PATH="$new_path"
18053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18054$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18055  fi
18056
18057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18059
18060  else
18061    # We're on a posix platform. Hooray! :)
18062    path="$DXSDK_INCLUDE_PATH"
18063    has_space=`$ECHO "$path" | $GREP " "`
18064    if test "x$has_space" != x; then
18065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18066$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18067      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18068    fi
18069
18070    # Use eval to expand a potential ~
18071    eval path="$path"
18072    if test ! -f "$path" && test ! -d "$path"; then
18073      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18074    fi
18075
18076    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18077  fi
18078
18079
18080
18081
18082  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18083
18084fi
18085
18086
18087
18088# If --build AND --host is set, then the configure script will find any
18089# cross compilation tools in the PATH. Cross compilation tools
18090# follows the cross compilation standard where they are prefixed with ${host}.
18091# For example the binary i686-sun-solaris2.10-gcc
18092# will cross compile for i686-sun-solaris2.10
18093# If neither of build and host is not set, then build=host and the
18094# default compiler found in the path will be used.
18095# Setting only --host, does not seem to be really supported.
18096# Please set both --build and --host if you want to cross compile.
18097
18098if test "x$COMPILE_TYPE" = "xcross"; then
18099    # Now we to find a C/C++ compiler that can build executables for the build
18100    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18101    # once. Also, we need to do this before adding a tools dir to the path,
18102    # otherwise we might pick up cross-compilers which don't use standard naming.
18103    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18104    # to wait until they are properly discovered.
18105    for ac_prog in cl cc gcc
18106do
18107  # Extract the first word of "$ac_prog", so it can be a program name with args.
18108set dummy $ac_prog; ac_word=$2
18109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18110$as_echo_n "checking for $ac_word... " >&6; }
18111if test "${ac_cv_path_BUILD_CC+set}" = set; then :
18112  $as_echo_n "(cached) " >&6
18113else
18114  case $BUILD_CC in
18115  [\\/]* | ?:[\\/]*)
18116  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18117  ;;
18118  *)
18119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18120for as_dir in $PATH
18121do
18122  IFS=$as_save_IFS
18123  test -z "$as_dir" && as_dir=.
18124    for ac_exec_ext in '' $ac_executable_extensions; do
18125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18126    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18128    break 2
18129  fi
18130done
18131  done
18132IFS=$as_save_IFS
18133
18134  ;;
18135esac
18136fi
18137BUILD_CC=$ac_cv_path_BUILD_CC
18138if test -n "$BUILD_CC"; then
18139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18140$as_echo "$BUILD_CC" >&6; }
18141else
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18143$as_echo "no" >&6; }
18144fi
18145
18146
18147  test -n "$BUILD_CC" && break
18148done
18149
18150
18151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18152
18153  # First separate the path from the arguments. This will split at the first
18154  # space.
18155  complete="$BUILD_CC"
18156  path="${complete%% *}"
18157  tmp="$complete EOL"
18158  arguments="${tmp#* }"
18159
18160  # Input might be given as Windows format, start by converting to
18161  # unix format.
18162  new_path=`$CYGPATH -u "$path"`
18163
18164  # Now try to locate executable using which
18165  new_path=`$WHICH "$new_path" 2> /dev/null`
18166  # bat and cmd files are not always considered executable in cygwin causing which
18167  # to not find them
18168  if test "x$new_path" = x \
18169           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18170           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18171    new_path=`$CYGPATH -u "$path"`
18172  fi
18173  if test "x$new_path" = x; then
18174    # Oops. Which didn't find the executable.
18175    # The splitting of arguments from the executable at a space might have been incorrect,
18176    # since paths with space are more likely in Windows. Give it another try with the whole
18177    # argument.
18178    path="$complete"
18179    arguments="EOL"
18180    new_path=`$CYGPATH -u "$path"`
18181    new_path=`$WHICH "$new_path" 2> /dev/null`
18182    # bat and cmd files are not always considered executable in cygwin causing which
18183    # to not find them
18184    if test "x$new_path" = x \
18185             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18186             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18187      new_path=`$CYGPATH -u "$path"`
18188    fi
18189    if test "x$new_path" = x; then
18190      # It's still not found. Now this is an unrecoverable error.
18191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18192$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18193      has_space=`$ECHO "$complete" | $GREP " "`
18194      if test "x$has_space" != x; then
18195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18197      fi
18198      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18199    fi
18200  fi
18201
18202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18205  # "foo.exe" is OK but "foo" is an error.
18206  #
18207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18208  # It is also a way to make sure we got the proper file name for the real test later on.
18209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18210  if test "x$test_shortpath" = x; then
18211    # Short path failed, file does not exist as specified.
18212    # Try adding .exe or .cmd
18213    if test -f "${new_path}.exe"; then
18214       input_to_shortpath="${new_path}.exe"
18215    elif test -f "${new_path}.cmd"; then
18216       input_to_shortpath="${new_path}.cmd"
18217    else
18218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18219$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18222      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18223    fi
18224  else
18225    input_to_shortpath="$new_path"
18226  fi
18227
18228  # Call helper function which possibly converts this using DOS-style short mode.
18229  # If so, the updated path is stored in $new_path.
18230  new_path="$input_to_shortpath"
18231
18232  input_path="$input_to_shortpath"
18233  # Check if we need to convert this using DOS-style short mode. If the path
18234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18235  # take no chances and rewrite it.
18236  # Note: m4 eats our [], so we need to use [ and ] instead.
18237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18238  if test "x$has_forbidden_chars" != x; then
18239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18243      # Going to short mode and back again did indeed matter. Since short mode is
18244      # case insensitive, let's make it lowercase to improve readability.
18245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18246      # Now convert it back to Unix-stile (cygpath)
18247      input_path=`$CYGPATH -u "$shortmode_path"`
18248      new_path="$input_path"
18249    fi
18250  fi
18251
18252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18253  if test "x$test_cygdrive_prefix" = x; then
18254    # As a simple fix, exclude /usr/bin since it's not a real path.
18255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18257      # a path prefixed by /cygdrive for fixpath to work.
18258      new_path="$CYGWIN_ROOT_PATH$input_path"
18259    fi
18260  fi
18261
18262  # remove trailing .exe if any
18263  new_path="${new_path/%.exe/}"
18264
18265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18266
18267  # First separate the path from the arguments. This will split at the first
18268  # space.
18269  complete="$BUILD_CC"
18270  path="${complete%% *}"
18271  tmp="$complete EOL"
18272  arguments="${tmp#* }"
18273
18274  # Input might be given as Windows format, start by converting to
18275  # unix format.
18276  new_path="$path"
18277
18278  windows_path="$new_path"
18279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18280    unix_path=`$CYGPATH -u "$windows_path"`
18281    new_path="$unix_path"
18282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18284    new_path="$unix_path"
18285  fi
18286
18287
18288  # Now try to locate executable using which
18289  new_path=`$WHICH "$new_path" 2> /dev/null`
18290
18291  if test "x$new_path" = x; then
18292    # Oops. Which didn't find the executable.
18293    # The splitting of arguments from the executable at a space might have been incorrect,
18294    # since paths with space are more likely in Windows. Give it another try with the whole
18295    # argument.
18296    path="$complete"
18297    arguments="EOL"
18298    new_path="$path"
18299
18300  windows_path="$new_path"
18301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18302    unix_path=`$CYGPATH -u "$windows_path"`
18303    new_path="$unix_path"
18304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18306    new_path="$unix_path"
18307  fi
18308
18309
18310    new_path=`$WHICH "$new_path" 2> /dev/null`
18311
18312    if test "x$new_path" = x; then
18313      # It's still not found. Now this is an unrecoverable error.
18314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18315$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18316      has_space=`$ECHO "$complete" | $GREP " "`
18317      if test "x$has_space" != x; then
18318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18320      fi
18321      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18322    fi
18323  fi
18324
18325  # Now new_path has a complete unix path to the binary
18326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18327    # Keep paths in /bin as-is, but remove trailing .exe if any
18328    new_path="${new_path/%.exe/}"
18329    # Do not save /bin paths to all_fixpath_prefixes!
18330  else
18331    # Not in mixed or Windows style, start by that.
18332    new_path=`cmd //c echo $new_path`
18333
18334  input_path="$new_path"
18335  # Check if we need to convert this using DOS-style short mode. If the path
18336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18337  # take no chances and rewrite it.
18338  # Note: m4 eats our [], so we need to use [ and ] instead.
18339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18340  if test "x$has_forbidden_chars" != x; then
18341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18343  fi
18344
18345    # Output is in $new_path
18346
18347  windows_path="$new_path"
18348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18349    unix_path=`$CYGPATH -u "$windows_path"`
18350    new_path="$unix_path"
18351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18353    new_path="$unix_path"
18354  fi
18355
18356    # remove trailing .exe if any
18357    new_path="${new_path/%.exe/}"
18358
18359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18361  fi
18362
18363  else
18364    # We're on a posix platform. Hooray! :)
18365    # First separate the path from the arguments. This will split at the first
18366    # space.
18367    complete="$BUILD_CC"
18368    path="${complete%% *}"
18369    tmp="$complete EOL"
18370    arguments="${tmp#* }"
18371
18372    # Cannot rely on the command "which" here since it doesn't always work.
18373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18374    if test -z "$is_absolute_path"; then
18375      # Path to executable is not absolute. Find it.
18376      IFS_save="$IFS"
18377      IFS=:
18378      for p in $PATH; do
18379        if test -f "$p/$path" && test -x "$p/$path"; then
18380          new_path="$p/$path"
18381          break
18382        fi
18383      done
18384      IFS="$IFS_save"
18385    else
18386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18387$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18388      new_path="$path"
18389    fi
18390
18391    if test "x$new_path" = x; then
18392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18393$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18394        has_space=`$ECHO "$complete" | $GREP " "`
18395        if test "x$has_space" != x; then
18396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18398        fi
18399        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18400      fi
18401  fi
18402
18403      # Now join together the path and the arguments once again
18404      if test "x$arguments" != xEOL; then
18405        new_complete="$new_path ${arguments% *}"
18406      else
18407        new_complete="$new_path"
18408      fi
18409
18410  if test "x$complete" != "x$new_complete"; then
18411      BUILD_CC="$new_complete"
18412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18413$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18414    fi
18415
18416    for ac_prog in cl CC g++
18417do
18418  # Extract the first word of "$ac_prog", so it can be a program name with args.
18419set dummy $ac_prog; ac_word=$2
18420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18421$as_echo_n "checking for $ac_word... " >&6; }
18422if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18423  $as_echo_n "(cached) " >&6
18424else
18425  case $BUILD_CXX in
18426  [\\/]* | ?:[\\/]*)
18427  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18428  ;;
18429  *)
18430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18431for as_dir in $PATH
18432do
18433  IFS=$as_save_IFS
18434  test -z "$as_dir" && as_dir=.
18435    for ac_exec_ext in '' $ac_executable_extensions; do
18436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18437    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18439    break 2
18440  fi
18441done
18442  done
18443IFS=$as_save_IFS
18444
18445  ;;
18446esac
18447fi
18448BUILD_CXX=$ac_cv_path_BUILD_CXX
18449if test -n "$BUILD_CXX"; then
18450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18451$as_echo "$BUILD_CXX" >&6; }
18452else
18453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18454$as_echo "no" >&6; }
18455fi
18456
18457
18458  test -n "$BUILD_CXX" && break
18459done
18460
18461
18462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18463
18464  # First separate the path from the arguments. This will split at the first
18465  # space.
18466  complete="$BUILD_CXX"
18467  path="${complete%% *}"
18468  tmp="$complete EOL"
18469  arguments="${tmp#* }"
18470
18471  # Input might be given as Windows format, start by converting to
18472  # unix format.
18473  new_path=`$CYGPATH -u "$path"`
18474
18475  # Now try to locate executable using which
18476  new_path=`$WHICH "$new_path" 2> /dev/null`
18477  # bat and cmd files are not always considered executable in cygwin causing which
18478  # to not find them
18479  if test "x$new_path" = x \
18480           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18481           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18482    new_path=`$CYGPATH -u "$path"`
18483  fi
18484  if test "x$new_path" = x; then
18485    # Oops. Which didn't find the executable.
18486    # The splitting of arguments from the executable at a space might have been incorrect,
18487    # since paths with space are more likely in Windows. Give it another try with the whole
18488    # argument.
18489    path="$complete"
18490    arguments="EOL"
18491    new_path=`$CYGPATH -u "$path"`
18492    new_path=`$WHICH "$new_path" 2> /dev/null`
18493    # bat and cmd files are not always considered executable in cygwin causing which
18494    # to not find them
18495    if test "x$new_path" = x \
18496             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18497             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18498      new_path=`$CYGPATH -u "$path"`
18499    fi
18500    if test "x$new_path" = x; then
18501      # It's still not found. Now this is an unrecoverable error.
18502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18503$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18504      has_space=`$ECHO "$complete" | $GREP " "`
18505      if test "x$has_space" != x; then
18506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18508      fi
18509      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18510    fi
18511  fi
18512
18513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18516  # "foo.exe" is OK but "foo" is an error.
18517  #
18518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18519  # It is also a way to make sure we got the proper file name for the real test later on.
18520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18521  if test "x$test_shortpath" = x; then
18522    # Short path failed, file does not exist as specified.
18523    # Try adding .exe or .cmd
18524    if test -f "${new_path}.exe"; then
18525       input_to_shortpath="${new_path}.exe"
18526    elif test -f "${new_path}.cmd"; then
18527       input_to_shortpath="${new_path}.cmd"
18528    else
18529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18530$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18533      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18534    fi
18535  else
18536    input_to_shortpath="$new_path"
18537  fi
18538
18539  # Call helper function which possibly converts this using DOS-style short mode.
18540  # If so, the updated path is stored in $new_path.
18541  new_path="$input_to_shortpath"
18542
18543  input_path="$input_to_shortpath"
18544  # Check if we need to convert this using DOS-style short mode. If the path
18545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18546  # take no chances and rewrite it.
18547  # Note: m4 eats our [], so we need to use [ and ] instead.
18548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18549  if test "x$has_forbidden_chars" != x; then
18550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18554      # Going to short mode and back again did indeed matter. Since short mode is
18555      # case insensitive, let's make it lowercase to improve readability.
18556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18557      # Now convert it back to Unix-stile (cygpath)
18558      input_path=`$CYGPATH -u "$shortmode_path"`
18559      new_path="$input_path"
18560    fi
18561  fi
18562
18563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18564  if test "x$test_cygdrive_prefix" = x; then
18565    # As a simple fix, exclude /usr/bin since it's not a real path.
18566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18568      # a path prefixed by /cygdrive for fixpath to work.
18569      new_path="$CYGWIN_ROOT_PATH$input_path"
18570    fi
18571  fi
18572
18573  # remove trailing .exe if any
18574  new_path="${new_path/%.exe/}"
18575
18576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18577
18578  # First separate the path from the arguments. This will split at the first
18579  # space.
18580  complete="$BUILD_CXX"
18581  path="${complete%% *}"
18582  tmp="$complete EOL"
18583  arguments="${tmp#* }"
18584
18585  # Input might be given as Windows format, start by converting to
18586  # unix format.
18587  new_path="$path"
18588
18589  windows_path="$new_path"
18590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18591    unix_path=`$CYGPATH -u "$windows_path"`
18592    new_path="$unix_path"
18593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18595    new_path="$unix_path"
18596  fi
18597
18598
18599  # Now try to locate executable using which
18600  new_path=`$WHICH "$new_path" 2> /dev/null`
18601
18602  if test "x$new_path" = x; then
18603    # Oops. Which didn't find the executable.
18604    # The splitting of arguments from the executable at a space might have been incorrect,
18605    # since paths with space are more likely in Windows. Give it another try with the whole
18606    # argument.
18607    path="$complete"
18608    arguments="EOL"
18609    new_path="$path"
18610
18611  windows_path="$new_path"
18612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613    unix_path=`$CYGPATH -u "$windows_path"`
18614    new_path="$unix_path"
18615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18617    new_path="$unix_path"
18618  fi
18619
18620
18621    new_path=`$WHICH "$new_path" 2> /dev/null`
18622
18623    if test "x$new_path" = x; then
18624      # It's still not found. Now this is an unrecoverable error.
18625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18626$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18627      has_space=`$ECHO "$complete" | $GREP " "`
18628      if test "x$has_space" != x; then
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18631      fi
18632      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18633    fi
18634  fi
18635
18636  # Now new_path has a complete unix path to the binary
18637  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18638    # Keep paths in /bin as-is, but remove trailing .exe if any
18639    new_path="${new_path/%.exe/}"
18640    # Do not save /bin paths to all_fixpath_prefixes!
18641  else
18642    # Not in mixed or Windows style, start by that.
18643    new_path=`cmd //c echo $new_path`
18644
18645  input_path="$new_path"
18646  # Check if we need to convert this using DOS-style short mode. If the path
18647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18648  # take no chances and rewrite it.
18649  # Note: m4 eats our [], so we need to use [ and ] instead.
18650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18651  if test "x$has_forbidden_chars" != x; then
18652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18654  fi
18655
18656    # Output is in $new_path
18657
18658  windows_path="$new_path"
18659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18660    unix_path=`$CYGPATH -u "$windows_path"`
18661    new_path="$unix_path"
18662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18664    new_path="$unix_path"
18665  fi
18666
18667    # remove trailing .exe if any
18668    new_path="${new_path/%.exe/}"
18669
18670    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18671    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18672  fi
18673
18674  else
18675    # We're on a posix platform. Hooray! :)
18676    # First separate the path from the arguments. This will split at the first
18677    # space.
18678    complete="$BUILD_CXX"
18679    path="${complete%% *}"
18680    tmp="$complete EOL"
18681    arguments="${tmp#* }"
18682
18683    # Cannot rely on the command "which" here since it doesn't always work.
18684    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18685    if test -z "$is_absolute_path"; then
18686      # Path to executable is not absolute. Find it.
18687      IFS_save="$IFS"
18688      IFS=:
18689      for p in $PATH; do
18690        if test -f "$p/$path" && test -x "$p/$path"; then
18691          new_path="$p/$path"
18692          break
18693        fi
18694      done
18695      IFS="$IFS_save"
18696    else
18697      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18698$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18699      new_path="$path"
18700    fi
18701
18702    if test "x$new_path" = x; then
18703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18704$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18705        has_space=`$ECHO "$complete" | $GREP " "`
18706        if test "x$has_space" != x; then
18707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18709        fi
18710        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18711      fi
18712  fi
18713
18714      # Now join together the path and the arguments once again
18715      if test "x$arguments" != xEOL; then
18716        new_complete="$new_path ${arguments% *}"
18717      else
18718        new_complete="$new_path"
18719      fi
18720
18721  if test "x$complete" != "x$new_complete"; then
18722      BUILD_CXX="$new_complete"
18723      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18724$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18725    fi
18726
18727    # Extract the first word of "ld", so it can be a program name with args.
18728set dummy ld; ac_word=$2
18729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18730$as_echo_n "checking for $ac_word... " >&6; }
18731if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18732  $as_echo_n "(cached) " >&6
18733else
18734  case $BUILD_LD in
18735  [\\/]* | ?:[\\/]*)
18736  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18737  ;;
18738  *)
18739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18740for as_dir in $PATH
18741do
18742  IFS=$as_save_IFS
18743  test -z "$as_dir" && as_dir=.
18744    for ac_exec_ext in '' $ac_executable_extensions; do
18745  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18746    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18748    break 2
18749  fi
18750done
18751  done
18752IFS=$as_save_IFS
18753
18754  ;;
18755esac
18756fi
18757BUILD_LD=$ac_cv_path_BUILD_LD
18758if test -n "$BUILD_LD"; then
18759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18760$as_echo "$BUILD_LD" >&6; }
18761else
18762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18763$as_echo "no" >&6; }
18764fi
18765
18766
18767
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769
18770  # First separate the path from the arguments. This will split at the first
18771  # space.
18772  complete="$BUILD_LD"
18773  path="${complete%% *}"
18774  tmp="$complete EOL"
18775  arguments="${tmp#* }"
18776
18777  # Input might be given as Windows format, start by converting to
18778  # unix format.
18779  new_path=`$CYGPATH -u "$path"`
18780
18781  # Now try to locate executable using which
18782  new_path=`$WHICH "$new_path" 2> /dev/null`
18783  # bat and cmd files are not always considered executable in cygwin causing which
18784  # to not find them
18785  if test "x$new_path" = x \
18786           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18787           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18788    new_path=`$CYGPATH -u "$path"`
18789  fi
18790  if test "x$new_path" = x; then
18791    # Oops. Which didn't find the executable.
18792    # The splitting of arguments from the executable at a space might have been incorrect,
18793    # since paths with space are more likely in Windows. Give it another try with the whole
18794    # argument.
18795    path="$complete"
18796    arguments="EOL"
18797    new_path=`$CYGPATH -u "$path"`
18798    new_path=`$WHICH "$new_path" 2> /dev/null`
18799    # bat and cmd files are not always considered executable in cygwin causing which
18800    # to not find them
18801    if test "x$new_path" = x \
18802             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18803             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18804      new_path=`$CYGPATH -u "$path"`
18805    fi
18806    if test "x$new_path" = x; then
18807      # It's still not found. Now this is an unrecoverable error.
18808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18809$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18810      has_space=`$ECHO "$complete" | $GREP " "`
18811      if test "x$has_space" != x; then
18812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18814      fi
18815      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18816    fi
18817  fi
18818
18819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18822  # "foo.exe" is OK but "foo" is an error.
18823  #
18824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18825  # It is also a way to make sure we got the proper file name for the real test later on.
18826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18827  if test "x$test_shortpath" = x; then
18828    # Short path failed, file does not exist as specified.
18829    # Try adding .exe or .cmd
18830    if test -f "${new_path}.exe"; then
18831       input_to_shortpath="${new_path}.exe"
18832    elif test -f "${new_path}.cmd"; then
18833       input_to_shortpath="${new_path}.cmd"
18834    else
18835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18836$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18839      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18840    fi
18841  else
18842    input_to_shortpath="$new_path"
18843  fi
18844
18845  # Call helper function which possibly converts this using DOS-style short mode.
18846  # If so, the updated path is stored in $new_path.
18847  new_path="$input_to_shortpath"
18848
18849  input_path="$input_to_shortpath"
18850  # Check if we need to convert this using DOS-style short mode. If the path
18851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18852  # take no chances and rewrite it.
18853  # Note: m4 eats our [], so we need to use [ and ] instead.
18854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18855  if test "x$has_forbidden_chars" != x; then
18856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18860      # Going to short mode and back again did indeed matter. Since short mode is
18861      # case insensitive, let's make it lowercase to improve readability.
18862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18863      # Now convert it back to Unix-stile (cygpath)
18864      input_path=`$CYGPATH -u "$shortmode_path"`
18865      new_path="$input_path"
18866    fi
18867  fi
18868
18869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18870  if test "x$test_cygdrive_prefix" = x; then
18871    # As a simple fix, exclude /usr/bin since it's not a real path.
18872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18874      # a path prefixed by /cygdrive for fixpath to work.
18875      new_path="$CYGWIN_ROOT_PATH$input_path"
18876    fi
18877  fi
18878
18879  # remove trailing .exe if any
18880  new_path="${new_path/%.exe/}"
18881
18882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18883
18884  # First separate the path from the arguments. This will split at the first
18885  # space.
18886  complete="$BUILD_LD"
18887  path="${complete%% *}"
18888  tmp="$complete EOL"
18889  arguments="${tmp#* }"
18890
18891  # Input might be given as Windows format, start by converting to
18892  # unix format.
18893  new_path="$path"
18894
18895  windows_path="$new_path"
18896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18897    unix_path=`$CYGPATH -u "$windows_path"`
18898    new_path="$unix_path"
18899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18901    new_path="$unix_path"
18902  fi
18903
18904
18905  # Now try to locate executable using which
18906  new_path=`$WHICH "$new_path" 2> /dev/null`
18907
18908  if test "x$new_path" = x; then
18909    # Oops. Which didn't find the executable.
18910    # The splitting of arguments from the executable at a space might have been incorrect,
18911    # since paths with space are more likely in Windows. Give it another try with the whole
18912    # argument.
18913    path="$complete"
18914    arguments="EOL"
18915    new_path="$path"
18916
18917  windows_path="$new_path"
18918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18919    unix_path=`$CYGPATH -u "$windows_path"`
18920    new_path="$unix_path"
18921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18923    new_path="$unix_path"
18924  fi
18925
18926
18927    new_path=`$WHICH "$new_path" 2> /dev/null`
18928
18929    if test "x$new_path" = x; then
18930      # It's still not found. Now this is an unrecoverable error.
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18932$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18933      has_space=`$ECHO "$complete" | $GREP " "`
18934      if test "x$has_space" != x; then
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18937      fi
18938      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18939    fi
18940  fi
18941
18942  # Now new_path has a complete unix path to the binary
18943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18944    # Keep paths in /bin as-is, but remove trailing .exe if any
18945    new_path="${new_path/%.exe/}"
18946    # Do not save /bin paths to all_fixpath_prefixes!
18947  else
18948    # Not in mixed or Windows style, start by that.
18949    new_path=`cmd //c echo $new_path`
18950
18951  input_path="$new_path"
18952  # Check if we need to convert this using DOS-style short mode. If the path
18953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18954  # take no chances and rewrite it.
18955  # Note: m4 eats our [], so we need to use [ and ] instead.
18956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18957  if test "x$has_forbidden_chars" != x; then
18958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18960  fi
18961
18962    # Output is in $new_path
18963
18964  windows_path="$new_path"
18965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966    unix_path=`$CYGPATH -u "$windows_path"`
18967    new_path="$unix_path"
18968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18970    new_path="$unix_path"
18971  fi
18972
18973    # remove trailing .exe if any
18974    new_path="${new_path/%.exe/}"
18975
18976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18978  fi
18979
18980  else
18981    # We're on a posix platform. Hooray! :)
18982    # First separate the path from the arguments. This will split at the first
18983    # space.
18984    complete="$BUILD_LD"
18985    path="${complete%% *}"
18986    tmp="$complete EOL"
18987    arguments="${tmp#* }"
18988
18989    # Cannot rely on the command "which" here since it doesn't always work.
18990    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18991    if test -z "$is_absolute_path"; then
18992      # Path to executable is not absolute. Find it.
18993      IFS_save="$IFS"
18994      IFS=:
18995      for p in $PATH; do
18996        if test -f "$p/$path" && test -x "$p/$path"; then
18997          new_path="$p/$path"
18998          break
18999        fi
19000      done
19001      IFS="$IFS_save"
19002    else
19003      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19004$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19005      new_path="$path"
19006    fi
19007
19008    if test "x$new_path" = x; then
19009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19010$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19011        has_space=`$ECHO "$complete" | $GREP " "`
19012        if test "x$has_space" != x; then
19013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19015        fi
19016        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19017      fi
19018  fi
19019
19020      # Now join together the path and the arguments once again
19021      if test "x$arguments" != xEOL; then
19022        new_complete="$new_path ${arguments% *}"
19023      else
19024        new_complete="$new_path"
19025      fi
19026
19027  if test "x$complete" != "x$new_complete"; then
19028      BUILD_LD="$new_complete"
19029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19030$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19031    fi
19032
19033fi
19034
19035
19036
19037
19038# If a devkit is found on the builddeps server, then prepend its path to the
19039# PATH variable. If there are cross compilers available in the devkit, these
19040# will be found by AC_PROG_CC et al.
19041DEVKIT=
19042
19043
19044    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19045        # Source the builddeps file again, to make sure it uses the latest variables!
19046        . $builddepsfile
19047        # Look for a target and build machine specific resource!
19048        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19049        if test "x$resource" = x; then
19050            # Ok, lets instead look for a target specific resource
19051            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19052        fi
19053        if test "x$resource" = x; then
19054            # Ok, lets instead look for a build specific resource
19055            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19056        fi
19057        if test "x$resource" = x; then
19058            # Ok, lets instead look for a generic resource
19059            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19060            resource=${builddep_devkit}
19061        fi
19062        if test "x$resource" != x; then
19063            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19064$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19065	    # If the resource in the builddeps.conf file is an existing directory,
19066	    # for example /java/linux/cups
19067	    if test -d ${resource}; then
19068	       depdir=${resource}
19069	    else
19070
19071# devkit is for example mymodule
19072# $resource is for example libs/general/libmymod_1_2_3.zip
19073# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19074# $with_builddeps_dir is for example /localhome/builddeps
19075# depdir is the name of the variable into which we store the depdir, eg MYMOD
19076# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19077# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19078    filename=`basename $resource`
19079    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19080    filebase=${filename%%.*}
19081    extension=${filename#*.}
19082    installdir=$with_builddeps_dir/$filebase
19083    if test ! -f $installdir/$filename.unpacked; then
19084        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19085$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19086        if test ! -d $installdir; then
19087            mkdir -p $installdir
19088        fi
19089        if test ! -d $installdir; then
19090            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19091        fi
19092        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19093        touch $tmpfile
19094        if test ! -f $tmpfile; then
19095            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19096        fi
19097
19098    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19099    # $tmpfile is the local file name for the downloaded file.
19100    VALID_TOOL=no
19101    if test "x$BDEPS_FTP" = xwget; then
19102       VALID_TOOL=yes
19103       wget -O $tmpfile $with_builddeps_server/$resource
19104    fi
19105    if test "x$BDEPS_FTP" = xlftp; then
19106       VALID_TOOL=yes
19107       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19108    fi
19109    if test "x$BDEPS_FTP" = xftp; then
19110        VALID_TOOL=yes
19111        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19112        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19113        FTPUSERPWD=${FTPSERVER%%@*}
19114        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19115            FTPUSER=${userpwd%%:*}
19116            FTPPWD=${userpwd#*@}
19117            FTPSERVER=${FTPSERVER#*@}
19118        else
19119            FTPUSER=ftp
19120            FTPPWD=ftp
19121        fi
19122        # the "pass" command does not work on some
19123        # ftp clients (read ftp.exe) but if it works,
19124        # passive mode is better!
19125        (\
19126            echo "user $FTPUSER $FTPPWD"        ;\
19127            echo "pass"                         ;\
19128            echo "bin"                          ;\
19129            echo "get $FTPPATH $tmpfile"              ;\
19130        ) | ftp -in $FTPSERVER
19131    fi
19132    if test "x$VALID_TOOL" != xyes; then
19133       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19134    fi
19135
19136        mv $tmpfile $installdir/$filename
19137        if test ! -s $installdir/$filename; then
19138            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19139        fi
19140        case "$extension" in
19141            zip)  echo "Unzipping $installdir/$filename..."
19142               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19143            ;;
19144            tar.gz) echo "Untaring $installdir/$filename..."
19145               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19146            ;;
19147            tgz) echo "Untaring $installdir/$filename..."
19148               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19149            ;;
19150            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19151            ;;
19152        esac
19153    fi
19154    if test -f $installdir/$filename.unpacked; then
19155        depdir=$installdir
19156    fi
19157
19158	    fi
19159            # Source the builddeps file again, because in the previous command, the depdir
19160            # was updated to point at the current build dependency install directory.
19161            . $builddepsfile
19162            # Now extract variables from the builddeps.conf files.
19163            theroot=${builddep_devkit_ROOT}
19164            thecflags=${builddep_devkit_CFLAGS}
19165            thelibs=${builddep_devkit_LIBS}
19166            if test "x$depdir" = x; then
19167                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19168            fi
19169            DEVKIT=$depdir
19170            if test "x$theroot" != x; then
19171               DEVKIT="$theroot"
19172            fi
19173            if test "x$thecflags" != x; then
19174               DEVKIT_CFLAGS="$thecflags"
19175            fi
19176            if test "x$thelibs" != x; then
19177               DEVKIT_LIBS="$thelibs"
19178            fi
19179            # Found devkit
19180                     PATH="$DEVKIT/bin:$PATH"
19181                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19182                     if test "x$x_includes" = "xNONE"; then
19183                         x_includes="$SYS_ROOT/usr/include/X11"
19184                     fi
19185                     if test "x$x_libraries" = "xNONE"; then
19186                         x_libraries="$SYS_ROOT/usr/lib"
19187                     fi
19188
19189
19190        fi
19191
19192    fi
19193
19194
19195# Store the CFLAGS etal passed to the configure script.
19196ORG_CFLAGS="$CFLAGS"
19197ORG_CXXFLAGS="$CXXFLAGS"
19198ORG_OBJCFLAGS="$OBJCFLAGS"
19199
19200# autoconf magic only relies on PATH, so update it if tools dir is specified
19201OLD_PATH="$PATH"
19202if test "x$TOOLS_DIR" != x; then
19203  PATH=$TOOLS_DIR:$PATH
19204fi
19205
19206
19207### Locate C compiler (CC)
19208
19209# On windows, only cl.exe is supported.
19210# On Solaris, cc is preferred to gcc.
19211# Elsewhere, gcc is preferred to cc.
19212
19213if test "x$CC" != x; then
19214  COMPILER_CHECK_LIST="$CC"
19215elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19216  COMPILER_CHECK_LIST="cl"
19217elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19218  COMPILER_CHECK_LIST="cc gcc"
19219else
19220  COMPILER_CHECK_LIST="gcc cc"
19221fi
19222
19223
19224  COMPILER_NAME=C
19225
19226  CC=
19227  # If TOOLS_DIR is set, check for all compiler names in there first
19228  # before checking the rest of the PATH.
19229  if test -n "$TOOLS_DIR"; then
19230    PATH_save="$PATH"
19231    PATH="$TOOLS_DIR"
19232    for ac_prog in $COMPILER_CHECK_LIST
19233do
19234  # Extract the first word of "$ac_prog", so it can be a program name with args.
19235set dummy $ac_prog; ac_word=$2
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19237$as_echo_n "checking for $ac_word... " >&6; }
19238if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19239  $as_echo_n "(cached) " >&6
19240else
19241  case $TOOLS_DIR_CC in
19242  [\\/]* | ?:[\\/]*)
19243  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19244  ;;
19245  *)
19246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19247for as_dir in $PATH
19248do
19249  IFS=$as_save_IFS
19250  test -z "$as_dir" && as_dir=.
19251    for ac_exec_ext in '' $ac_executable_extensions; do
19252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19253    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19255    break 2
19256  fi
19257done
19258  done
19259IFS=$as_save_IFS
19260
19261  ;;
19262esac
19263fi
19264TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19265if test -n "$TOOLS_DIR_CC"; then
19266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19267$as_echo "$TOOLS_DIR_CC" >&6; }
19268else
19269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19270$as_echo "no" >&6; }
19271fi
19272
19273
19274  test -n "$TOOLS_DIR_CC" && break
19275done
19276
19277    CC=$TOOLS_DIR_CC
19278    PATH="$PATH_save"
19279  fi
19280
19281  # AC_PATH_PROGS can't be run multiple times with the same variable,
19282  # so create a new name for this run.
19283  if test "x$CC" = x; then
19284    for ac_prog in $COMPILER_CHECK_LIST
19285do
19286  # Extract the first word of "$ac_prog", so it can be a program name with args.
19287set dummy $ac_prog; ac_word=$2
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289$as_echo_n "checking for $ac_word... " >&6; }
19290if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19291  $as_echo_n "(cached) " >&6
19292else
19293  case $POTENTIAL_CC in
19294  [\\/]* | ?:[\\/]*)
19295  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19296  ;;
19297  *)
19298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299for as_dir in $PATH
19300do
19301  IFS=$as_save_IFS
19302  test -z "$as_dir" && as_dir=.
19303    for ac_exec_ext in '' $ac_executable_extensions; do
19304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19305    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307    break 2
19308  fi
19309done
19310  done
19311IFS=$as_save_IFS
19312
19313  ;;
19314esac
19315fi
19316POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19317if test -n "$POTENTIAL_CC"; then
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19319$as_echo "$POTENTIAL_CC" >&6; }
19320else
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19322$as_echo "no" >&6; }
19323fi
19324
19325
19326  test -n "$POTENTIAL_CC" && break
19327done
19328
19329    CC=$POTENTIAL_CC
19330  fi
19331
19332  if test "x$CC" = x; then
19333
19334    # Print a helpful message on how to acquire the necessary build dependency.
19335    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19336    MISSING_DEPENDENCY=devkit
19337    PKGHANDLER_COMMAND=
19338
19339    case $PKGHANDLER in
19340	apt-get)
19341                apt_help     $MISSING_DEPENDENCY ;;
19342    yum)
19343                yum_help     $MISSING_DEPENDENCY ;;
19344	port)
19345                port_help    $MISSING_DEPENDENCY ;;
19346	pkgutil)
19347                pkgutil_help $MISSING_DEPENDENCY ;;
19348	pkgadd)
19349                pkgadd_help  $MISSING_DEPENDENCY ;;
19350    * )
19351      break ;;
19352    esac
19353
19354    if test "x$PKGHANDLER_COMMAND" != x; then
19355        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19356    fi
19357
19358      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19359  fi
19360
19361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19362
19363  # First separate the path from the arguments. This will split at the first
19364  # space.
19365  complete="$CC"
19366  path="${complete%% *}"
19367  tmp="$complete EOL"
19368  arguments="${tmp#* }"
19369
19370  # Input might be given as Windows format, start by converting to
19371  # unix format.
19372  new_path=`$CYGPATH -u "$path"`
19373
19374  # Now try to locate executable using which
19375  new_path=`$WHICH "$new_path" 2> /dev/null`
19376  # bat and cmd files are not always considered executable in cygwin causing which
19377  # to not find them
19378  if test "x$new_path" = x \
19379           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19380           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19381    new_path=`$CYGPATH -u "$path"`
19382  fi
19383  if test "x$new_path" = x; then
19384    # Oops. Which didn't find the executable.
19385    # The splitting of arguments from the executable at a space might have been incorrect,
19386    # since paths with space are more likely in Windows. Give it another try with the whole
19387    # argument.
19388    path="$complete"
19389    arguments="EOL"
19390    new_path=`$CYGPATH -u "$path"`
19391    new_path=`$WHICH "$new_path" 2> /dev/null`
19392    # bat and cmd files are not always considered executable in cygwin causing which
19393    # to not find them
19394    if test "x$new_path" = x \
19395             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19396             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19397      new_path=`$CYGPATH -u "$path"`
19398    fi
19399    if test "x$new_path" = x; then
19400      # It's still not found. Now this is an unrecoverable error.
19401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19402$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19403      has_space=`$ECHO "$complete" | $GREP " "`
19404      if test "x$has_space" != x; then
19405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19407      fi
19408      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19409    fi
19410  fi
19411
19412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19415  # "foo.exe" is OK but "foo" is an error.
19416  #
19417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19418  # It is also a way to make sure we got the proper file name for the real test later on.
19419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19420  if test "x$test_shortpath" = x; then
19421    # Short path failed, file does not exist as specified.
19422    # Try adding .exe or .cmd
19423    if test -f "${new_path}.exe"; then
19424       input_to_shortpath="${new_path}.exe"
19425    elif test -f "${new_path}.cmd"; then
19426       input_to_shortpath="${new_path}.cmd"
19427    else
19428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19429$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19432      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19433    fi
19434  else
19435    input_to_shortpath="$new_path"
19436  fi
19437
19438  # Call helper function which possibly converts this using DOS-style short mode.
19439  # If so, the updated path is stored in $new_path.
19440  new_path="$input_to_shortpath"
19441
19442  input_path="$input_to_shortpath"
19443  # Check if we need to convert this using DOS-style short mode. If the path
19444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19445  # take no chances and rewrite it.
19446  # Note: m4 eats our [], so we need to use [ and ] instead.
19447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19448  if test "x$has_forbidden_chars" != x; then
19449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19453      # Going to short mode and back again did indeed matter. Since short mode is
19454      # case insensitive, let's make it lowercase to improve readability.
19455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19456      # Now convert it back to Unix-stile (cygpath)
19457      input_path=`$CYGPATH -u "$shortmode_path"`
19458      new_path="$input_path"
19459    fi
19460  fi
19461
19462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19463  if test "x$test_cygdrive_prefix" = x; then
19464    # As a simple fix, exclude /usr/bin since it's not a real path.
19465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19467      # a path prefixed by /cygdrive for fixpath to work.
19468      new_path="$CYGWIN_ROOT_PATH$input_path"
19469    fi
19470  fi
19471
19472  # remove trailing .exe if any
19473  new_path="${new_path/%.exe/}"
19474
19475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19476
19477  # First separate the path from the arguments. This will split at the first
19478  # space.
19479  complete="$CC"
19480  path="${complete%% *}"
19481  tmp="$complete EOL"
19482  arguments="${tmp#* }"
19483
19484  # Input might be given as Windows format, start by converting to
19485  # unix format.
19486  new_path="$path"
19487
19488  windows_path="$new_path"
19489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19490    unix_path=`$CYGPATH -u "$windows_path"`
19491    new_path="$unix_path"
19492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19494    new_path="$unix_path"
19495  fi
19496
19497
19498  # Now try to locate executable using which
19499  new_path=`$WHICH "$new_path" 2> /dev/null`
19500
19501  if test "x$new_path" = x; then
19502    # Oops. Which didn't find the executable.
19503    # The splitting of arguments from the executable at a space might have been incorrect,
19504    # since paths with space are more likely in Windows. Give it another try with the whole
19505    # argument.
19506    path="$complete"
19507    arguments="EOL"
19508    new_path="$path"
19509
19510  windows_path="$new_path"
19511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19512    unix_path=`$CYGPATH -u "$windows_path"`
19513    new_path="$unix_path"
19514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19516    new_path="$unix_path"
19517  fi
19518
19519
19520    new_path=`$WHICH "$new_path" 2> /dev/null`
19521
19522    if test "x$new_path" = x; then
19523      # It's still not found. Now this is an unrecoverable error.
19524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19525$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19526      has_space=`$ECHO "$complete" | $GREP " "`
19527      if test "x$has_space" != x; then
19528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19530      fi
19531      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19532    fi
19533  fi
19534
19535  # Now new_path has a complete unix path to the binary
19536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19537    # Keep paths in /bin as-is, but remove trailing .exe if any
19538    new_path="${new_path/%.exe/}"
19539    # Do not save /bin paths to all_fixpath_prefixes!
19540  else
19541    # Not in mixed or Windows style, start by that.
19542    new_path=`cmd //c echo $new_path`
19543
19544  input_path="$new_path"
19545  # Check if we need to convert this using DOS-style short mode. If the path
19546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19547  # take no chances and rewrite it.
19548  # Note: m4 eats our [], so we need to use [ and ] instead.
19549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19550  if test "x$has_forbidden_chars" != x; then
19551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19553  fi
19554
19555    # Output is in $new_path
19556
19557  windows_path="$new_path"
19558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19559    unix_path=`$CYGPATH -u "$windows_path"`
19560    new_path="$unix_path"
19561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19563    new_path="$unix_path"
19564  fi
19565
19566    # remove trailing .exe if any
19567    new_path="${new_path/%.exe/}"
19568
19569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19571  fi
19572
19573  else
19574    # We're on a posix platform. Hooray! :)
19575    # First separate the path from the arguments. This will split at the first
19576    # space.
19577    complete="$CC"
19578    path="${complete%% *}"
19579    tmp="$complete EOL"
19580    arguments="${tmp#* }"
19581
19582    # Cannot rely on the command "which" here since it doesn't always work.
19583    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19584    if test -z "$is_absolute_path"; then
19585      # Path to executable is not absolute. Find it.
19586      IFS_save="$IFS"
19587      IFS=:
19588      for p in $PATH; do
19589        if test -f "$p/$path" && test -x "$p/$path"; then
19590          new_path="$p/$path"
19591          break
19592        fi
19593      done
19594      IFS="$IFS_save"
19595    else
19596      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19597$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19598      new_path="$path"
19599    fi
19600
19601    if test "x$new_path" = x; then
19602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19603$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19604        has_space=`$ECHO "$complete" | $GREP " "`
19605        if test "x$has_space" != x; then
19606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19608        fi
19609        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19610      fi
19611  fi
19612
19613      # Now join together the path and the arguments once again
19614      if test "x$arguments" != xEOL; then
19615        new_complete="$new_path ${arguments% *}"
19616      else
19617        new_complete="$new_path"
19618      fi
19619
19620  if test "x$complete" != "x$new_complete"; then
19621      CC="$new_complete"
19622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19623$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19624    fi
19625
19626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19627$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19628  TEST_COMPILER="$CC"
19629
19630    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19631        # Follow a chain of symbolic links. Use readlink
19632        # where it exists, else fall back to horribly
19633        # complicated shell code.
19634        if test "x$READLINK_TESTED" != yes; then
19635            # On MacOSX there is a readlink tool with a different
19636            # purpose than the GNU readlink tool. Check the found readlink.
19637            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19638            if test "x$ISGNU" = x; then
19639                 # A readlink that we do not know how to use.
19640                 # Are there other non-GNU readlinks out there?
19641                 READLINK_TESTED=yes
19642                 READLINK=
19643            fi
19644        fi
19645
19646        if test "x$READLINK" != x; then
19647            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19648        else
19649            # Save the current directory for restoring afterwards
19650            STARTDIR=$PWD
19651            COUNTER=0
19652            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19653            sym_link_file=`$BASENAME $TEST_COMPILER`
19654            cd $sym_link_dir
19655            # Use -P flag to resolve symlinks in directories.
19656            cd `$THEPWDCMD -P`
19657            sym_link_dir=`$THEPWDCMD -P`
19658            # Resolve file symlinks
19659            while test $COUNTER -lt 20; do
19660                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19661                if test "x$ISLINK" == x; then
19662                    # This is not a symbolic link! We are done!
19663                    break
19664                fi
19665                # Again resolve directory symlinks since the target of the just found
19666                # link could be in a different directory
19667                cd `$DIRNAME $ISLINK`
19668                sym_link_dir=`$THEPWDCMD -P`
19669                sym_link_file=`$BASENAME $ISLINK`
19670                let COUNTER=COUNTER+1
19671            done
19672            cd $STARTDIR
19673            TEST_COMPILER=$sym_link_dir/$sym_link_file
19674        fi
19675    fi
19676
19677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19678$as_echo "$TEST_COMPILER" >&6; }
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19680$as_echo_n "checking if CC is disguised ccache... " >&6; }
19681
19682  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19683  if test "x$COMPILER_BASENAME" = "xccache"; then
19684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19685$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19686    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19687    # We want to control ccache invocation ourselves, so ignore this cc and try
19688    # searching again.
19689
19690    # Remove the path to the fake ccache cc from the PATH
19691    RETRY_COMPILER_SAVED_PATH="$PATH"
19692    COMPILER_DIRNAME=`$DIRNAME $CC`
19693    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19694
19695    # Try again looking for our compiler
19696    if test -n "$ac_tool_prefix"; then
19697  for ac_prog in $COMPILER_CHECK_LIST
19698  do
19699    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19702$as_echo_n "checking for $ac_word... " >&6; }
19703if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19704  $as_echo_n "(cached) " >&6
19705else
19706  if test -n "$PROPER_COMPILER_CC"; then
19707  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19708else
19709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19710for as_dir in $PATH
19711do
19712  IFS=$as_save_IFS
19713  test -z "$as_dir" && as_dir=.
19714    for ac_exec_ext in '' $ac_executable_extensions; do
19715  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19716    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19718    break 2
19719  fi
19720done
19721  done
19722IFS=$as_save_IFS
19723
19724fi
19725fi
19726PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19727if test -n "$PROPER_COMPILER_CC"; then
19728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19729$as_echo "$PROPER_COMPILER_CC" >&6; }
19730else
19731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19732$as_echo "no" >&6; }
19733fi
19734
19735
19736    test -n "$PROPER_COMPILER_CC" && break
19737  done
19738fi
19739if test -z "$PROPER_COMPILER_CC"; then
19740  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19741  for ac_prog in $COMPILER_CHECK_LIST
19742do
19743  # Extract the first word of "$ac_prog", so it can be a program name with args.
19744set dummy $ac_prog; ac_word=$2
19745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19746$as_echo_n "checking for $ac_word... " >&6; }
19747if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19748  $as_echo_n "(cached) " >&6
19749else
19750  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19751  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19752else
19753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19754for as_dir in $PATH
19755do
19756  IFS=$as_save_IFS
19757  test -z "$as_dir" && as_dir=.
19758    for ac_exec_ext in '' $ac_executable_extensions; do
19759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19760    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19762    break 2
19763  fi
19764done
19765  done
19766IFS=$as_save_IFS
19767
19768fi
19769fi
19770ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19771if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19773$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19774else
19775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19776$as_echo "no" >&6; }
19777fi
19778
19779
19780  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19781done
19782
19783  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19784    PROPER_COMPILER_CC=""
19785  else
19786    case $cross_compiling:$ac_tool_warned in
19787yes:)
19788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19790ac_tool_warned=yes ;;
19791esac
19792    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19793  fi
19794fi
19795
19796
19797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19798
19799  # First separate the path from the arguments. This will split at the first
19800  # space.
19801  complete="$PROPER_COMPILER_CC"
19802  path="${complete%% *}"
19803  tmp="$complete EOL"
19804  arguments="${tmp#* }"
19805
19806  # Input might be given as Windows format, start by converting to
19807  # unix format.
19808  new_path=`$CYGPATH -u "$path"`
19809
19810  # Now try to locate executable using which
19811  new_path=`$WHICH "$new_path" 2> /dev/null`
19812  # bat and cmd files are not always considered executable in cygwin causing which
19813  # to not find them
19814  if test "x$new_path" = x \
19815           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19816           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19817    new_path=`$CYGPATH -u "$path"`
19818  fi
19819  if test "x$new_path" = x; then
19820    # Oops. Which didn't find the executable.
19821    # The splitting of arguments from the executable at a space might have been incorrect,
19822    # since paths with space are more likely in Windows. Give it another try with the whole
19823    # argument.
19824    path="$complete"
19825    arguments="EOL"
19826    new_path=`$CYGPATH -u "$path"`
19827    new_path=`$WHICH "$new_path" 2> /dev/null`
19828    # bat and cmd files are not always considered executable in cygwin causing which
19829    # to not find them
19830    if test "x$new_path" = x \
19831             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19832             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19833      new_path=`$CYGPATH -u "$path"`
19834    fi
19835    if test "x$new_path" = x; then
19836      # It's still not found. Now this is an unrecoverable error.
19837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19838$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19839      has_space=`$ECHO "$complete" | $GREP " "`
19840      if test "x$has_space" != x; then
19841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19843      fi
19844      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19845    fi
19846  fi
19847
19848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19851  # "foo.exe" is OK but "foo" is an error.
19852  #
19853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19854  # It is also a way to make sure we got the proper file name for the real test later on.
19855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19856  if test "x$test_shortpath" = x; then
19857    # Short path failed, file does not exist as specified.
19858    # Try adding .exe or .cmd
19859    if test -f "${new_path}.exe"; then
19860       input_to_shortpath="${new_path}.exe"
19861    elif test -f "${new_path}.cmd"; then
19862       input_to_shortpath="${new_path}.cmd"
19863    else
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19865$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19868      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19869    fi
19870  else
19871    input_to_shortpath="$new_path"
19872  fi
19873
19874  # Call helper function which possibly converts this using DOS-style short mode.
19875  # If so, the updated path is stored in $new_path.
19876  new_path="$input_to_shortpath"
19877
19878  input_path="$input_to_shortpath"
19879  # Check if we need to convert this using DOS-style short mode. If the path
19880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19881  # take no chances and rewrite it.
19882  # Note: m4 eats our [], so we need to use [ and ] instead.
19883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19884  if test "x$has_forbidden_chars" != x; then
19885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19889      # Going to short mode and back again did indeed matter. Since short mode is
19890      # case insensitive, let's make it lowercase to improve readability.
19891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19892      # Now convert it back to Unix-stile (cygpath)
19893      input_path=`$CYGPATH -u "$shortmode_path"`
19894      new_path="$input_path"
19895    fi
19896  fi
19897
19898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19899  if test "x$test_cygdrive_prefix" = x; then
19900    # As a simple fix, exclude /usr/bin since it's not a real path.
19901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19903      # a path prefixed by /cygdrive for fixpath to work.
19904      new_path="$CYGWIN_ROOT_PATH$input_path"
19905    fi
19906  fi
19907
19908  # remove trailing .exe if any
19909  new_path="${new_path/%.exe/}"
19910
19911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19912
19913  # First separate the path from the arguments. This will split at the first
19914  # space.
19915  complete="$PROPER_COMPILER_CC"
19916  path="${complete%% *}"
19917  tmp="$complete EOL"
19918  arguments="${tmp#* }"
19919
19920  # Input might be given as Windows format, start by converting to
19921  # unix format.
19922  new_path="$path"
19923
19924  windows_path="$new_path"
19925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19926    unix_path=`$CYGPATH -u "$windows_path"`
19927    new_path="$unix_path"
19928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19930    new_path="$unix_path"
19931  fi
19932
19933
19934  # Now try to locate executable using which
19935  new_path=`$WHICH "$new_path" 2> /dev/null`
19936
19937  if test "x$new_path" = x; then
19938    # Oops. Which didn't find the executable.
19939    # The splitting of arguments from the executable at a space might have been incorrect,
19940    # since paths with space are more likely in Windows. Give it another try with the whole
19941    # argument.
19942    path="$complete"
19943    arguments="EOL"
19944    new_path="$path"
19945
19946  windows_path="$new_path"
19947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19948    unix_path=`$CYGPATH -u "$windows_path"`
19949    new_path="$unix_path"
19950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19952    new_path="$unix_path"
19953  fi
19954
19955
19956    new_path=`$WHICH "$new_path" 2> /dev/null`
19957
19958    if test "x$new_path" = x; then
19959      # It's still not found. Now this is an unrecoverable error.
19960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19961$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19962      has_space=`$ECHO "$complete" | $GREP " "`
19963      if test "x$has_space" != x; then
19964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19966      fi
19967      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19968    fi
19969  fi
19970
19971  # Now new_path has a complete unix path to the binary
19972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19973    # Keep paths in /bin as-is, but remove trailing .exe if any
19974    new_path="${new_path/%.exe/}"
19975    # Do not save /bin paths to all_fixpath_prefixes!
19976  else
19977    # Not in mixed or Windows style, start by that.
19978    new_path=`cmd //c echo $new_path`
19979
19980  input_path="$new_path"
19981  # Check if we need to convert this using DOS-style short mode. If the path
19982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19983  # take no chances and rewrite it.
19984  # Note: m4 eats our [], so we need to use [ and ] instead.
19985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19986  if test "x$has_forbidden_chars" != x; then
19987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19989  fi
19990
19991    # Output is in $new_path
19992
19993  windows_path="$new_path"
19994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19995    unix_path=`$CYGPATH -u "$windows_path"`
19996    new_path="$unix_path"
19997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19999    new_path="$unix_path"
20000  fi
20001
20002    # remove trailing .exe if any
20003    new_path="${new_path/%.exe/}"
20004
20005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20007  fi
20008
20009  else
20010    # We're on a posix platform. Hooray! :)
20011    # First separate the path from the arguments. This will split at the first
20012    # space.
20013    complete="$PROPER_COMPILER_CC"
20014    path="${complete%% *}"
20015    tmp="$complete EOL"
20016    arguments="${tmp#* }"
20017
20018    # Cannot rely on the command "which" here since it doesn't always work.
20019    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20020    if test -z "$is_absolute_path"; then
20021      # Path to executable is not absolute. Find it.
20022      IFS_save="$IFS"
20023      IFS=:
20024      for p in $PATH; do
20025        if test -f "$p/$path" && test -x "$p/$path"; then
20026          new_path="$p/$path"
20027          break
20028        fi
20029      done
20030      IFS="$IFS_save"
20031    else
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20033$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20034      new_path="$path"
20035    fi
20036
20037    if test "x$new_path" = x; then
20038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20039$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20040        has_space=`$ECHO "$complete" | $GREP " "`
20041        if test "x$has_space" != x; then
20042          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20044        fi
20045        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20046      fi
20047  fi
20048
20049      # Now join together the path and the arguments once again
20050      if test "x$arguments" != xEOL; then
20051        new_complete="$new_path ${arguments% *}"
20052      else
20053        new_complete="$new_path"
20054      fi
20055
20056  if test "x$complete" != "x$new_complete"; then
20057      PROPER_COMPILER_CC="$new_complete"
20058      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20059$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20060    fi
20061
20062    PATH="$RETRY_COMPILER_SAVED_PATH"
20063
20064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20065$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20066
20067    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20068        # Follow a chain of symbolic links. Use readlink
20069        # where it exists, else fall back to horribly
20070        # complicated shell code.
20071        if test "x$READLINK_TESTED" != yes; then
20072            # On MacOSX there is a readlink tool with a different
20073            # purpose than the GNU readlink tool. Check the found readlink.
20074            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20075            if test "x$ISGNU" = x; then
20076                 # A readlink that we do not know how to use.
20077                 # Are there other non-GNU readlinks out there?
20078                 READLINK_TESTED=yes
20079                 READLINK=
20080            fi
20081        fi
20082
20083        if test "x$READLINK" != x; then
20084            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20085        else
20086            # Save the current directory for restoring afterwards
20087            STARTDIR=$PWD
20088            COUNTER=0
20089            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20090            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20091            cd $sym_link_dir
20092            # Use -P flag to resolve symlinks in directories.
20093            cd `$THEPWDCMD -P`
20094            sym_link_dir=`$THEPWDCMD -P`
20095            # Resolve file symlinks
20096            while test $COUNTER -lt 20; do
20097                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20098                if test "x$ISLINK" == x; then
20099                    # This is not a symbolic link! We are done!
20100                    break
20101                fi
20102                # Again resolve directory symlinks since the target of the just found
20103                # link could be in a different directory
20104                cd `$DIRNAME $ISLINK`
20105                sym_link_dir=`$THEPWDCMD -P`
20106                sym_link_file=`$BASENAME $ISLINK`
20107                let COUNTER=COUNTER+1
20108            done
20109            cd $STARTDIR
20110            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20111        fi
20112    fi
20113
20114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20115$as_echo "$PROPER_COMPILER_CC" >&6; }
20116    CC="$PROPER_COMPILER_CC"
20117  else
20118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20119$as_echo "no, keeping CC" >&6; }
20120    CC="$TEST_COMPILER"
20121  fi
20122
20123  COMPILER=$CC
20124  COMPILER_NAME=$COMPILER_NAME
20125
20126  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20127    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20128    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20129    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20130    if test $? -ne 0; then
20131      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20132
20133      { $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
20134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20135      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20136$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20137      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20138    else
20139      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20140      COMPILER_VENDOR="Sun Studio"
20141    fi
20142  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20143    # First line typically looks something like:
20144    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20145    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20146    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20147    COMPILER_VENDOR="Microsoft CL.EXE"
20148    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20149    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20150      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20151        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20152      fi
20153    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20154      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20155        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20156      fi
20157    fi
20158  else
20159    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20160    # Check that this is likely to be GCC.
20161    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20162    if test $? -ne 0; then
20163      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20164$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20165      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20166$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20167      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20168    fi
20169
20170    # First line typically looks something like:
20171    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20172    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20173    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20174  fi
20175  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20176  CC_VERSION="$COMPILER_VERSION"
20177  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20178  CC_VENDOR="$COMPILER_VENDOR"
20179
20180  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20181$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20182
20183
20184# Now that we have resolved CC ourself, let autoconf have its go at it
20185ac_ext=c
20186ac_cpp='$CPP $CPPFLAGS'
20187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20189ac_compiler_gnu=$ac_cv_c_compiler_gnu
20190if test -n "$ac_tool_prefix"; then
20191  for ac_prog in $CC
20192  do
20193    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20194set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20196$as_echo_n "checking for $ac_word... " >&6; }
20197if test "${ac_cv_prog_CC+set}" = set; then :
20198  $as_echo_n "(cached) " >&6
20199else
20200  if test -n "$CC"; then
20201  ac_cv_prog_CC="$CC" # Let the user override the test.
20202else
20203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20204for as_dir in $PATH
20205do
20206  IFS=$as_save_IFS
20207  test -z "$as_dir" && as_dir=.
20208    for ac_exec_ext in '' $ac_executable_extensions; do
20209  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20210    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20212    break 2
20213  fi
20214done
20215  done
20216IFS=$as_save_IFS
20217
20218fi
20219fi
20220CC=$ac_cv_prog_CC
20221if test -n "$CC"; then
20222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20223$as_echo "$CC" >&6; }
20224else
20225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20226$as_echo "no" >&6; }
20227fi
20228
20229
20230    test -n "$CC" && break
20231  done
20232fi
20233if test -z "$CC"; then
20234  ac_ct_CC=$CC
20235  for ac_prog in $CC
20236do
20237  # Extract the first word of "$ac_prog", so it can be a program name with args.
20238set dummy $ac_prog; ac_word=$2
20239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20240$as_echo_n "checking for $ac_word... " >&6; }
20241if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20242  $as_echo_n "(cached) " >&6
20243else
20244  if test -n "$ac_ct_CC"; then
20245  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20246else
20247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20248for as_dir in $PATH
20249do
20250  IFS=$as_save_IFS
20251  test -z "$as_dir" && as_dir=.
20252    for ac_exec_ext in '' $ac_executable_extensions; do
20253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20254    ac_cv_prog_ac_ct_CC="$ac_prog"
20255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20256    break 2
20257  fi
20258done
20259  done
20260IFS=$as_save_IFS
20261
20262fi
20263fi
20264ac_ct_CC=$ac_cv_prog_ac_ct_CC
20265if test -n "$ac_ct_CC"; then
20266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20267$as_echo "$ac_ct_CC" >&6; }
20268else
20269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20270$as_echo "no" >&6; }
20271fi
20272
20273
20274  test -n "$ac_ct_CC" && break
20275done
20276
20277  if test "x$ac_ct_CC" = x; then
20278    CC=""
20279  else
20280    case $cross_compiling:$ac_tool_warned in
20281yes:)
20282{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20283$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20284ac_tool_warned=yes ;;
20285esac
20286    CC=$ac_ct_CC
20287  fi
20288fi
20289
20290
20291test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20293as_fn_error $? "no acceptable C compiler found in \$PATH
20294See \`config.log' for more details" "$LINENO" 5 ; }
20295
20296# Provide some information about the compiler.
20297$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20298set X $ac_compile
20299ac_compiler=$2
20300for ac_option in --version -v -V -qversion; do
20301  { { ac_try="$ac_compiler $ac_option >&5"
20302case "(($ac_try" in
20303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20304  *) ac_try_echo=$ac_try;;
20305esac
20306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20307$as_echo "$ac_try_echo"; } >&5
20308  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20309  ac_status=$?
20310  if test -s conftest.err; then
20311    sed '10a\
20312... rest of stderr output deleted ...
20313         10q' conftest.err >conftest.er1
20314    cat conftest.er1 >&5
20315  fi
20316  rm -f conftest.er1 conftest.err
20317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20318  test $ac_status = 0; }
20319done
20320
20321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20322/* end confdefs.h.  */
20323
20324int
20325main ()
20326{
20327
20328  ;
20329  return 0;
20330}
20331_ACEOF
20332ac_clean_files_save=$ac_clean_files
20333ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20334# Try to create an executable without -o first, disregard a.out.
20335# It will help us diagnose broken compilers, and finding out an intuition
20336# of exeext.
20337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20338$as_echo_n "checking whether the C compiler works... " >&6; }
20339ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20340
20341# The possible output files:
20342ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20343
20344ac_rmfiles=
20345for ac_file in $ac_files
20346do
20347  case $ac_file in
20348    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20349    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20350  esac
20351done
20352rm -f $ac_rmfiles
20353
20354if { { ac_try="$ac_link_default"
20355case "(($ac_try" in
20356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20357  *) ac_try_echo=$ac_try;;
20358esac
20359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20360$as_echo "$ac_try_echo"; } >&5
20361  (eval "$ac_link_default") 2>&5
20362  ac_status=$?
20363  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20364  test $ac_status = 0; }; then :
20365  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20366# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20367# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20368# so that the user can short-circuit this test for compilers unknown to
20369# Autoconf.
20370for ac_file in $ac_files ''
20371do
20372  test -f "$ac_file" || continue
20373  case $ac_file in
20374    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20375	;;
20376    [ab].out )
20377	# We found the default executable, but exeext='' is most
20378	# certainly right.
20379	break;;
20380    *.* )
20381	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20382	then :; else
20383	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20384	fi
20385	# We set ac_cv_exeext here because the later test for it is not
20386	# safe: cross compilers may not add the suffix if given an `-o'
20387	# argument, so we may need to know it at that point already.
20388	# Even if this section looks crufty: it has the advantage of
20389	# actually working.
20390	break;;
20391    * )
20392	break;;
20393  esac
20394done
20395test "$ac_cv_exeext" = no && ac_cv_exeext=
20396
20397else
20398  ac_file=''
20399fi
20400if test -z "$ac_file"; then :
20401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20402$as_echo "no" >&6; }
20403$as_echo "$as_me: failed program was:" >&5
20404sed 's/^/| /' conftest.$ac_ext >&5
20405
20406{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20408as_fn_error 77 "C compiler cannot create executables
20409See \`config.log' for more details" "$LINENO" 5 ; }
20410else
20411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20412$as_echo "yes" >&6; }
20413fi
20414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20415$as_echo_n "checking for C compiler default output file name... " >&6; }
20416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20417$as_echo "$ac_file" >&6; }
20418ac_exeext=$ac_cv_exeext
20419
20420rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20421ac_clean_files=$ac_clean_files_save
20422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20423$as_echo_n "checking for suffix of executables... " >&6; }
20424if { { ac_try="$ac_link"
20425case "(($ac_try" in
20426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20427  *) ac_try_echo=$ac_try;;
20428esac
20429eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20430$as_echo "$ac_try_echo"; } >&5
20431  (eval "$ac_link") 2>&5
20432  ac_status=$?
20433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20434  test $ac_status = 0; }; then :
20435  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20436# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20437# work properly (i.e., refer to `conftest.exe'), while it won't with
20438# `rm'.
20439for ac_file in conftest.exe conftest conftest.*; do
20440  test -f "$ac_file" || continue
20441  case $ac_file in
20442    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20443    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20444	  break;;
20445    * ) break;;
20446  esac
20447done
20448else
20449  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20451as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20452See \`config.log' for more details" "$LINENO" 5 ; }
20453fi
20454rm -f conftest conftest$ac_cv_exeext
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20456$as_echo "$ac_cv_exeext" >&6; }
20457
20458rm -f conftest.$ac_ext
20459EXEEXT=$ac_cv_exeext
20460ac_exeext=$EXEEXT
20461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20462/* end confdefs.h.  */
20463#include <stdio.h>
20464int
20465main ()
20466{
20467FILE *f = fopen ("conftest.out", "w");
20468 return ferror (f) || fclose (f) != 0;
20469
20470  ;
20471  return 0;
20472}
20473_ACEOF
20474ac_clean_files="$ac_clean_files conftest.out"
20475# Check that the compiler produces executables we can run.  If not, either
20476# the compiler is broken, or we cross compile.
20477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20478$as_echo_n "checking whether we are cross compiling... " >&6; }
20479if test "$cross_compiling" != yes; then
20480  { { ac_try="$ac_link"
20481case "(($ac_try" in
20482  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20483  *) ac_try_echo=$ac_try;;
20484esac
20485eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20486$as_echo "$ac_try_echo"; } >&5
20487  (eval "$ac_link") 2>&5
20488  ac_status=$?
20489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20490  test $ac_status = 0; }
20491  if { ac_try='./conftest$ac_cv_exeext'
20492  { { case "(($ac_try" in
20493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494  *) ac_try_echo=$ac_try;;
20495esac
20496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20497$as_echo "$ac_try_echo"; } >&5
20498  (eval "$ac_try") 2>&5
20499  ac_status=$?
20500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20501  test $ac_status = 0; }; }; then
20502    cross_compiling=no
20503  else
20504    if test "$cross_compiling" = maybe; then
20505	cross_compiling=yes
20506    else
20507	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20509as_fn_error $? "cannot run C compiled programs.
20510If you meant to cross compile, use \`--host'.
20511See \`config.log' for more details" "$LINENO" 5 ; }
20512    fi
20513  fi
20514fi
20515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20516$as_echo "$cross_compiling" >&6; }
20517
20518rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20519ac_clean_files=$ac_clean_files_save
20520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20521$as_echo_n "checking for suffix of object files... " >&6; }
20522if test "${ac_cv_objext+set}" = set; then :
20523  $as_echo_n "(cached) " >&6
20524else
20525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20526/* end confdefs.h.  */
20527
20528int
20529main ()
20530{
20531
20532  ;
20533  return 0;
20534}
20535_ACEOF
20536rm -f conftest.o conftest.obj
20537if { { ac_try="$ac_compile"
20538case "(($ac_try" in
20539  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20540  *) ac_try_echo=$ac_try;;
20541esac
20542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20543$as_echo "$ac_try_echo"; } >&5
20544  (eval "$ac_compile") 2>&5
20545  ac_status=$?
20546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20547  test $ac_status = 0; }; then :
20548  for ac_file in conftest.o conftest.obj conftest.*; do
20549  test -f "$ac_file" || continue;
20550  case $ac_file in
20551    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20552    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20553       break;;
20554  esac
20555done
20556else
20557  $as_echo "$as_me: failed program was:" >&5
20558sed 's/^/| /' conftest.$ac_ext >&5
20559
20560{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20562as_fn_error $? "cannot compute suffix of object files: cannot compile
20563See \`config.log' for more details" "$LINENO" 5 ; }
20564fi
20565rm -f conftest.$ac_cv_objext conftest.$ac_ext
20566fi
20567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20568$as_echo "$ac_cv_objext" >&6; }
20569OBJEXT=$ac_cv_objext
20570ac_objext=$OBJEXT
20571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20572$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20573if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20574  $as_echo_n "(cached) " >&6
20575else
20576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20577/* end confdefs.h.  */
20578
20579int
20580main ()
20581{
20582#ifndef __GNUC__
20583       choke me
20584#endif
20585
20586  ;
20587  return 0;
20588}
20589_ACEOF
20590if ac_fn_c_try_compile "$LINENO"; then :
20591  ac_compiler_gnu=yes
20592else
20593  ac_compiler_gnu=no
20594fi
20595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20596ac_cv_c_compiler_gnu=$ac_compiler_gnu
20597
20598fi
20599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20600$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20601if test $ac_compiler_gnu = yes; then
20602  GCC=yes
20603else
20604  GCC=
20605fi
20606ac_test_CFLAGS=${CFLAGS+set}
20607ac_save_CFLAGS=$CFLAGS
20608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20609$as_echo_n "checking whether $CC accepts -g... " >&6; }
20610if test "${ac_cv_prog_cc_g+set}" = set; then :
20611  $as_echo_n "(cached) " >&6
20612else
20613  ac_save_c_werror_flag=$ac_c_werror_flag
20614   ac_c_werror_flag=yes
20615   ac_cv_prog_cc_g=no
20616   CFLAGS="-g"
20617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20618/* end confdefs.h.  */
20619
20620int
20621main ()
20622{
20623
20624  ;
20625  return 0;
20626}
20627_ACEOF
20628if ac_fn_c_try_compile "$LINENO"; then :
20629  ac_cv_prog_cc_g=yes
20630else
20631  CFLAGS=""
20632      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20633/* end confdefs.h.  */
20634
20635int
20636main ()
20637{
20638
20639  ;
20640  return 0;
20641}
20642_ACEOF
20643if ac_fn_c_try_compile "$LINENO"; then :
20644
20645else
20646  ac_c_werror_flag=$ac_save_c_werror_flag
20647	 CFLAGS="-g"
20648	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20649/* end confdefs.h.  */
20650
20651int
20652main ()
20653{
20654
20655  ;
20656  return 0;
20657}
20658_ACEOF
20659if ac_fn_c_try_compile "$LINENO"; then :
20660  ac_cv_prog_cc_g=yes
20661fi
20662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20663fi
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20665fi
20666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20667   ac_c_werror_flag=$ac_save_c_werror_flag
20668fi
20669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20670$as_echo "$ac_cv_prog_cc_g" >&6; }
20671if test "$ac_test_CFLAGS" = set; then
20672  CFLAGS=$ac_save_CFLAGS
20673elif test $ac_cv_prog_cc_g = yes; then
20674  if test "$GCC" = yes; then
20675    CFLAGS="-g -O2"
20676  else
20677    CFLAGS="-g"
20678  fi
20679else
20680  if test "$GCC" = yes; then
20681    CFLAGS="-O2"
20682  else
20683    CFLAGS=
20684  fi
20685fi
20686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20687$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20688if test "${ac_cv_prog_cc_c89+set}" = set; then :
20689  $as_echo_n "(cached) " >&6
20690else
20691  ac_cv_prog_cc_c89=no
20692ac_save_CC=$CC
20693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20694/* end confdefs.h.  */
20695#include <stdarg.h>
20696#include <stdio.h>
20697#include <sys/types.h>
20698#include <sys/stat.h>
20699/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20700struct buf { int x; };
20701FILE * (*rcsopen) (struct buf *, struct stat *, int);
20702static char *e (p, i)
20703     char **p;
20704     int i;
20705{
20706  return p[i];
20707}
20708static char *f (char * (*g) (char **, int), char **p, ...)
20709{
20710  char *s;
20711  va_list v;
20712  va_start (v,p);
20713  s = g (p, va_arg (v,int));
20714  va_end (v);
20715  return s;
20716}
20717
20718/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20719   function prototypes and stuff, but not '\xHH' hex character constants.
20720   These don't provoke an error unfortunately, instead are silently treated
20721   as 'x'.  The following induces an error, until -std is added to get
20722   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20723   array size at least.  It's necessary to write '\x00'==0 to get something
20724   that's true only with -std.  */
20725int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20726
20727/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20728   inside strings and character constants.  */
20729#define FOO(x) 'x'
20730int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20731
20732int test (int i, double x);
20733struct s1 {int (*f) (int a);};
20734struct s2 {int (*f) (double a);};
20735int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20736int argc;
20737char **argv;
20738int
20739main ()
20740{
20741return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20742  ;
20743  return 0;
20744}
20745_ACEOF
20746for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20747	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20748do
20749  CC="$ac_save_CC $ac_arg"
20750  if ac_fn_c_try_compile "$LINENO"; then :
20751  ac_cv_prog_cc_c89=$ac_arg
20752fi
20753rm -f core conftest.err conftest.$ac_objext
20754  test "x$ac_cv_prog_cc_c89" != "xno" && break
20755done
20756rm -f conftest.$ac_ext
20757CC=$ac_save_CC
20758
20759fi
20760# AC_CACHE_VAL
20761case "x$ac_cv_prog_cc_c89" in
20762  x)
20763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20764$as_echo "none needed" >&6; } ;;
20765  xno)
20766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20767$as_echo "unsupported" >&6; } ;;
20768  *)
20769    CC="$CC $ac_cv_prog_cc_c89"
20770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20771$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20772esac
20773if test "x$ac_cv_prog_cc_c89" != xno; then :
20774
20775fi
20776
20777ac_ext=cpp
20778ac_cpp='$CXXCPP $CPPFLAGS'
20779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20782
20783
20784### Locate C++ compiler (CXX)
20785
20786if test "x$CXX" != x; then
20787  COMPILER_CHECK_LIST="$CXX"
20788elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20789  COMPILER_CHECK_LIST="cl"
20790elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20791  COMPILER_CHECK_LIST="CC g++"
20792else
20793  COMPILER_CHECK_LIST="g++ CC"
20794fi
20795
20796
20797  COMPILER_NAME=C++
20798
20799  CXX=
20800  # If TOOLS_DIR is set, check for all compiler names in there first
20801  # before checking the rest of the PATH.
20802  if test -n "$TOOLS_DIR"; then
20803    PATH_save="$PATH"
20804    PATH="$TOOLS_DIR"
20805    for ac_prog in $COMPILER_CHECK_LIST
20806do
20807  # Extract the first word of "$ac_prog", so it can be a program name with args.
20808set dummy $ac_prog; ac_word=$2
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20810$as_echo_n "checking for $ac_word... " >&6; }
20811if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20812  $as_echo_n "(cached) " >&6
20813else
20814  case $TOOLS_DIR_CXX in
20815  [\\/]* | ?:[\\/]*)
20816  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20817  ;;
20818  *)
20819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20820for as_dir in $PATH
20821do
20822  IFS=$as_save_IFS
20823  test -z "$as_dir" && as_dir=.
20824    for ac_exec_ext in '' $ac_executable_extensions; do
20825  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20826    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20828    break 2
20829  fi
20830done
20831  done
20832IFS=$as_save_IFS
20833
20834  ;;
20835esac
20836fi
20837TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20838if test -n "$TOOLS_DIR_CXX"; then
20839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20840$as_echo "$TOOLS_DIR_CXX" >&6; }
20841else
20842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20843$as_echo "no" >&6; }
20844fi
20845
20846
20847  test -n "$TOOLS_DIR_CXX" && break
20848done
20849
20850    CXX=$TOOLS_DIR_CXX
20851    PATH="$PATH_save"
20852  fi
20853
20854  # AC_PATH_PROGS can't be run multiple times with the same variable,
20855  # so create a new name for this run.
20856  if test "x$CXX" = x; then
20857    for ac_prog in $COMPILER_CHECK_LIST
20858do
20859  # Extract the first word of "$ac_prog", so it can be a program name with args.
20860set dummy $ac_prog; ac_word=$2
20861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20862$as_echo_n "checking for $ac_word... " >&6; }
20863if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20864  $as_echo_n "(cached) " >&6
20865else
20866  case $POTENTIAL_CXX in
20867  [\\/]* | ?:[\\/]*)
20868  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20869  ;;
20870  *)
20871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20872for as_dir in $PATH
20873do
20874  IFS=$as_save_IFS
20875  test -z "$as_dir" && as_dir=.
20876    for ac_exec_ext in '' $ac_executable_extensions; do
20877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20878    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20880    break 2
20881  fi
20882done
20883  done
20884IFS=$as_save_IFS
20885
20886  ;;
20887esac
20888fi
20889POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20890if test -n "$POTENTIAL_CXX"; then
20891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20892$as_echo "$POTENTIAL_CXX" >&6; }
20893else
20894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20895$as_echo "no" >&6; }
20896fi
20897
20898
20899  test -n "$POTENTIAL_CXX" && break
20900done
20901
20902    CXX=$POTENTIAL_CXX
20903  fi
20904
20905  if test "x$CXX" = x; then
20906
20907    # Print a helpful message on how to acquire the necessary build dependency.
20908    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20909    MISSING_DEPENDENCY=devkit
20910    PKGHANDLER_COMMAND=
20911
20912    case $PKGHANDLER in
20913	apt-get)
20914                apt_help     $MISSING_DEPENDENCY ;;
20915    yum)
20916                yum_help     $MISSING_DEPENDENCY ;;
20917	port)
20918                port_help    $MISSING_DEPENDENCY ;;
20919	pkgutil)
20920                pkgutil_help $MISSING_DEPENDENCY ;;
20921	pkgadd)
20922                pkgadd_help  $MISSING_DEPENDENCY ;;
20923    * )
20924      break ;;
20925    esac
20926
20927    if test "x$PKGHANDLER_COMMAND" != x; then
20928        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20929    fi
20930
20931      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20932  fi
20933
20934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20935
20936  # First separate the path from the arguments. This will split at the first
20937  # space.
20938  complete="$CXX"
20939  path="${complete%% *}"
20940  tmp="$complete EOL"
20941  arguments="${tmp#* }"
20942
20943  # Input might be given as Windows format, start by converting to
20944  # unix format.
20945  new_path=`$CYGPATH -u "$path"`
20946
20947  # Now try to locate executable using which
20948  new_path=`$WHICH "$new_path" 2> /dev/null`
20949  # bat and cmd files are not always considered executable in cygwin causing which
20950  # to not find them
20951  if test "x$new_path" = x \
20952           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20953           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20954    new_path=`$CYGPATH -u "$path"`
20955  fi
20956  if test "x$new_path" = x; then
20957    # Oops. Which didn't find the executable.
20958    # The splitting of arguments from the executable at a space might have been incorrect,
20959    # since paths with space are more likely in Windows. Give it another try with the whole
20960    # argument.
20961    path="$complete"
20962    arguments="EOL"
20963    new_path=`$CYGPATH -u "$path"`
20964    new_path=`$WHICH "$new_path" 2> /dev/null`
20965    # bat and cmd files are not always considered executable in cygwin causing which
20966    # to not find them
20967    if test "x$new_path" = x \
20968             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20969             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20970      new_path=`$CYGPATH -u "$path"`
20971    fi
20972    if test "x$new_path" = x; then
20973      # It's still not found. Now this is an unrecoverable error.
20974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20975$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20976      has_space=`$ECHO "$complete" | $GREP " "`
20977      if test "x$has_space" != x; then
20978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20980      fi
20981      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20982    fi
20983  fi
20984
20985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20988  # "foo.exe" is OK but "foo" is an error.
20989  #
20990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20991  # It is also a way to make sure we got the proper file name for the real test later on.
20992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20993  if test "x$test_shortpath" = x; then
20994    # Short path failed, file does not exist as specified.
20995    # Try adding .exe or .cmd
20996    if test -f "${new_path}.exe"; then
20997       input_to_shortpath="${new_path}.exe"
20998    elif test -f "${new_path}.cmd"; then
20999       input_to_shortpath="${new_path}.cmd"
21000    else
21001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21002$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21005      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21006    fi
21007  else
21008    input_to_shortpath="$new_path"
21009  fi
21010
21011  # Call helper function which possibly converts this using DOS-style short mode.
21012  # If so, the updated path is stored in $new_path.
21013  new_path="$input_to_shortpath"
21014
21015  input_path="$input_to_shortpath"
21016  # Check if we need to convert this using DOS-style short mode. If the path
21017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21018  # take no chances and rewrite it.
21019  # Note: m4 eats our [], so we need to use [ and ] instead.
21020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21021  if test "x$has_forbidden_chars" != x; then
21022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21026      # Going to short mode and back again did indeed matter. Since short mode is
21027      # case insensitive, let's make it lowercase to improve readability.
21028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21029      # Now convert it back to Unix-stile (cygpath)
21030      input_path=`$CYGPATH -u "$shortmode_path"`
21031      new_path="$input_path"
21032    fi
21033  fi
21034
21035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21036  if test "x$test_cygdrive_prefix" = x; then
21037    # As a simple fix, exclude /usr/bin since it's not a real path.
21038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21040      # a path prefixed by /cygdrive for fixpath to work.
21041      new_path="$CYGWIN_ROOT_PATH$input_path"
21042    fi
21043  fi
21044
21045  # remove trailing .exe if any
21046  new_path="${new_path/%.exe/}"
21047
21048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21049
21050  # First separate the path from the arguments. This will split at the first
21051  # space.
21052  complete="$CXX"
21053  path="${complete%% *}"
21054  tmp="$complete EOL"
21055  arguments="${tmp#* }"
21056
21057  # Input might be given as Windows format, start by converting to
21058  # unix format.
21059  new_path="$path"
21060
21061  windows_path="$new_path"
21062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21063    unix_path=`$CYGPATH -u "$windows_path"`
21064    new_path="$unix_path"
21065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21067    new_path="$unix_path"
21068  fi
21069
21070
21071  # Now try to locate executable using which
21072  new_path=`$WHICH "$new_path" 2> /dev/null`
21073
21074  if test "x$new_path" = x; then
21075    # Oops. Which didn't find the executable.
21076    # The splitting of arguments from the executable at a space might have been incorrect,
21077    # since paths with space are more likely in Windows. Give it another try with the whole
21078    # argument.
21079    path="$complete"
21080    arguments="EOL"
21081    new_path="$path"
21082
21083  windows_path="$new_path"
21084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21085    unix_path=`$CYGPATH -u "$windows_path"`
21086    new_path="$unix_path"
21087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21089    new_path="$unix_path"
21090  fi
21091
21092
21093    new_path=`$WHICH "$new_path" 2> /dev/null`
21094
21095    if test "x$new_path" = x; then
21096      # It's still not found. Now this is an unrecoverable error.
21097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21098$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21099      has_space=`$ECHO "$complete" | $GREP " "`
21100      if test "x$has_space" != x; then
21101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21103      fi
21104      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21105    fi
21106  fi
21107
21108  # Now new_path has a complete unix path to the binary
21109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21110    # Keep paths in /bin as-is, but remove trailing .exe if any
21111    new_path="${new_path/%.exe/}"
21112    # Do not save /bin paths to all_fixpath_prefixes!
21113  else
21114    # Not in mixed or Windows style, start by that.
21115    new_path=`cmd //c echo $new_path`
21116
21117  input_path="$new_path"
21118  # Check if we need to convert this using DOS-style short mode. If the path
21119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21120  # take no chances and rewrite it.
21121  # Note: m4 eats our [], so we need to use [ and ] instead.
21122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21123  if test "x$has_forbidden_chars" != x; then
21124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21126  fi
21127
21128    # Output is in $new_path
21129
21130  windows_path="$new_path"
21131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21132    unix_path=`$CYGPATH -u "$windows_path"`
21133    new_path="$unix_path"
21134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21136    new_path="$unix_path"
21137  fi
21138
21139    # remove trailing .exe if any
21140    new_path="${new_path/%.exe/}"
21141
21142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21144  fi
21145
21146  else
21147    # We're on a posix platform. Hooray! :)
21148    # First separate the path from the arguments. This will split at the first
21149    # space.
21150    complete="$CXX"
21151    path="${complete%% *}"
21152    tmp="$complete EOL"
21153    arguments="${tmp#* }"
21154
21155    # Cannot rely on the command "which" here since it doesn't always work.
21156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21157    if test -z "$is_absolute_path"; then
21158      # Path to executable is not absolute. Find it.
21159      IFS_save="$IFS"
21160      IFS=:
21161      for p in $PATH; do
21162        if test -f "$p/$path" && test -x "$p/$path"; then
21163          new_path="$p/$path"
21164          break
21165        fi
21166      done
21167      IFS="$IFS_save"
21168    else
21169      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21170$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21171      new_path="$path"
21172    fi
21173
21174    if test "x$new_path" = x; then
21175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21176$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21177        has_space=`$ECHO "$complete" | $GREP " "`
21178        if test "x$has_space" != x; then
21179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21181        fi
21182        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21183      fi
21184  fi
21185
21186      # Now join together the path and the arguments once again
21187      if test "x$arguments" != xEOL; then
21188        new_complete="$new_path ${arguments% *}"
21189      else
21190        new_complete="$new_path"
21191      fi
21192
21193  if test "x$complete" != "x$new_complete"; then
21194      CXX="$new_complete"
21195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21196$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21197    fi
21198
21199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21200$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21201  TEST_COMPILER="$CXX"
21202
21203    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21204        # Follow a chain of symbolic links. Use readlink
21205        # where it exists, else fall back to horribly
21206        # complicated shell code.
21207        if test "x$READLINK_TESTED" != yes; then
21208            # On MacOSX there is a readlink tool with a different
21209            # purpose than the GNU readlink tool. Check the found readlink.
21210            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21211            if test "x$ISGNU" = x; then
21212                 # A readlink that we do not know how to use.
21213                 # Are there other non-GNU readlinks out there?
21214                 READLINK_TESTED=yes
21215                 READLINK=
21216            fi
21217        fi
21218
21219        if test "x$READLINK" != x; then
21220            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21221        else
21222            # Save the current directory for restoring afterwards
21223            STARTDIR=$PWD
21224            COUNTER=0
21225            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21226            sym_link_file=`$BASENAME $TEST_COMPILER`
21227            cd $sym_link_dir
21228            # Use -P flag to resolve symlinks in directories.
21229            cd `$THEPWDCMD -P`
21230            sym_link_dir=`$THEPWDCMD -P`
21231            # Resolve file symlinks
21232            while test $COUNTER -lt 20; do
21233                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21234                if test "x$ISLINK" == x; then
21235                    # This is not a symbolic link! We are done!
21236                    break
21237                fi
21238                # Again resolve directory symlinks since the target of the just found
21239                # link could be in a different directory
21240                cd `$DIRNAME $ISLINK`
21241                sym_link_dir=`$THEPWDCMD -P`
21242                sym_link_file=`$BASENAME $ISLINK`
21243                let COUNTER=COUNTER+1
21244            done
21245            cd $STARTDIR
21246            TEST_COMPILER=$sym_link_dir/$sym_link_file
21247        fi
21248    fi
21249
21250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21251$as_echo "$TEST_COMPILER" >&6; }
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21253$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21254
21255  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21256  if test "x$COMPILER_BASENAME" = "xccache"; then
21257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21258$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21259    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21260    # We want to control ccache invocation ourselves, so ignore this cc and try
21261    # searching again.
21262
21263    # Remove the path to the fake ccache cc from the PATH
21264    RETRY_COMPILER_SAVED_PATH="$PATH"
21265    COMPILER_DIRNAME=`$DIRNAME $CXX`
21266    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21267
21268    # Try again looking for our compiler
21269    if test -n "$ac_tool_prefix"; then
21270  for ac_prog in $COMPILER_CHECK_LIST
21271  do
21272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21275$as_echo_n "checking for $ac_word... " >&6; }
21276if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21277  $as_echo_n "(cached) " >&6
21278else
21279  if test -n "$PROPER_COMPILER_CXX"; then
21280  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21281else
21282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21283for as_dir in $PATH
21284do
21285  IFS=$as_save_IFS
21286  test -z "$as_dir" && as_dir=.
21287    for ac_exec_ext in '' $ac_executable_extensions; do
21288  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21289    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21291    break 2
21292  fi
21293done
21294  done
21295IFS=$as_save_IFS
21296
21297fi
21298fi
21299PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21300if test -n "$PROPER_COMPILER_CXX"; then
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21302$as_echo "$PROPER_COMPILER_CXX" >&6; }
21303else
21304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21305$as_echo "no" >&6; }
21306fi
21307
21308
21309    test -n "$PROPER_COMPILER_CXX" && break
21310  done
21311fi
21312if test -z "$PROPER_COMPILER_CXX"; then
21313  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21314  for ac_prog in $COMPILER_CHECK_LIST
21315do
21316  # Extract the first word of "$ac_prog", so it can be a program name with args.
21317set dummy $ac_prog; ac_word=$2
21318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21319$as_echo_n "checking for $ac_word... " >&6; }
21320if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21321  $as_echo_n "(cached) " >&6
21322else
21323  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21324  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21325else
21326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21327for as_dir in $PATH
21328do
21329  IFS=$as_save_IFS
21330  test -z "$as_dir" && as_dir=.
21331    for ac_exec_ext in '' $ac_executable_extensions; do
21332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21333    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21335    break 2
21336  fi
21337done
21338  done
21339IFS=$as_save_IFS
21340
21341fi
21342fi
21343ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21344if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21346$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21347else
21348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21349$as_echo "no" >&6; }
21350fi
21351
21352
21353  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21354done
21355
21356  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21357    PROPER_COMPILER_CXX=""
21358  else
21359    case $cross_compiling:$ac_tool_warned in
21360yes:)
21361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21363ac_tool_warned=yes ;;
21364esac
21365    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21366  fi
21367fi
21368
21369
21370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21371
21372  # First separate the path from the arguments. This will split at the first
21373  # space.
21374  complete="$PROPER_COMPILER_CXX"
21375  path="${complete%% *}"
21376  tmp="$complete EOL"
21377  arguments="${tmp#* }"
21378
21379  # Input might be given as Windows format, start by converting to
21380  # unix format.
21381  new_path=`$CYGPATH -u "$path"`
21382
21383  # Now try to locate executable using which
21384  new_path=`$WHICH "$new_path" 2> /dev/null`
21385  # bat and cmd files are not always considered executable in cygwin causing which
21386  # to not find them
21387  if test "x$new_path" = x \
21388           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21389           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21390    new_path=`$CYGPATH -u "$path"`
21391  fi
21392  if test "x$new_path" = x; then
21393    # Oops. Which didn't find the executable.
21394    # The splitting of arguments from the executable at a space might have been incorrect,
21395    # since paths with space are more likely in Windows. Give it another try with the whole
21396    # argument.
21397    path="$complete"
21398    arguments="EOL"
21399    new_path=`$CYGPATH -u "$path"`
21400    new_path=`$WHICH "$new_path" 2> /dev/null`
21401    # bat and cmd files are not always considered executable in cygwin causing which
21402    # to not find them
21403    if test "x$new_path" = x \
21404             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21405             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21406      new_path=`$CYGPATH -u "$path"`
21407    fi
21408    if test "x$new_path" = x; then
21409      # It's still not found. Now this is an unrecoverable error.
21410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21411$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21412      has_space=`$ECHO "$complete" | $GREP " "`
21413      if test "x$has_space" != x; then
21414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21416      fi
21417      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21418    fi
21419  fi
21420
21421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21424  # "foo.exe" is OK but "foo" is an error.
21425  #
21426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21427  # It is also a way to make sure we got the proper file name for the real test later on.
21428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21429  if test "x$test_shortpath" = x; then
21430    # Short path failed, file does not exist as specified.
21431    # Try adding .exe or .cmd
21432    if test -f "${new_path}.exe"; then
21433       input_to_shortpath="${new_path}.exe"
21434    elif test -f "${new_path}.cmd"; then
21435       input_to_shortpath="${new_path}.cmd"
21436    else
21437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21438$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21441      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21442    fi
21443  else
21444    input_to_shortpath="$new_path"
21445  fi
21446
21447  # Call helper function which possibly converts this using DOS-style short mode.
21448  # If so, the updated path is stored in $new_path.
21449  new_path="$input_to_shortpath"
21450
21451  input_path="$input_to_shortpath"
21452  # Check if we need to convert this using DOS-style short mode. If the path
21453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21454  # take no chances and rewrite it.
21455  # Note: m4 eats our [], so we need to use [ and ] instead.
21456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21457  if test "x$has_forbidden_chars" != x; then
21458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21462      # Going to short mode and back again did indeed matter. Since short mode is
21463      # case insensitive, let's make it lowercase to improve readability.
21464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21465      # Now convert it back to Unix-stile (cygpath)
21466      input_path=`$CYGPATH -u "$shortmode_path"`
21467      new_path="$input_path"
21468    fi
21469  fi
21470
21471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21472  if test "x$test_cygdrive_prefix" = x; then
21473    # As a simple fix, exclude /usr/bin since it's not a real path.
21474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21476      # a path prefixed by /cygdrive for fixpath to work.
21477      new_path="$CYGWIN_ROOT_PATH$input_path"
21478    fi
21479  fi
21480
21481  # remove trailing .exe if any
21482  new_path="${new_path/%.exe/}"
21483
21484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21485
21486  # First separate the path from the arguments. This will split at the first
21487  # space.
21488  complete="$PROPER_COMPILER_CXX"
21489  path="${complete%% *}"
21490  tmp="$complete EOL"
21491  arguments="${tmp#* }"
21492
21493  # Input might be given as Windows format, start by converting to
21494  # unix format.
21495  new_path="$path"
21496
21497  windows_path="$new_path"
21498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21499    unix_path=`$CYGPATH -u "$windows_path"`
21500    new_path="$unix_path"
21501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21503    new_path="$unix_path"
21504  fi
21505
21506
21507  # Now try to locate executable using which
21508  new_path=`$WHICH "$new_path" 2> /dev/null`
21509
21510  if test "x$new_path" = x; then
21511    # Oops. Which didn't find the executable.
21512    # The splitting of arguments from the executable at a space might have been incorrect,
21513    # since paths with space are more likely in Windows. Give it another try with the whole
21514    # argument.
21515    path="$complete"
21516    arguments="EOL"
21517    new_path="$path"
21518
21519  windows_path="$new_path"
21520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21521    unix_path=`$CYGPATH -u "$windows_path"`
21522    new_path="$unix_path"
21523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21525    new_path="$unix_path"
21526  fi
21527
21528
21529    new_path=`$WHICH "$new_path" 2> /dev/null`
21530
21531    if test "x$new_path" = x; then
21532      # It's still not found. Now this is an unrecoverable error.
21533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21534$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21535      has_space=`$ECHO "$complete" | $GREP " "`
21536      if test "x$has_space" != x; then
21537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21539      fi
21540      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21541    fi
21542  fi
21543
21544  # Now new_path has a complete unix path to the binary
21545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21546    # Keep paths in /bin as-is, but remove trailing .exe if any
21547    new_path="${new_path/%.exe/}"
21548    # Do not save /bin paths to all_fixpath_prefixes!
21549  else
21550    # Not in mixed or Windows style, start by that.
21551    new_path=`cmd //c echo $new_path`
21552
21553  input_path="$new_path"
21554  # Check if we need to convert this using DOS-style short mode. If the path
21555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21556  # take no chances and rewrite it.
21557  # Note: m4 eats our [], so we need to use [ and ] instead.
21558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21559  if test "x$has_forbidden_chars" != x; then
21560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21562  fi
21563
21564    # Output is in $new_path
21565
21566  windows_path="$new_path"
21567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21568    unix_path=`$CYGPATH -u "$windows_path"`
21569    new_path="$unix_path"
21570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21572    new_path="$unix_path"
21573  fi
21574
21575    # remove trailing .exe if any
21576    new_path="${new_path/%.exe/}"
21577
21578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21580  fi
21581
21582  else
21583    # We're on a posix platform. Hooray! :)
21584    # First separate the path from the arguments. This will split at the first
21585    # space.
21586    complete="$PROPER_COMPILER_CXX"
21587    path="${complete%% *}"
21588    tmp="$complete EOL"
21589    arguments="${tmp#* }"
21590
21591    # Cannot rely on the command "which" here since it doesn't always work.
21592    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21593    if test -z "$is_absolute_path"; then
21594      # Path to executable is not absolute. Find it.
21595      IFS_save="$IFS"
21596      IFS=:
21597      for p in $PATH; do
21598        if test -f "$p/$path" && test -x "$p/$path"; then
21599          new_path="$p/$path"
21600          break
21601        fi
21602      done
21603      IFS="$IFS_save"
21604    else
21605      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21606$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21607      new_path="$path"
21608    fi
21609
21610    if test "x$new_path" = x; then
21611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21612$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21613        has_space=`$ECHO "$complete" | $GREP " "`
21614        if test "x$has_space" != x; then
21615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21617        fi
21618        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21619      fi
21620  fi
21621
21622      # Now join together the path and the arguments once again
21623      if test "x$arguments" != xEOL; then
21624        new_complete="$new_path ${arguments% *}"
21625      else
21626        new_complete="$new_path"
21627      fi
21628
21629  if test "x$complete" != "x$new_complete"; then
21630      PROPER_COMPILER_CXX="$new_complete"
21631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21632$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21633    fi
21634
21635    PATH="$RETRY_COMPILER_SAVED_PATH"
21636
21637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21638$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21639
21640    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21641        # Follow a chain of symbolic links. Use readlink
21642        # where it exists, else fall back to horribly
21643        # complicated shell code.
21644        if test "x$READLINK_TESTED" != yes; then
21645            # On MacOSX there is a readlink tool with a different
21646            # purpose than the GNU readlink tool. Check the found readlink.
21647            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21648            if test "x$ISGNU" = x; then
21649                 # A readlink that we do not know how to use.
21650                 # Are there other non-GNU readlinks out there?
21651                 READLINK_TESTED=yes
21652                 READLINK=
21653            fi
21654        fi
21655
21656        if test "x$READLINK" != x; then
21657            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21658        else
21659            # Save the current directory for restoring afterwards
21660            STARTDIR=$PWD
21661            COUNTER=0
21662            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21663            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21664            cd $sym_link_dir
21665            # Use -P flag to resolve symlinks in directories.
21666            cd `$THEPWDCMD -P`
21667            sym_link_dir=`$THEPWDCMD -P`
21668            # Resolve file symlinks
21669            while test $COUNTER -lt 20; do
21670                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21671                if test "x$ISLINK" == x; then
21672                    # This is not a symbolic link! We are done!
21673                    break
21674                fi
21675                # Again resolve directory symlinks since the target of the just found
21676                # link could be in a different directory
21677                cd `$DIRNAME $ISLINK`
21678                sym_link_dir=`$THEPWDCMD -P`
21679                sym_link_file=`$BASENAME $ISLINK`
21680                let COUNTER=COUNTER+1
21681            done
21682            cd $STARTDIR
21683            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21684        fi
21685    fi
21686
21687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21688$as_echo "$PROPER_COMPILER_CXX" >&6; }
21689    CXX="$PROPER_COMPILER_CXX"
21690  else
21691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21692$as_echo "no, keeping CXX" >&6; }
21693    CXX="$TEST_COMPILER"
21694  fi
21695
21696  COMPILER=$CXX
21697  COMPILER_NAME=$COMPILER_NAME
21698
21699  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21700    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21701    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21702    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21703    if test $? -ne 0; then
21704      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21705
21706      { $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
21707$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21708      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21709$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21710      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21711    else
21712      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21713      COMPILER_VENDOR="Sun Studio"
21714    fi
21715  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21716    # First line typically looks something like:
21717    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21718    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21719    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21720    COMPILER_VENDOR="Microsoft CL.EXE"
21721    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21722    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21723      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21724        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21725      fi
21726    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21727      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21728        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21729      fi
21730    fi
21731  else
21732    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21733    # Check that this is likely to be GCC.
21734    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21735    if test $? -ne 0; then
21736      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21737$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21738      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21739$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21740      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21741    fi
21742
21743    # First line typically looks something like:
21744    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21745    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21746    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21747  fi
21748  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21749  CXX_VERSION="$COMPILER_VERSION"
21750  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21751  CXX_VENDOR="$COMPILER_VENDOR"
21752
21753  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21754$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21755
21756
21757# Now that we have resolved CXX ourself, let autoconf have its go at it
21758ac_ext=cpp
21759ac_cpp='$CXXCPP $CPPFLAGS'
21760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21763if test -z "$CXX"; then
21764  if test -n "$CCC"; then
21765    CXX=$CCC
21766  else
21767    if test -n "$ac_tool_prefix"; then
21768  for ac_prog in $CXX
21769  do
21770    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21773$as_echo_n "checking for $ac_word... " >&6; }
21774if test "${ac_cv_prog_CXX+set}" = set; then :
21775  $as_echo_n "(cached) " >&6
21776else
21777  if test -n "$CXX"; then
21778  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21779else
21780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21781for as_dir in $PATH
21782do
21783  IFS=$as_save_IFS
21784  test -z "$as_dir" && as_dir=.
21785    for ac_exec_ext in '' $ac_executable_extensions; do
21786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21787    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21789    break 2
21790  fi
21791done
21792  done
21793IFS=$as_save_IFS
21794
21795fi
21796fi
21797CXX=$ac_cv_prog_CXX
21798if test -n "$CXX"; then
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21800$as_echo "$CXX" >&6; }
21801else
21802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21803$as_echo "no" >&6; }
21804fi
21805
21806
21807    test -n "$CXX" && break
21808  done
21809fi
21810if test -z "$CXX"; then
21811  ac_ct_CXX=$CXX
21812  for ac_prog in $CXX
21813do
21814  # Extract the first word of "$ac_prog", so it can be a program name with args.
21815set dummy $ac_prog; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  if test -n "$ac_ct_CXX"; then
21822  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21823else
21824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21825for as_dir in $PATH
21826do
21827  IFS=$as_save_IFS
21828  test -z "$as_dir" && as_dir=.
21829    for ac_exec_ext in '' $ac_executable_extensions; do
21830  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21831    ac_cv_prog_ac_ct_CXX="$ac_prog"
21832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21833    break 2
21834  fi
21835done
21836  done
21837IFS=$as_save_IFS
21838
21839fi
21840fi
21841ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21842if test -n "$ac_ct_CXX"; then
21843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21844$as_echo "$ac_ct_CXX" >&6; }
21845else
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21847$as_echo "no" >&6; }
21848fi
21849
21850
21851  test -n "$ac_ct_CXX" && break
21852done
21853
21854  if test "x$ac_ct_CXX" = x; then
21855    CXX="g++"
21856  else
21857    case $cross_compiling:$ac_tool_warned in
21858yes:)
21859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21861ac_tool_warned=yes ;;
21862esac
21863    CXX=$ac_ct_CXX
21864  fi
21865fi
21866
21867  fi
21868fi
21869# Provide some information about the compiler.
21870$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21871set X $ac_compile
21872ac_compiler=$2
21873for ac_option in --version -v -V -qversion; do
21874  { { ac_try="$ac_compiler $ac_option >&5"
21875case "(($ac_try" in
21876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21877  *) ac_try_echo=$ac_try;;
21878esac
21879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21880$as_echo "$ac_try_echo"; } >&5
21881  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21882  ac_status=$?
21883  if test -s conftest.err; then
21884    sed '10a\
21885... rest of stderr output deleted ...
21886         10q' conftest.err >conftest.er1
21887    cat conftest.er1 >&5
21888  fi
21889  rm -f conftest.er1 conftest.err
21890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21891  test $ac_status = 0; }
21892done
21893
21894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21895$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21896if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21897  $as_echo_n "(cached) " >&6
21898else
21899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21900/* end confdefs.h.  */
21901
21902int
21903main ()
21904{
21905#ifndef __GNUC__
21906       choke me
21907#endif
21908
21909  ;
21910  return 0;
21911}
21912_ACEOF
21913if ac_fn_cxx_try_compile "$LINENO"; then :
21914  ac_compiler_gnu=yes
21915else
21916  ac_compiler_gnu=no
21917fi
21918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21920
21921fi
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21923$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21924if test $ac_compiler_gnu = yes; then
21925  GXX=yes
21926else
21927  GXX=
21928fi
21929ac_test_CXXFLAGS=${CXXFLAGS+set}
21930ac_save_CXXFLAGS=$CXXFLAGS
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21932$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21933if test "${ac_cv_prog_cxx_g+set}" = set; then :
21934  $as_echo_n "(cached) " >&6
21935else
21936  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21937   ac_cxx_werror_flag=yes
21938   ac_cv_prog_cxx_g=no
21939   CXXFLAGS="-g"
21940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21941/* end confdefs.h.  */
21942
21943int
21944main ()
21945{
21946
21947  ;
21948  return 0;
21949}
21950_ACEOF
21951if ac_fn_cxx_try_compile "$LINENO"; then :
21952  ac_cv_prog_cxx_g=yes
21953else
21954  CXXFLAGS=""
21955      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21956/* end confdefs.h.  */
21957
21958int
21959main ()
21960{
21961
21962  ;
21963  return 0;
21964}
21965_ACEOF
21966if ac_fn_cxx_try_compile "$LINENO"; then :
21967
21968else
21969  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21970	 CXXFLAGS="-g"
21971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21972/* end confdefs.h.  */
21973
21974int
21975main ()
21976{
21977
21978  ;
21979  return 0;
21980}
21981_ACEOF
21982if ac_fn_cxx_try_compile "$LINENO"; then :
21983  ac_cv_prog_cxx_g=yes
21984fi
21985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21986fi
21987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21988fi
21989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21990   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21991fi
21992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21993$as_echo "$ac_cv_prog_cxx_g" >&6; }
21994if test "$ac_test_CXXFLAGS" = set; then
21995  CXXFLAGS=$ac_save_CXXFLAGS
21996elif test $ac_cv_prog_cxx_g = yes; then
21997  if test "$GXX" = yes; then
21998    CXXFLAGS="-g -O2"
21999  else
22000    CXXFLAGS="-g"
22001  fi
22002else
22003  if test "$GXX" = yes; then
22004    CXXFLAGS="-O2"
22005  else
22006    CXXFLAGS=
22007  fi
22008fi
22009ac_ext=cpp
22010ac_cpp='$CXXCPP $CPPFLAGS'
22011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22014
22015
22016### Locate other tools
22017
22018if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22019    ac_ext=m
22020ac_cpp='$OBJCPP $CPPFLAGS'
22021ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22022ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22023ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22024if test -n "$ac_tool_prefix"; then
22025  for ac_prog in gcc objcc objc cc CC
22026  do
22027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22030$as_echo_n "checking for $ac_word... " >&6; }
22031if test "${ac_cv_prog_OBJC+set}" = set; then :
22032  $as_echo_n "(cached) " >&6
22033else
22034  if test -n "$OBJC"; then
22035  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22036else
22037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22038for as_dir in $PATH
22039do
22040  IFS=$as_save_IFS
22041  test -z "$as_dir" && as_dir=.
22042    for ac_exec_ext in '' $ac_executable_extensions; do
22043  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22044    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22046    break 2
22047  fi
22048done
22049  done
22050IFS=$as_save_IFS
22051
22052fi
22053fi
22054OBJC=$ac_cv_prog_OBJC
22055if test -n "$OBJC"; then
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22057$as_echo "$OBJC" >&6; }
22058else
22059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22060$as_echo "no" >&6; }
22061fi
22062
22063
22064    test -n "$OBJC" && break
22065  done
22066fi
22067if test -z "$OBJC"; then
22068  ac_ct_OBJC=$OBJC
22069  for ac_prog in gcc objcc objc cc CC
22070do
22071  # Extract the first word of "$ac_prog", so it can be a program name with args.
22072set dummy $ac_prog; ac_word=$2
22073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22074$as_echo_n "checking for $ac_word... " >&6; }
22075if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
22076  $as_echo_n "(cached) " >&6
22077else
22078  if test -n "$ac_ct_OBJC"; then
22079  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22080else
22081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22082for as_dir in $PATH
22083do
22084  IFS=$as_save_IFS
22085  test -z "$as_dir" && as_dir=.
22086    for ac_exec_ext in '' $ac_executable_extensions; do
22087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22088    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22090    break 2
22091  fi
22092done
22093  done
22094IFS=$as_save_IFS
22095
22096fi
22097fi
22098ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22099if test -n "$ac_ct_OBJC"; then
22100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22101$as_echo "$ac_ct_OBJC" >&6; }
22102else
22103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22104$as_echo "no" >&6; }
22105fi
22106
22107
22108  test -n "$ac_ct_OBJC" && break
22109done
22110
22111  if test "x$ac_ct_OBJC" = x; then
22112    OBJC="gcc"
22113  else
22114    case $cross_compiling:$ac_tool_warned in
22115yes:)
22116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22118ac_tool_warned=yes ;;
22119esac
22120    OBJC=$ac_ct_OBJC
22121  fi
22122fi
22123
22124# Provide some information about the compiler.
22125$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22126set X $ac_compile
22127ac_compiler=$2
22128for ac_option in --version -v -V -qversion; do
22129  { { ac_try="$ac_compiler $ac_option >&5"
22130case "(($ac_try" in
22131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22132  *) ac_try_echo=$ac_try;;
22133esac
22134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22135$as_echo "$ac_try_echo"; } >&5
22136  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22137  ac_status=$?
22138  if test -s conftest.err; then
22139    sed '10a\
22140... rest of stderr output deleted ...
22141         10q' conftest.err >conftest.er1
22142    cat conftest.er1 >&5
22143  fi
22144  rm -f conftest.er1 conftest.err
22145  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22146  test $ac_status = 0; }
22147done
22148
22149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22150$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22151if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
22152  $as_echo_n "(cached) " >&6
22153else
22154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22155/* end confdefs.h.  */
22156
22157int
22158main ()
22159{
22160#ifndef __GNUC__
22161       choke me
22162#endif
22163
22164  ;
22165  return 0;
22166}
22167_ACEOF
22168if ac_fn_objc_try_compile "$LINENO"; then :
22169  ac_compiler_gnu=yes
22170else
22171  ac_compiler_gnu=no
22172fi
22173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22174ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22175
22176fi
22177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22178$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22179if test $ac_compiler_gnu = yes; then
22180  GOBJC=yes
22181else
22182  GOBJC=
22183fi
22184ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22185ac_save_OBJCFLAGS=$OBJCFLAGS
22186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22187$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22188if test "${ac_cv_prog_objc_g+set}" = set; then :
22189  $as_echo_n "(cached) " >&6
22190else
22191  ac_save_objc_werror_flag=$ac_objc_werror_flag
22192   ac_objc_werror_flag=yes
22193   ac_cv_prog_objc_g=no
22194   OBJCFLAGS="-g"
22195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22196/* end confdefs.h.  */
22197
22198int
22199main ()
22200{
22201
22202  ;
22203  return 0;
22204}
22205_ACEOF
22206if ac_fn_objc_try_compile "$LINENO"; then :
22207  ac_cv_prog_objc_g=yes
22208else
22209  OBJCFLAGS=""
22210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22211/* end confdefs.h.  */
22212
22213int
22214main ()
22215{
22216
22217  ;
22218  return 0;
22219}
22220_ACEOF
22221if ac_fn_objc_try_compile "$LINENO"; then :
22222
22223else
22224  ac_objc_werror_flag=$ac_save_objc_werror_flag
22225	 OBJCFLAGS="-g"
22226	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22227/* end confdefs.h.  */
22228
22229int
22230main ()
22231{
22232
22233  ;
22234  return 0;
22235}
22236_ACEOF
22237if ac_fn_objc_try_compile "$LINENO"; then :
22238  ac_cv_prog_objc_g=yes
22239fi
22240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22241fi
22242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22243fi
22244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22245   ac_objc_werror_flag=$ac_save_objc_werror_flag
22246fi
22247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22248$as_echo "$ac_cv_prog_objc_g" >&6; }
22249if test "$ac_test_OBJCFLAGS" = set; then
22250  OBJCFLAGS=$ac_save_OBJCFLAGS
22251elif test $ac_cv_prog_objc_g = yes; then
22252  if test "$GOBJC" = yes; then
22253    OBJCFLAGS="-g -O2"
22254  else
22255    OBJCFLAGS="-g"
22256  fi
22257else
22258  if test "$GOBJC" = yes; then
22259    OBJCFLAGS="-O2"
22260  else
22261    OBJCFLAGS=
22262  fi
22263fi
22264ac_ext=cpp
22265ac_cpp='$CXXCPP $CPPFLAGS'
22266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22269
22270
22271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22272
22273  # First separate the path from the arguments. This will split at the first
22274  # space.
22275  complete="$OBJC"
22276  path="${complete%% *}"
22277  tmp="$complete EOL"
22278  arguments="${tmp#* }"
22279
22280  # Input might be given as Windows format, start by converting to
22281  # unix format.
22282  new_path=`$CYGPATH -u "$path"`
22283
22284  # Now try to locate executable using which
22285  new_path=`$WHICH "$new_path" 2> /dev/null`
22286  # bat and cmd files are not always considered executable in cygwin causing which
22287  # to not find them
22288  if test "x$new_path" = x \
22289           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22290           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22291    new_path=`$CYGPATH -u "$path"`
22292  fi
22293  if test "x$new_path" = x; then
22294    # Oops. Which didn't find the executable.
22295    # The splitting of arguments from the executable at a space might have been incorrect,
22296    # since paths with space are more likely in Windows. Give it another try with the whole
22297    # argument.
22298    path="$complete"
22299    arguments="EOL"
22300    new_path=`$CYGPATH -u "$path"`
22301    new_path=`$WHICH "$new_path" 2> /dev/null`
22302    # bat and cmd files are not always considered executable in cygwin causing which
22303    # to not find them
22304    if test "x$new_path" = x \
22305             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22306             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22307      new_path=`$CYGPATH -u "$path"`
22308    fi
22309    if test "x$new_path" = x; then
22310      # It's still not found. Now this is an unrecoverable error.
22311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22312$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22313      has_space=`$ECHO "$complete" | $GREP " "`
22314      if test "x$has_space" != x; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22317      fi
22318      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22319    fi
22320  fi
22321
22322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22325  # "foo.exe" is OK but "foo" is an error.
22326  #
22327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22328  # It is also a way to make sure we got the proper file name for the real test later on.
22329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22330  if test "x$test_shortpath" = x; then
22331    # Short path failed, file does not exist as specified.
22332    # Try adding .exe or .cmd
22333    if test -f "${new_path}.exe"; then
22334       input_to_shortpath="${new_path}.exe"
22335    elif test -f "${new_path}.cmd"; then
22336       input_to_shortpath="${new_path}.cmd"
22337    else
22338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22339$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22342      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22343    fi
22344  else
22345    input_to_shortpath="$new_path"
22346  fi
22347
22348  # Call helper function which possibly converts this using DOS-style short mode.
22349  # If so, the updated path is stored in $new_path.
22350  new_path="$input_to_shortpath"
22351
22352  input_path="$input_to_shortpath"
22353  # Check if we need to convert this using DOS-style short mode. If the path
22354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22355  # take no chances and rewrite it.
22356  # Note: m4 eats our [], so we need to use [ and ] instead.
22357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22358  if test "x$has_forbidden_chars" != x; then
22359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22363      # Going to short mode and back again did indeed matter. Since short mode is
22364      # case insensitive, let's make it lowercase to improve readability.
22365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22366      # Now convert it back to Unix-stile (cygpath)
22367      input_path=`$CYGPATH -u "$shortmode_path"`
22368      new_path="$input_path"
22369    fi
22370  fi
22371
22372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22373  if test "x$test_cygdrive_prefix" = x; then
22374    # As a simple fix, exclude /usr/bin since it's not a real path.
22375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22377      # a path prefixed by /cygdrive for fixpath to work.
22378      new_path="$CYGWIN_ROOT_PATH$input_path"
22379    fi
22380  fi
22381
22382  # remove trailing .exe if any
22383  new_path="${new_path/%.exe/}"
22384
22385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22386
22387  # First separate the path from the arguments. This will split at the first
22388  # space.
22389  complete="$OBJC"
22390  path="${complete%% *}"
22391  tmp="$complete EOL"
22392  arguments="${tmp#* }"
22393
22394  # Input might be given as Windows format, start by converting to
22395  # unix format.
22396  new_path="$path"
22397
22398  windows_path="$new_path"
22399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22400    unix_path=`$CYGPATH -u "$windows_path"`
22401    new_path="$unix_path"
22402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22404    new_path="$unix_path"
22405  fi
22406
22407
22408  # Now try to locate executable using which
22409  new_path=`$WHICH "$new_path" 2> /dev/null`
22410
22411  if test "x$new_path" = x; then
22412    # Oops. Which didn't find the executable.
22413    # The splitting of arguments from the executable at a space might have been incorrect,
22414    # since paths with space are more likely in Windows. Give it another try with the whole
22415    # argument.
22416    path="$complete"
22417    arguments="EOL"
22418    new_path="$path"
22419
22420  windows_path="$new_path"
22421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22422    unix_path=`$CYGPATH -u "$windows_path"`
22423    new_path="$unix_path"
22424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22426    new_path="$unix_path"
22427  fi
22428
22429
22430    new_path=`$WHICH "$new_path" 2> /dev/null`
22431
22432    if test "x$new_path" = x; then
22433      # It's still not found. Now this is an unrecoverable error.
22434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22435$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22436      has_space=`$ECHO "$complete" | $GREP " "`
22437      if test "x$has_space" != x; then
22438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22440      fi
22441      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22442    fi
22443  fi
22444
22445  # Now new_path has a complete unix path to the binary
22446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22447    # Keep paths in /bin as-is, but remove trailing .exe if any
22448    new_path="${new_path/%.exe/}"
22449    # Do not save /bin paths to all_fixpath_prefixes!
22450  else
22451    # Not in mixed or Windows style, start by that.
22452    new_path=`cmd //c echo $new_path`
22453
22454  input_path="$new_path"
22455  # Check if we need to convert this using DOS-style short mode. If the path
22456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22457  # take no chances and rewrite it.
22458  # Note: m4 eats our [], so we need to use [ and ] instead.
22459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22460  if test "x$has_forbidden_chars" != x; then
22461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22463  fi
22464
22465    # Output is in $new_path
22466
22467  windows_path="$new_path"
22468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22469    unix_path=`$CYGPATH -u "$windows_path"`
22470    new_path="$unix_path"
22471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22473    new_path="$unix_path"
22474  fi
22475
22476    # remove trailing .exe if any
22477    new_path="${new_path/%.exe/}"
22478
22479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22481  fi
22482
22483  else
22484    # We're on a posix platform. Hooray! :)
22485    # First separate the path from the arguments. This will split at the first
22486    # space.
22487    complete="$OBJC"
22488    path="${complete%% *}"
22489    tmp="$complete EOL"
22490    arguments="${tmp#* }"
22491
22492    # Cannot rely on the command "which" here since it doesn't always work.
22493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22494    if test -z "$is_absolute_path"; then
22495      # Path to executable is not absolute. Find it.
22496      IFS_save="$IFS"
22497      IFS=:
22498      for p in $PATH; do
22499        if test -f "$p/$path" && test -x "$p/$path"; then
22500          new_path="$p/$path"
22501          break
22502        fi
22503      done
22504      IFS="$IFS_save"
22505    else
22506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22507$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22508      new_path="$path"
22509    fi
22510
22511    if test "x$new_path" = x; then
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22513$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22514        has_space=`$ECHO "$complete" | $GREP " "`
22515        if test "x$has_space" != x; then
22516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22518        fi
22519        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22520      fi
22521  fi
22522
22523      # Now join together the path and the arguments once again
22524      if test "x$arguments" != xEOL; then
22525        new_complete="$new_path ${arguments% *}"
22526      else
22527        new_complete="$new_path"
22528      fi
22529
22530  if test "x$complete" != "x$new_complete"; then
22531      OBJC="$new_complete"
22532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22533$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22534    fi
22535
22536else
22537    OBJC=
22538fi
22539
22540# Restore the flags to the user specified values.
22541# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22542CFLAGS="$ORG_CFLAGS"
22543CXXFLAGS="$ORG_CXXFLAGS"
22544OBJCFLAGS="$ORG_OBJCFLAGS"
22545
22546LD="$CC"
22547LDEXE="$CC"
22548LDCXX="$CXX"
22549LDEXECXX="$CXX"
22550
22551# LDEXE is the linker to use, when creating executables.
22552
22553# Linking C++ libraries.
22554
22555# Linking C++ executables.
22556
22557
22558if test "x$OPENJDK_TARGET_OS" != xwindows; then
22559    if test -n "$ac_tool_prefix"; then
22560  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22561set dummy ${ac_tool_prefix}ar; ac_word=$2
22562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22563$as_echo_n "checking for $ac_word... " >&6; }
22564if test "${ac_cv_prog_AR+set}" = set; then :
22565  $as_echo_n "(cached) " >&6
22566else
22567  if test -n "$AR"; then
22568  ac_cv_prog_AR="$AR" # Let the user override the test.
22569else
22570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22571for as_dir in $PATH
22572do
22573  IFS=$as_save_IFS
22574  test -z "$as_dir" && as_dir=.
22575    for ac_exec_ext in '' $ac_executable_extensions; do
22576  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22577    ac_cv_prog_AR="${ac_tool_prefix}ar"
22578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22579    break 2
22580  fi
22581done
22582  done
22583IFS=$as_save_IFS
22584
22585fi
22586fi
22587AR=$ac_cv_prog_AR
22588if test -n "$AR"; then
22589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22590$as_echo "$AR" >&6; }
22591else
22592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22593$as_echo "no" >&6; }
22594fi
22595
22596
22597fi
22598if test -z "$ac_cv_prog_AR"; then
22599  ac_ct_AR=$AR
22600  # Extract the first word of "ar", so it can be a program name with args.
22601set dummy ar; ac_word=$2
22602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22603$as_echo_n "checking for $ac_word... " >&6; }
22604if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22605  $as_echo_n "(cached) " >&6
22606else
22607  if test -n "$ac_ct_AR"; then
22608  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22609else
22610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22611for as_dir in $PATH
22612do
22613  IFS=$as_save_IFS
22614  test -z "$as_dir" && as_dir=.
22615    for ac_exec_ext in '' $ac_executable_extensions; do
22616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22617    ac_cv_prog_ac_ct_AR="ar"
22618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22619    break 2
22620  fi
22621done
22622  done
22623IFS=$as_save_IFS
22624
22625fi
22626fi
22627ac_ct_AR=$ac_cv_prog_ac_ct_AR
22628if test -n "$ac_ct_AR"; then
22629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22630$as_echo "$ac_ct_AR" >&6; }
22631else
22632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22633$as_echo "no" >&6; }
22634fi
22635
22636  if test "x$ac_ct_AR" = x; then
22637    AR=""
22638  else
22639    case $cross_compiling:$ac_tool_warned in
22640yes:)
22641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22643ac_tool_warned=yes ;;
22644esac
22645    AR=$ac_ct_AR
22646  fi
22647else
22648  AR="$ac_cv_prog_AR"
22649fi
22650
22651
22652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22653
22654  # First separate the path from the arguments. This will split at the first
22655  # space.
22656  complete="$AR"
22657  path="${complete%% *}"
22658  tmp="$complete EOL"
22659  arguments="${tmp#* }"
22660
22661  # Input might be given as Windows format, start by converting to
22662  # unix format.
22663  new_path=`$CYGPATH -u "$path"`
22664
22665  # Now try to locate executable using which
22666  new_path=`$WHICH "$new_path" 2> /dev/null`
22667  # bat and cmd files are not always considered executable in cygwin causing which
22668  # to not find them
22669  if test "x$new_path" = x \
22670           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22671           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22672    new_path=`$CYGPATH -u "$path"`
22673  fi
22674  if test "x$new_path" = x; then
22675    # Oops. Which didn't find the executable.
22676    # The splitting of arguments from the executable at a space might have been incorrect,
22677    # since paths with space are more likely in Windows. Give it another try with the whole
22678    # argument.
22679    path="$complete"
22680    arguments="EOL"
22681    new_path=`$CYGPATH -u "$path"`
22682    new_path=`$WHICH "$new_path" 2> /dev/null`
22683    # bat and cmd files are not always considered executable in cygwin causing which
22684    # to not find them
22685    if test "x$new_path" = x \
22686             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22687             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22688      new_path=`$CYGPATH -u "$path"`
22689    fi
22690    if test "x$new_path" = x; then
22691      # It's still not found. Now this is an unrecoverable error.
22692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22693$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22694      has_space=`$ECHO "$complete" | $GREP " "`
22695      if test "x$has_space" != x; then
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22698      fi
22699      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22700    fi
22701  fi
22702
22703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22706  # "foo.exe" is OK but "foo" is an error.
22707  #
22708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22709  # It is also a way to make sure we got the proper file name for the real test later on.
22710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22711  if test "x$test_shortpath" = x; then
22712    # Short path failed, file does not exist as specified.
22713    # Try adding .exe or .cmd
22714    if test -f "${new_path}.exe"; then
22715       input_to_shortpath="${new_path}.exe"
22716    elif test -f "${new_path}.cmd"; then
22717       input_to_shortpath="${new_path}.cmd"
22718    else
22719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22720$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22723      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22724    fi
22725  else
22726    input_to_shortpath="$new_path"
22727  fi
22728
22729  # Call helper function which possibly converts this using DOS-style short mode.
22730  # If so, the updated path is stored in $new_path.
22731  new_path="$input_to_shortpath"
22732
22733  input_path="$input_to_shortpath"
22734  # Check if we need to convert this using DOS-style short mode. If the path
22735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22736  # take no chances and rewrite it.
22737  # Note: m4 eats our [], so we need to use [ and ] instead.
22738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22739  if test "x$has_forbidden_chars" != x; then
22740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22744      # Going to short mode and back again did indeed matter. Since short mode is
22745      # case insensitive, let's make it lowercase to improve readability.
22746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22747      # Now convert it back to Unix-stile (cygpath)
22748      input_path=`$CYGPATH -u "$shortmode_path"`
22749      new_path="$input_path"
22750    fi
22751  fi
22752
22753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22754  if test "x$test_cygdrive_prefix" = x; then
22755    # As a simple fix, exclude /usr/bin since it's not a real path.
22756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22758      # a path prefixed by /cygdrive for fixpath to work.
22759      new_path="$CYGWIN_ROOT_PATH$input_path"
22760    fi
22761  fi
22762
22763  # remove trailing .exe if any
22764  new_path="${new_path/%.exe/}"
22765
22766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22767
22768  # First separate the path from the arguments. This will split at the first
22769  # space.
22770  complete="$AR"
22771  path="${complete%% *}"
22772  tmp="$complete EOL"
22773  arguments="${tmp#* }"
22774
22775  # Input might be given as Windows format, start by converting to
22776  # unix format.
22777  new_path="$path"
22778
22779  windows_path="$new_path"
22780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781    unix_path=`$CYGPATH -u "$windows_path"`
22782    new_path="$unix_path"
22783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22785    new_path="$unix_path"
22786  fi
22787
22788
22789  # Now try to locate executable using which
22790  new_path=`$WHICH "$new_path" 2> /dev/null`
22791
22792  if test "x$new_path" = x; then
22793    # Oops. Which didn't find the executable.
22794    # The splitting of arguments from the executable at a space might have been incorrect,
22795    # since paths with space are more likely in Windows. Give it another try with the whole
22796    # argument.
22797    path="$complete"
22798    arguments="EOL"
22799    new_path="$path"
22800
22801  windows_path="$new_path"
22802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22803    unix_path=`$CYGPATH -u "$windows_path"`
22804    new_path="$unix_path"
22805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22807    new_path="$unix_path"
22808  fi
22809
22810
22811    new_path=`$WHICH "$new_path" 2> /dev/null`
22812
22813    if test "x$new_path" = x; then
22814      # It's still not found. Now this is an unrecoverable error.
22815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22816$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22817      has_space=`$ECHO "$complete" | $GREP " "`
22818      if test "x$has_space" != x; then
22819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22821      fi
22822      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22823    fi
22824  fi
22825
22826  # Now new_path has a complete unix path to the binary
22827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22828    # Keep paths in /bin as-is, but remove trailing .exe if any
22829    new_path="${new_path/%.exe/}"
22830    # Do not save /bin paths to all_fixpath_prefixes!
22831  else
22832    # Not in mixed or Windows style, start by that.
22833    new_path=`cmd //c echo $new_path`
22834
22835  input_path="$new_path"
22836  # Check if we need to convert this using DOS-style short mode. If the path
22837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22838  # take no chances and rewrite it.
22839  # Note: m4 eats our [], so we need to use [ and ] instead.
22840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22841  if test "x$has_forbidden_chars" != x; then
22842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22844  fi
22845
22846    # Output is in $new_path
22847
22848  windows_path="$new_path"
22849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22850    unix_path=`$CYGPATH -u "$windows_path"`
22851    new_path="$unix_path"
22852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22854    new_path="$unix_path"
22855  fi
22856
22857    # remove trailing .exe if any
22858    new_path="${new_path/%.exe/}"
22859
22860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22862  fi
22863
22864  else
22865    # We're on a posix platform. Hooray! :)
22866    # First separate the path from the arguments. This will split at the first
22867    # space.
22868    complete="$AR"
22869    path="${complete%% *}"
22870    tmp="$complete EOL"
22871    arguments="${tmp#* }"
22872
22873    # Cannot rely on the command "which" here since it doesn't always work.
22874    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22875    if test -z "$is_absolute_path"; then
22876      # Path to executable is not absolute. Find it.
22877      IFS_save="$IFS"
22878      IFS=:
22879      for p in $PATH; do
22880        if test -f "$p/$path" && test -x "$p/$path"; then
22881          new_path="$p/$path"
22882          break
22883        fi
22884      done
22885      IFS="$IFS_save"
22886    else
22887      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22888$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22889      new_path="$path"
22890    fi
22891
22892    if test "x$new_path" = x; then
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22894$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22895        has_space=`$ECHO "$complete" | $GREP " "`
22896        if test "x$has_space" != x; then
22897          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22899        fi
22900        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22901      fi
22902  fi
22903
22904      # Now join together the path and the arguments once again
22905      if test "x$arguments" != xEOL; then
22906        new_complete="$new_path ${arguments% *}"
22907      else
22908        new_complete="$new_path"
22909      fi
22910
22911  if test "x$complete" != "x$new_complete"; then
22912      AR="$new_complete"
22913      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22914$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22915    fi
22916
22917fi
22918if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22919    ARFLAGS="-r"
22920else
22921    ARFLAGS=""
22922fi
22923
22924
22925# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22926HOTSPOT_CXX="$CXX"
22927HOTSPOT_LD="$LD"
22928
22929
22930
22931COMPILER_NAME=gcc
22932COMPILER_TYPE=CC
22933if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22934
22935    # For now, assume that we are always compiling using cl.exe.
22936    CC_OUT_OPTION=-Fo
22937    EXE_OUT_OPTION=-out:
22938    LD_OUT_OPTION=-out:
22939    AR_OUT_OPTION=-out:
22940    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22941    # program for something completely different.
22942    # Extract the first word of "link", so it can be a program name with args.
22943set dummy link; ac_word=$2
22944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22945$as_echo_n "checking for $ac_word... " >&6; }
22946if test "${ac_cv_prog_WINLD+set}" = set; then :
22947  $as_echo_n "(cached) " >&6
22948else
22949  if test -n "$WINLD"; then
22950  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22951else
22952  ac_prog_rejected=no
22953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22954for as_dir in $PATH
22955do
22956  IFS=$as_save_IFS
22957  test -z "$as_dir" && as_dir=.
22958    for ac_exec_ext in '' $ac_executable_extensions; do
22959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22960    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22961       ac_prog_rejected=yes
22962       continue
22963     fi
22964    ac_cv_prog_WINLD="link"
22965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22966    break 2
22967  fi
22968done
22969  done
22970IFS=$as_save_IFS
22971
22972if test $ac_prog_rejected = yes; then
22973  # We found a bogon in the path, so make sure we never use it.
22974  set dummy $ac_cv_prog_WINLD
22975  shift
22976  if test $# != 0; then
22977    # We chose a different compiler from the bogus one.
22978    # However, it has the same basename, so the bogon will be chosen
22979    # first if we set WINLD to just the basename; use the full file name.
22980    shift
22981    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22982  fi
22983fi
22984fi
22985fi
22986WINLD=$ac_cv_prog_WINLD
22987if test -n "$WINLD"; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22989$as_echo "$WINLD" >&6; }
22990else
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22992$as_echo "no" >&6; }
22993fi
22994
22995
22996    # Since we must ignore the first found link, WINLD will contain
22997    # the full path to the link.exe program.
22998
22999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23000
23001  # First separate the path from the arguments. This will split at the first
23002  # space.
23003  complete="$WINLD"
23004  path="${complete%% *}"
23005  tmp="$complete EOL"
23006  arguments="${tmp#* }"
23007
23008  # Input might be given as Windows format, start by converting to
23009  # unix format.
23010  new_path=`$CYGPATH -u "$path"`
23011
23012  # Now try to locate executable using which
23013  new_path=`$WHICH "$new_path" 2> /dev/null`
23014  # bat and cmd files are not always considered executable in cygwin causing which
23015  # to not find them
23016  if test "x$new_path" = x \
23017           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23018           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23019    new_path=`$CYGPATH -u "$path"`
23020  fi
23021  if test "x$new_path" = x; then
23022    # Oops. Which didn't find the executable.
23023    # The splitting of arguments from the executable at a space might have been incorrect,
23024    # since paths with space are more likely in Windows. Give it another try with the whole
23025    # argument.
23026    path="$complete"
23027    arguments="EOL"
23028    new_path=`$CYGPATH -u "$path"`
23029    new_path=`$WHICH "$new_path" 2> /dev/null`
23030    # bat and cmd files are not always considered executable in cygwin causing which
23031    # to not find them
23032    if test "x$new_path" = x \
23033             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23034             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23035      new_path=`$CYGPATH -u "$path"`
23036    fi
23037    if test "x$new_path" = x; then
23038      # It's still not found. Now this is an unrecoverable error.
23039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23040$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23041      has_space=`$ECHO "$complete" | $GREP " "`
23042      if test "x$has_space" != x; then
23043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23045      fi
23046      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23047    fi
23048  fi
23049
23050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23053  # "foo.exe" is OK but "foo" is an error.
23054  #
23055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23056  # It is also a way to make sure we got the proper file name for the real test later on.
23057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23058  if test "x$test_shortpath" = x; then
23059    # Short path failed, file does not exist as specified.
23060    # Try adding .exe or .cmd
23061    if test -f "${new_path}.exe"; then
23062       input_to_shortpath="${new_path}.exe"
23063    elif test -f "${new_path}.cmd"; then
23064       input_to_shortpath="${new_path}.cmd"
23065    else
23066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23067$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23070      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23071    fi
23072  else
23073    input_to_shortpath="$new_path"
23074  fi
23075
23076  # Call helper function which possibly converts this using DOS-style short mode.
23077  # If so, the updated path is stored in $new_path.
23078  new_path="$input_to_shortpath"
23079
23080  input_path="$input_to_shortpath"
23081  # Check if we need to convert this using DOS-style short mode. If the path
23082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23083  # take no chances and rewrite it.
23084  # Note: m4 eats our [], so we need to use [ and ] instead.
23085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23086  if test "x$has_forbidden_chars" != x; then
23087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23091      # Going to short mode and back again did indeed matter. Since short mode is
23092      # case insensitive, let's make it lowercase to improve readability.
23093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23094      # Now convert it back to Unix-stile (cygpath)
23095      input_path=`$CYGPATH -u "$shortmode_path"`
23096      new_path="$input_path"
23097    fi
23098  fi
23099
23100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23101  if test "x$test_cygdrive_prefix" = x; then
23102    # As a simple fix, exclude /usr/bin since it's not a real path.
23103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23105      # a path prefixed by /cygdrive for fixpath to work.
23106      new_path="$CYGWIN_ROOT_PATH$input_path"
23107    fi
23108  fi
23109
23110  # remove trailing .exe if any
23111  new_path="${new_path/%.exe/}"
23112
23113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23114
23115  # First separate the path from the arguments. This will split at the first
23116  # space.
23117  complete="$WINLD"
23118  path="${complete%% *}"
23119  tmp="$complete EOL"
23120  arguments="${tmp#* }"
23121
23122  # Input might be given as Windows format, start by converting to
23123  # unix format.
23124  new_path="$path"
23125
23126  windows_path="$new_path"
23127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23128    unix_path=`$CYGPATH -u "$windows_path"`
23129    new_path="$unix_path"
23130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23132    new_path="$unix_path"
23133  fi
23134
23135
23136  # Now try to locate executable using which
23137  new_path=`$WHICH "$new_path" 2> /dev/null`
23138
23139  if test "x$new_path" = x; then
23140    # Oops. Which didn't find the executable.
23141    # The splitting of arguments from the executable at a space might have been incorrect,
23142    # since paths with space are more likely in Windows. Give it another try with the whole
23143    # argument.
23144    path="$complete"
23145    arguments="EOL"
23146    new_path="$path"
23147
23148  windows_path="$new_path"
23149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23150    unix_path=`$CYGPATH -u "$windows_path"`
23151    new_path="$unix_path"
23152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23154    new_path="$unix_path"
23155  fi
23156
23157
23158    new_path=`$WHICH "$new_path" 2> /dev/null`
23159
23160    if test "x$new_path" = x; then
23161      # It's still not found. Now this is an unrecoverable error.
23162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23163$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23164      has_space=`$ECHO "$complete" | $GREP " "`
23165      if test "x$has_space" != x; then
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23168      fi
23169      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23170    fi
23171  fi
23172
23173  # Now new_path has a complete unix path to the binary
23174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23175    # Keep paths in /bin as-is, but remove trailing .exe if any
23176    new_path="${new_path/%.exe/}"
23177    # Do not save /bin paths to all_fixpath_prefixes!
23178  else
23179    # Not in mixed or Windows style, start by that.
23180    new_path=`cmd //c echo $new_path`
23181
23182  input_path="$new_path"
23183  # Check if we need to convert this using DOS-style short mode. If the path
23184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23185  # take no chances and rewrite it.
23186  # Note: m4 eats our [], so we need to use [ and ] instead.
23187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23188  if test "x$has_forbidden_chars" != x; then
23189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23191  fi
23192
23193    # Output is in $new_path
23194
23195  windows_path="$new_path"
23196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23197    unix_path=`$CYGPATH -u "$windows_path"`
23198    new_path="$unix_path"
23199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23201    new_path="$unix_path"
23202  fi
23203
23204    # remove trailing .exe if any
23205    new_path="${new_path/%.exe/}"
23206
23207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23209  fi
23210
23211  else
23212    # We're on a posix platform. Hooray! :)
23213    # First separate the path from the arguments. This will split at the first
23214    # space.
23215    complete="$WINLD"
23216    path="${complete%% *}"
23217    tmp="$complete EOL"
23218    arguments="${tmp#* }"
23219
23220    # Cannot rely on the command "which" here since it doesn't always work.
23221    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23222    if test -z "$is_absolute_path"; then
23223      # Path to executable is not absolute. Find it.
23224      IFS_save="$IFS"
23225      IFS=:
23226      for p in $PATH; do
23227        if test -f "$p/$path" && test -x "$p/$path"; then
23228          new_path="$p/$path"
23229          break
23230        fi
23231      done
23232      IFS="$IFS_save"
23233    else
23234      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23235$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23236      new_path="$path"
23237    fi
23238
23239    if test "x$new_path" = x; then
23240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23241$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23242        has_space=`$ECHO "$complete" | $GREP " "`
23243        if test "x$has_space" != x; then
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23246        fi
23247        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23248      fi
23249  fi
23250
23251      # Now join together the path and the arguments once again
23252      if test "x$arguments" != xEOL; then
23253        new_complete="$new_path ${arguments% *}"
23254      else
23255        new_complete="$new_path"
23256      fi
23257
23258  if test "x$complete" != "x$new_complete"; then
23259      WINLD="$new_complete"
23260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23261$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23262    fi
23263
23264    printf "Windows linker was found at $WINLD\n"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23266$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23267    "$WINLD" --version > /dev/null
23268    if test $? -eq 0 ; then
23269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23270$as_echo "no" >&6; }
23271      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23272    else
23273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23274$as_echo "yes" >&6; }
23275    fi
23276    LD="$WINLD"
23277    LDEXE="$WINLD"
23278    LDCXX="$WINLD"
23279    LDEXECXX="$WINLD"
23280
23281    # Extract the first word of "mt", so it can be a program name with args.
23282set dummy mt; ac_word=$2
23283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23284$as_echo_n "checking for $ac_word... " >&6; }
23285if test "${ac_cv_prog_MT+set}" = set; then :
23286  $as_echo_n "(cached) " >&6
23287else
23288  if test -n "$MT"; then
23289  ac_cv_prog_MT="$MT" # Let the user override the test.
23290else
23291  ac_prog_rejected=no
23292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23293for as_dir in $PATH
23294do
23295  IFS=$as_save_IFS
23296  test -z "$as_dir" && as_dir=.
23297    for ac_exec_ext in '' $ac_executable_extensions; do
23298  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23299    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23300       ac_prog_rejected=yes
23301       continue
23302     fi
23303    ac_cv_prog_MT="mt"
23304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23305    break 2
23306  fi
23307done
23308  done
23309IFS=$as_save_IFS
23310
23311if test $ac_prog_rejected = yes; then
23312  # We found a bogon in the path, so make sure we never use it.
23313  set dummy $ac_cv_prog_MT
23314  shift
23315  if test $# != 0; then
23316    # We chose a different compiler from the bogus one.
23317    # However, it has the same basename, so the bogon will be chosen
23318    # first if we set MT to just the basename; use the full file name.
23319    shift
23320    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23321  fi
23322fi
23323fi
23324fi
23325MT=$ac_cv_prog_MT
23326if test -n "$MT"; then
23327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23328$as_echo "$MT" >&6; }
23329else
23330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23331$as_echo "no" >&6; }
23332fi
23333
23334
23335
23336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23337
23338  # First separate the path from the arguments. This will split at the first
23339  # space.
23340  complete="$MT"
23341  path="${complete%% *}"
23342  tmp="$complete EOL"
23343  arguments="${tmp#* }"
23344
23345  # Input might be given as Windows format, start by converting to
23346  # unix format.
23347  new_path=`$CYGPATH -u "$path"`
23348
23349  # Now try to locate executable using which
23350  new_path=`$WHICH "$new_path" 2> /dev/null`
23351  # bat and cmd files are not always considered executable in cygwin causing which
23352  # to not find them
23353  if test "x$new_path" = x \
23354           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23355           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23356    new_path=`$CYGPATH -u "$path"`
23357  fi
23358  if test "x$new_path" = x; then
23359    # Oops. Which didn't find the executable.
23360    # The splitting of arguments from the executable at a space might have been incorrect,
23361    # since paths with space are more likely in Windows. Give it another try with the whole
23362    # argument.
23363    path="$complete"
23364    arguments="EOL"
23365    new_path=`$CYGPATH -u "$path"`
23366    new_path=`$WHICH "$new_path" 2> /dev/null`
23367    # bat and cmd files are not always considered executable in cygwin causing which
23368    # to not find them
23369    if test "x$new_path" = x \
23370             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23371             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23372      new_path=`$CYGPATH -u "$path"`
23373    fi
23374    if test "x$new_path" = x; then
23375      # It's still not found. Now this is an unrecoverable error.
23376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23377$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23378      has_space=`$ECHO "$complete" | $GREP " "`
23379      if test "x$has_space" != x; then
23380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23382      fi
23383      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23384    fi
23385  fi
23386
23387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23390  # "foo.exe" is OK but "foo" is an error.
23391  #
23392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23393  # It is also a way to make sure we got the proper file name for the real test later on.
23394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23395  if test "x$test_shortpath" = x; then
23396    # Short path failed, file does not exist as specified.
23397    # Try adding .exe or .cmd
23398    if test -f "${new_path}.exe"; then
23399       input_to_shortpath="${new_path}.exe"
23400    elif test -f "${new_path}.cmd"; then
23401       input_to_shortpath="${new_path}.cmd"
23402    else
23403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23404$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23407      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23408    fi
23409  else
23410    input_to_shortpath="$new_path"
23411  fi
23412
23413  # Call helper function which possibly converts this using DOS-style short mode.
23414  # If so, the updated path is stored in $new_path.
23415  new_path="$input_to_shortpath"
23416
23417  input_path="$input_to_shortpath"
23418  # Check if we need to convert this using DOS-style short mode. If the path
23419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23420  # take no chances and rewrite it.
23421  # Note: m4 eats our [], so we need to use [ and ] instead.
23422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23423  if test "x$has_forbidden_chars" != x; then
23424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23428      # Going to short mode and back again did indeed matter. Since short mode is
23429      # case insensitive, let's make it lowercase to improve readability.
23430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23431      # Now convert it back to Unix-stile (cygpath)
23432      input_path=`$CYGPATH -u "$shortmode_path"`
23433      new_path="$input_path"
23434    fi
23435  fi
23436
23437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23438  if test "x$test_cygdrive_prefix" = x; then
23439    # As a simple fix, exclude /usr/bin since it's not a real path.
23440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23442      # a path prefixed by /cygdrive for fixpath to work.
23443      new_path="$CYGWIN_ROOT_PATH$input_path"
23444    fi
23445  fi
23446
23447  # remove trailing .exe if any
23448  new_path="${new_path/%.exe/}"
23449
23450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23451
23452  # First separate the path from the arguments. This will split at the first
23453  # space.
23454  complete="$MT"
23455  path="${complete%% *}"
23456  tmp="$complete EOL"
23457  arguments="${tmp#* }"
23458
23459  # Input might be given as Windows format, start by converting to
23460  # unix format.
23461  new_path="$path"
23462
23463  windows_path="$new_path"
23464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23465    unix_path=`$CYGPATH -u "$windows_path"`
23466    new_path="$unix_path"
23467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23469    new_path="$unix_path"
23470  fi
23471
23472
23473  # Now try to locate executable using which
23474  new_path=`$WHICH "$new_path" 2> /dev/null`
23475
23476  if test "x$new_path" = x; then
23477    # Oops. Which didn't find the executable.
23478    # The splitting of arguments from the executable at a space might have been incorrect,
23479    # since paths with space are more likely in Windows. Give it another try with the whole
23480    # argument.
23481    path="$complete"
23482    arguments="EOL"
23483    new_path="$path"
23484
23485  windows_path="$new_path"
23486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487    unix_path=`$CYGPATH -u "$windows_path"`
23488    new_path="$unix_path"
23489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23491    new_path="$unix_path"
23492  fi
23493
23494
23495    new_path=`$WHICH "$new_path" 2> /dev/null`
23496
23497    if test "x$new_path" = x; then
23498      # It's still not found. Now this is an unrecoverable error.
23499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23500$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23501      has_space=`$ECHO "$complete" | $GREP " "`
23502      if test "x$has_space" != x; then
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23505      fi
23506      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23507    fi
23508  fi
23509
23510  # Now new_path has a complete unix path to the binary
23511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23512    # Keep paths in /bin as-is, but remove trailing .exe if any
23513    new_path="${new_path/%.exe/}"
23514    # Do not save /bin paths to all_fixpath_prefixes!
23515  else
23516    # Not in mixed or Windows style, start by that.
23517    new_path=`cmd //c echo $new_path`
23518
23519  input_path="$new_path"
23520  # Check if we need to convert this using DOS-style short mode. If the path
23521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23522  # take no chances and rewrite it.
23523  # Note: m4 eats our [], so we need to use [ and ] instead.
23524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23525  if test "x$has_forbidden_chars" != x; then
23526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23528  fi
23529
23530    # Output is in $new_path
23531
23532  windows_path="$new_path"
23533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23534    unix_path=`$CYGPATH -u "$windows_path"`
23535    new_path="$unix_path"
23536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23538    new_path="$unix_path"
23539  fi
23540
23541    # remove trailing .exe if any
23542    new_path="${new_path/%.exe/}"
23543
23544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23546  fi
23547
23548  else
23549    # We're on a posix platform. Hooray! :)
23550    # First separate the path from the arguments. This will split at the first
23551    # space.
23552    complete="$MT"
23553    path="${complete%% *}"
23554    tmp="$complete EOL"
23555    arguments="${tmp#* }"
23556
23557    # Cannot rely on the command "which" here since it doesn't always work.
23558    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23559    if test -z "$is_absolute_path"; then
23560      # Path to executable is not absolute. Find it.
23561      IFS_save="$IFS"
23562      IFS=:
23563      for p in $PATH; do
23564        if test -f "$p/$path" && test -x "$p/$path"; then
23565          new_path="$p/$path"
23566          break
23567        fi
23568      done
23569      IFS="$IFS_save"
23570    else
23571      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23572$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23573      new_path="$path"
23574    fi
23575
23576    if test "x$new_path" = x; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23578$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23579        has_space=`$ECHO "$complete" | $GREP " "`
23580        if test "x$has_space" != x; then
23581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23583        fi
23584        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23585      fi
23586  fi
23587
23588      # Now join together the path and the arguments once again
23589      if test "x$arguments" != xEOL; then
23590        new_complete="$new_path ${arguments% *}"
23591      else
23592        new_complete="$new_path"
23593      fi
23594
23595  if test "x$complete" != "x$new_complete"; then
23596      MT="$new_complete"
23597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23598$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23599    fi
23600
23601    # The resource compiler
23602    # Extract the first word of "rc", so it can be a program name with args.
23603set dummy rc; ac_word=$2
23604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23605$as_echo_n "checking for $ac_word... " >&6; }
23606if test "${ac_cv_prog_RC+set}" = set; then :
23607  $as_echo_n "(cached) " >&6
23608else
23609  if test -n "$RC"; then
23610  ac_cv_prog_RC="$RC" # Let the user override the test.
23611else
23612  ac_prog_rejected=no
23613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23614for as_dir in $PATH
23615do
23616  IFS=$as_save_IFS
23617  test -z "$as_dir" && as_dir=.
23618    for ac_exec_ext in '' $ac_executable_extensions; do
23619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23620    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23621       ac_prog_rejected=yes
23622       continue
23623     fi
23624    ac_cv_prog_RC="rc"
23625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23626    break 2
23627  fi
23628done
23629  done
23630IFS=$as_save_IFS
23631
23632if test $ac_prog_rejected = yes; then
23633  # We found a bogon in the path, so make sure we never use it.
23634  set dummy $ac_cv_prog_RC
23635  shift
23636  if test $# != 0; then
23637    # We chose a different compiler from the bogus one.
23638    # However, it has the same basename, so the bogon will be chosen
23639    # first if we set RC to just the basename; use the full file name.
23640    shift
23641    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23642  fi
23643fi
23644fi
23645fi
23646RC=$ac_cv_prog_RC
23647if test -n "$RC"; then
23648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23649$as_echo "$RC" >&6; }
23650else
23651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23652$as_echo "no" >&6; }
23653fi
23654
23655
23656
23657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658
23659  # First separate the path from the arguments. This will split at the first
23660  # space.
23661  complete="$RC"
23662  path="${complete%% *}"
23663  tmp="$complete EOL"
23664  arguments="${tmp#* }"
23665
23666  # Input might be given as Windows format, start by converting to
23667  # unix format.
23668  new_path=`$CYGPATH -u "$path"`
23669
23670  # Now try to locate executable using which
23671  new_path=`$WHICH "$new_path" 2> /dev/null`
23672  # bat and cmd files are not always considered executable in cygwin causing which
23673  # to not find them
23674  if test "x$new_path" = x \
23675           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23676           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23677    new_path=`$CYGPATH -u "$path"`
23678  fi
23679  if test "x$new_path" = x; then
23680    # Oops. Which didn't find the executable.
23681    # The splitting of arguments from the executable at a space might have been incorrect,
23682    # since paths with space are more likely in Windows. Give it another try with the whole
23683    # argument.
23684    path="$complete"
23685    arguments="EOL"
23686    new_path=`$CYGPATH -u "$path"`
23687    new_path=`$WHICH "$new_path" 2> /dev/null`
23688    # bat and cmd files are not always considered executable in cygwin causing which
23689    # to not find them
23690    if test "x$new_path" = x \
23691             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23692             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23693      new_path=`$CYGPATH -u "$path"`
23694    fi
23695    if test "x$new_path" = x; then
23696      # It's still not found. Now this is an unrecoverable error.
23697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23698$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23699      has_space=`$ECHO "$complete" | $GREP " "`
23700      if test "x$has_space" != x; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23703      fi
23704      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23705    fi
23706  fi
23707
23708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23711  # "foo.exe" is OK but "foo" is an error.
23712  #
23713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23714  # It is also a way to make sure we got the proper file name for the real test later on.
23715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23716  if test "x$test_shortpath" = x; then
23717    # Short path failed, file does not exist as specified.
23718    # Try adding .exe or .cmd
23719    if test -f "${new_path}.exe"; then
23720       input_to_shortpath="${new_path}.exe"
23721    elif test -f "${new_path}.cmd"; then
23722       input_to_shortpath="${new_path}.cmd"
23723    else
23724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23725$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23728      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23729    fi
23730  else
23731    input_to_shortpath="$new_path"
23732  fi
23733
23734  # Call helper function which possibly converts this using DOS-style short mode.
23735  # If so, the updated path is stored in $new_path.
23736  new_path="$input_to_shortpath"
23737
23738  input_path="$input_to_shortpath"
23739  # Check if we need to convert this using DOS-style short mode. If the path
23740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23741  # take no chances and rewrite it.
23742  # Note: m4 eats our [], so we need to use [ and ] instead.
23743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23744  if test "x$has_forbidden_chars" != x; then
23745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23749      # Going to short mode and back again did indeed matter. Since short mode is
23750      # case insensitive, let's make it lowercase to improve readability.
23751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23752      # Now convert it back to Unix-stile (cygpath)
23753      input_path=`$CYGPATH -u "$shortmode_path"`
23754      new_path="$input_path"
23755    fi
23756  fi
23757
23758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23759  if test "x$test_cygdrive_prefix" = x; then
23760    # As a simple fix, exclude /usr/bin since it's not a real path.
23761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23763      # a path prefixed by /cygdrive for fixpath to work.
23764      new_path="$CYGWIN_ROOT_PATH$input_path"
23765    fi
23766  fi
23767
23768  # remove trailing .exe if any
23769  new_path="${new_path/%.exe/}"
23770
23771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23772
23773  # First separate the path from the arguments. This will split at the first
23774  # space.
23775  complete="$RC"
23776  path="${complete%% *}"
23777  tmp="$complete EOL"
23778  arguments="${tmp#* }"
23779
23780  # Input might be given as Windows format, start by converting to
23781  # unix format.
23782  new_path="$path"
23783
23784  windows_path="$new_path"
23785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23786    unix_path=`$CYGPATH -u "$windows_path"`
23787    new_path="$unix_path"
23788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23790    new_path="$unix_path"
23791  fi
23792
23793
23794  # Now try to locate executable using which
23795  new_path=`$WHICH "$new_path" 2> /dev/null`
23796
23797  if test "x$new_path" = x; then
23798    # Oops. Which didn't find the executable.
23799    # The splitting of arguments from the executable at a space might have been incorrect,
23800    # since paths with space are more likely in Windows. Give it another try with the whole
23801    # argument.
23802    path="$complete"
23803    arguments="EOL"
23804    new_path="$path"
23805
23806  windows_path="$new_path"
23807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808    unix_path=`$CYGPATH -u "$windows_path"`
23809    new_path="$unix_path"
23810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23812    new_path="$unix_path"
23813  fi
23814
23815
23816    new_path=`$WHICH "$new_path" 2> /dev/null`
23817
23818    if test "x$new_path" = x; then
23819      # It's still not found. Now this is an unrecoverable error.
23820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23821$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23822      has_space=`$ECHO "$complete" | $GREP " "`
23823      if test "x$has_space" != x; then
23824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23826      fi
23827      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23828    fi
23829  fi
23830
23831  # Now new_path has a complete unix path to the binary
23832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23833    # Keep paths in /bin as-is, but remove trailing .exe if any
23834    new_path="${new_path/%.exe/}"
23835    # Do not save /bin paths to all_fixpath_prefixes!
23836  else
23837    # Not in mixed or Windows style, start by that.
23838    new_path=`cmd //c echo $new_path`
23839
23840  input_path="$new_path"
23841  # Check if we need to convert this using DOS-style short mode. If the path
23842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23843  # take no chances and rewrite it.
23844  # Note: m4 eats our [], so we need to use [ and ] instead.
23845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23846  if test "x$has_forbidden_chars" != x; then
23847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23849  fi
23850
23851    # Output is in $new_path
23852
23853  windows_path="$new_path"
23854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23855    unix_path=`$CYGPATH -u "$windows_path"`
23856    new_path="$unix_path"
23857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23859    new_path="$unix_path"
23860  fi
23861
23862    # remove trailing .exe if any
23863    new_path="${new_path/%.exe/}"
23864
23865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23867  fi
23868
23869  else
23870    # We're on a posix platform. Hooray! :)
23871    # First separate the path from the arguments. This will split at the first
23872    # space.
23873    complete="$RC"
23874    path="${complete%% *}"
23875    tmp="$complete EOL"
23876    arguments="${tmp#* }"
23877
23878    # Cannot rely on the command "which" here since it doesn't always work.
23879    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23880    if test -z "$is_absolute_path"; then
23881      # Path to executable is not absolute. Find it.
23882      IFS_save="$IFS"
23883      IFS=:
23884      for p in $PATH; do
23885        if test -f "$p/$path" && test -x "$p/$path"; then
23886          new_path="$p/$path"
23887          break
23888        fi
23889      done
23890      IFS="$IFS_save"
23891    else
23892      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23893$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23894      new_path="$path"
23895    fi
23896
23897    if test "x$new_path" = x; then
23898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23899$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23900        has_space=`$ECHO "$complete" | $GREP " "`
23901        if test "x$has_space" != x; then
23902          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23904        fi
23905        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23906      fi
23907  fi
23908
23909      # Now join together the path and the arguments once again
23910      if test "x$arguments" != xEOL; then
23911        new_complete="$new_path ${arguments% *}"
23912      else
23913        new_complete="$new_path"
23914      fi
23915
23916  if test "x$complete" != "x$new_complete"; then
23917      RC="$new_complete"
23918      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23919$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23920    fi
23921
23922
23923    # For hotspot, we need these in Windows mixed path,
23924    # so rewrite them all. Need added .exe suffix.
23925    HOTSPOT_CXX="$CXX.exe"
23926    HOTSPOT_LD="$LD.exe"
23927    HOTSPOT_MT="$MT.exe"
23928    HOTSPOT_RC="$RC.exe"
23929
23930  unix_path="$HOTSPOT_CXX"
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932    windows_path=`$CYGPATH -m "$unix_path"`
23933    HOTSPOT_CXX="$windows_path"
23934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935    windows_path=`cmd //c echo $unix_path`
23936    HOTSPOT_CXX="$windows_path"
23937  fi
23938
23939
23940  unix_path="$HOTSPOT_LD"
23941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942    windows_path=`$CYGPATH -m "$unix_path"`
23943    HOTSPOT_LD="$windows_path"
23944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945    windows_path=`cmd //c echo $unix_path`
23946    HOTSPOT_LD="$windows_path"
23947  fi
23948
23949
23950  unix_path="$HOTSPOT_MT"
23951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952    windows_path=`$CYGPATH -m "$unix_path"`
23953    HOTSPOT_MT="$windows_path"
23954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955    windows_path=`cmd //c echo $unix_path`
23956    HOTSPOT_MT="$windows_path"
23957  fi
23958
23959
23960  unix_path="$HOTSPOT_RC"
23961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23962    windows_path=`$CYGPATH -m "$unix_path"`
23963    HOTSPOT_RC="$windows_path"
23964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23965    windows_path=`cmd //c echo $unix_path`
23966    HOTSPOT_RC="$windows_path"
23967  fi
23968
23969
23970
23971
23972    RC_FLAGS="-nologo -l 0x409 -r"
23973    if test "x$VARIANT" = xOPT; then :
23974
23975        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23976
23977fi
23978
23979    # The version variables used to create RC_FLAGS may be overridden
23980    # in a custom configure script, or possibly the command line.
23981    # Let those variables be expanded at make time in spec.gmk.
23982    # The \$ are escaped to the shell, and the $(...) variables
23983    # are evaluated by make.
23984    RC_FLAGS="$RC_FLAGS \
23985        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23986        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23987        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23988        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23989        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23990        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23991        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23992
23993    # lib.exe is used to create static libraries.
23994    # Extract the first word of "lib", so it can be a program name with args.
23995set dummy lib; ac_word=$2
23996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23997$as_echo_n "checking for $ac_word... " >&6; }
23998if test "${ac_cv_prog_WINAR+set}" = set; then :
23999  $as_echo_n "(cached) " >&6
24000else
24001  if test -n "$WINAR"; then
24002  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24003else
24004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24005for as_dir in $PATH
24006do
24007  IFS=$as_save_IFS
24008  test -z "$as_dir" && as_dir=.
24009    for ac_exec_ext in '' $ac_executable_extensions; do
24010  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24011    ac_cv_prog_WINAR="lib"
24012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24013    break 2
24014  fi
24015done
24016  done
24017IFS=$as_save_IFS
24018
24019fi
24020fi
24021WINAR=$ac_cv_prog_WINAR
24022if test -n "$WINAR"; then
24023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24024$as_echo "$WINAR" >&6; }
24025else
24026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24027$as_echo "no" >&6; }
24028fi
24029
24030
24031
24032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24033
24034  # First separate the path from the arguments. This will split at the first
24035  # space.
24036  complete="$WINAR"
24037  path="${complete%% *}"
24038  tmp="$complete EOL"
24039  arguments="${tmp#* }"
24040
24041  # Input might be given as Windows format, start by converting to
24042  # unix format.
24043  new_path=`$CYGPATH -u "$path"`
24044
24045  # Now try to locate executable using which
24046  new_path=`$WHICH "$new_path" 2> /dev/null`
24047  # bat and cmd files are not always considered executable in cygwin causing which
24048  # to not find them
24049  if test "x$new_path" = x \
24050           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24051           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24052    new_path=`$CYGPATH -u "$path"`
24053  fi
24054  if test "x$new_path" = x; then
24055    # Oops. Which didn't find the executable.
24056    # The splitting of arguments from the executable at a space might have been incorrect,
24057    # since paths with space are more likely in Windows. Give it another try with the whole
24058    # argument.
24059    path="$complete"
24060    arguments="EOL"
24061    new_path=`$CYGPATH -u "$path"`
24062    new_path=`$WHICH "$new_path" 2> /dev/null`
24063    # bat and cmd files are not always considered executable in cygwin causing which
24064    # to not find them
24065    if test "x$new_path" = x \
24066             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24067             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24068      new_path=`$CYGPATH -u "$path"`
24069    fi
24070    if test "x$new_path" = x; then
24071      # It's still not found. Now this is an unrecoverable error.
24072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24073$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24074      has_space=`$ECHO "$complete" | $GREP " "`
24075      if test "x$has_space" != x; then
24076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24078      fi
24079      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24080    fi
24081  fi
24082
24083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24086  # "foo.exe" is OK but "foo" is an error.
24087  #
24088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24089  # It is also a way to make sure we got the proper file name for the real test later on.
24090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24091  if test "x$test_shortpath" = x; then
24092    # Short path failed, file does not exist as specified.
24093    # Try adding .exe or .cmd
24094    if test -f "${new_path}.exe"; then
24095       input_to_shortpath="${new_path}.exe"
24096    elif test -f "${new_path}.cmd"; then
24097       input_to_shortpath="${new_path}.cmd"
24098    else
24099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24100$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24101      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24102$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24103      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24104    fi
24105  else
24106    input_to_shortpath="$new_path"
24107  fi
24108
24109  # Call helper function which possibly converts this using DOS-style short mode.
24110  # If so, the updated path is stored in $new_path.
24111  new_path="$input_to_shortpath"
24112
24113  input_path="$input_to_shortpath"
24114  # Check if we need to convert this using DOS-style short mode. If the path
24115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24116  # take no chances and rewrite it.
24117  # Note: m4 eats our [], so we need to use [ and ] instead.
24118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24119  if test "x$has_forbidden_chars" != x; then
24120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24124      # Going to short mode and back again did indeed matter. Since short mode is
24125      # case insensitive, let's make it lowercase to improve readability.
24126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24127      # Now convert it back to Unix-stile (cygpath)
24128      input_path=`$CYGPATH -u "$shortmode_path"`
24129      new_path="$input_path"
24130    fi
24131  fi
24132
24133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24134  if test "x$test_cygdrive_prefix" = x; then
24135    # As a simple fix, exclude /usr/bin since it's not a real path.
24136    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24138      # a path prefixed by /cygdrive for fixpath to work.
24139      new_path="$CYGWIN_ROOT_PATH$input_path"
24140    fi
24141  fi
24142
24143  # remove trailing .exe if any
24144  new_path="${new_path/%.exe/}"
24145
24146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147
24148  # First separate the path from the arguments. This will split at the first
24149  # space.
24150  complete="$WINAR"
24151  path="${complete%% *}"
24152  tmp="$complete EOL"
24153  arguments="${tmp#* }"
24154
24155  # Input might be given as Windows format, start by converting to
24156  # unix format.
24157  new_path="$path"
24158
24159  windows_path="$new_path"
24160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161    unix_path=`$CYGPATH -u "$windows_path"`
24162    new_path="$unix_path"
24163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24165    new_path="$unix_path"
24166  fi
24167
24168
24169  # Now try to locate executable using which
24170  new_path=`$WHICH "$new_path" 2> /dev/null`
24171
24172  if test "x$new_path" = x; then
24173    # Oops. Which didn't find the executable.
24174    # The splitting of arguments from the executable at a space might have been incorrect,
24175    # since paths with space are more likely in Windows. Give it another try with the whole
24176    # argument.
24177    path="$complete"
24178    arguments="EOL"
24179    new_path="$path"
24180
24181  windows_path="$new_path"
24182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24183    unix_path=`$CYGPATH -u "$windows_path"`
24184    new_path="$unix_path"
24185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24187    new_path="$unix_path"
24188  fi
24189
24190
24191    new_path=`$WHICH "$new_path" 2> /dev/null`
24192
24193    if test "x$new_path" = x; then
24194      # It's still not found. Now this is an unrecoverable error.
24195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24196$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24197      has_space=`$ECHO "$complete" | $GREP " "`
24198      if test "x$has_space" != x; then
24199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24201      fi
24202      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24203    fi
24204  fi
24205
24206  # Now new_path has a complete unix path to the binary
24207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24208    # Keep paths in /bin as-is, but remove trailing .exe if any
24209    new_path="${new_path/%.exe/}"
24210    # Do not save /bin paths to all_fixpath_prefixes!
24211  else
24212    # Not in mixed or Windows style, start by that.
24213    new_path=`cmd //c echo $new_path`
24214
24215  input_path="$new_path"
24216  # Check if we need to convert this using DOS-style short mode. If the path
24217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24218  # take no chances and rewrite it.
24219  # Note: m4 eats our [], so we need to use [ and ] instead.
24220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24221  if test "x$has_forbidden_chars" != x; then
24222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24224  fi
24225
24226    # Output is in $new_path
24227
24228  windows_path="$new_path"
24229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24230    unix_path=`$CYGPATH -u "$windows_path"`
24231    new_path="$unix_path"
24232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24234    new_path="$unix_path"
24235  fi
24236
24237    # remove trailing .exe if any
24238    new_path="${new_path/%.exe/}"
24239
24240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24242  fi
24243
24244  else
24245    # We're on a posix platform. Hooray! :)
24246    # First separate the path from the arguments. This will split at the first
24247    # space.
24248    complete="$WINAR"
24249    path="${complete%% *}"
24250    tmp="$complete EOL"
24251    arguments="${tmp#* }"
24252
24253    # Cannot rely on the command "which" here since it doesn't always work.
24254    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24255    if test -z "$is_absolute_path"; then
24256      # Path to executable is not absolute. Find it.
24257      IFS_save="$IFS"
24258      IFS=:
24259      for p in $PATH; do
24260        if test -f "$p/$path" && test -x "$p/$path"; then
24261          new_path="$p/$path"
24262          break
24263        fi
24264      done
24265      IFS="$IFS_save"
24266    else
24267      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24268$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24269      new_path="$path"
24270    fi
24271
24272    if test "x$new_path" = x; then
24273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24274$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24275        has_space=`$ECHO "$complete" | $GREP " "`
24276        if test "x$has_space" != x; then
24277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24279        fi
24280        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24281      fi
24282  fi
24283
24284      # Now join together the path and the arguments once again
24285      if test "x$arguments" != xEOL; then
24286        new_complete="$new_path ${arguments% *}"
24287      else
24288        new_complete="$new_path"
24289      fi
24290
24291  if test "x$complete" != "x$new_complete"; then
24292      WINAR="$new_complete"
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24294$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24295    fi
24296
24297    AR="$WINAR"
24298    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24299
24300    # Extract the first word of "dumpbin", so it can be a program name with args.
24301set dummy dumpbin; ac_word=$2
24302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24303$as_echo_n "checking for $ac_word... " >&6; }
24304if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24305  $as_echo_n "(cached) " >&6
24306else
24307  if test -n "$DUMPBIN"; then
24308  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24309else
24310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24311for as_dir in $PATH
24312do
24313  IFS=$as_save_IFS
24314  test -z "$as_dir" && as_dir=.
24315    for ac_exec_ext in '' $ac_executable_extensions; do
24316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24317    ac_cv_prog_DUMPBIN="dumpbin"
24318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24319    break 2
24320  fi
24321done
24322  done
24323IFS=$as_save_IFS
24324
24325fi
24326fi
24327DUMPBIN=$ac_cv_prog_DUMPBIN
24328if test -n "$DUMPBIN"; then
24329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24330$as_echo "$DUMPBIN" >&6; }
24331else
24332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24333$as_echo "no" >&6; }
24334fi
24335
24336
24337
24338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24339
24340  # First separate the path from the arguments. This will split at the first
24341  # space.
24342  complete="$DUMPBIN"
24343  path="${complete%% *}"
24344  tmp="$complete EOL"
24345  arguments="${tmp#* }"
24346
24347  # Input might be given as Windows format, start by converting to
24348  # unix format.
24349  new_path=`$CYGPATH -u "$path"`
24350
24351  # Now try to locate executable using which
24352  new_path=`$WHICH "$new_path" 2> /dev/null`
24353  # bat and cmd files are not always considered executable in cygwin causing which
24354  # to not find them
24355  if test "x$new_path" = x \
24356           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24357           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24358    new_path=`$CYGPATH -u "$path"`
24359  fi
24360  if test "x$new_path" = x; then
24361    # Oops. Which didn't find the executable.
24362    # The splitting of arguments from the executable at a space might have been incorrect,
24363    # since paths with space are more likely in Windows. Give it another try with the whole
24364    # argument.
24365    path="$complete"
24366    arguments="EOL"
24367    new_path=`$CYGPATH -u "$path"`
24368    new_path=`$WHICH "$new_path" 2> /dev/null`
24369    # bat and cmd files are not always considered executable in cygwin causing which
24370    # to not find them
24371    if test "x$new_path" = x \
24372             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24373             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24374      new_path=`$CYGPATH -u "$path"`
24375    fi
24376    if test "x$new_path" = x; then
24377      # It's still not found. Now this is an unrecoverable error.
24378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24379$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24380      has_space=`$ECHO "$complete" | $GREP " "`
24381      if test "x$has_space" != x; then
24382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24384      fi
24385      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24386    fi
24387  fi
24388
24389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24392  # "foo.exe" is OK but "foo" is an error.
24393  #
24394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24395  # It is also a way to make sure we got the proper file name for the real test later on.
24396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24397  if test "x$test_shortpath" = x; then
24398    # Short path failed, file does not exist as specified.
24399    # Try adding .exe or .cmd
24400    if test -f "${new_path}.exe"; then
24401       input_to_shortpath="${new_path}.exe"
24402    elif test -f "${new_path}.cmd"; then
24403       input_to_shortpath="${new_path}.cmd"
24404    else
24405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24406$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24409      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24410    fi
24411  else
24412    input_to_shortpath="$new_path"
24413  fi
24414
24415  # Call helper function which possibly converts this using DOS-style short mode.
24416  # If so, the updated path is stored in $new_path.
24417  new_path="$input_to_shortpath"
24418
24419  input_path="$input_to_shortpath"
24420  # Check if we need to convert this using DOS-style short mode. If the path
24421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24422  # take no chances and rewrite it.
24423  # Note: m4 eats our [], so we need to use [ and ] instead.
24424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24425  if test "x$has_forbidden_chars" != x; then
24426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24430      # Going to short mode and back again did indeed matter. Since short mode is
24431      # case insensitive, let's make it lowercase to improve readability.
24432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24433      # Now convert it back to Unix-stile (cygpath)
24434      input_path=`$CYGPATH -u "$shortmode_path"`
24435      new_path="$input_path"
24436    fi
24437  fi
24438
24439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24440  if test "x$test_cygdrive_prefix" = x; then
24441    # As a simple fix, exclude /usr/bin since it's not a real path.
24442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24444      # a path prefixed by /cygdrive for fixpath to work.
24445      new_path="$CYGWIN_ROOT_PATH$input_path"
24446    fi
24447  fi
24448
24449  # remove trailing .exe if any
24450  new_path="${new_path/%.exe/}"
24451
24452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24453
24454  # First separate the path from the arguments. This will split at the first
24455  # space.
24456  complete="$DUMPBIN"
24457  path="${complete%% *}"
24458  tmp="$complete EOL"
24459  arguments="${tmp#* }"
24460
24461  # Input might be given as Windows format, start by converting to
24462  # unix format.
24463  new_path="$path"
24464
24465  windows_path="$new_path"
24466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24467    unix_path=`$CYGPATH -u "$windows_path"`
24468    new_path="$unix_path"
24469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24471    new_path="$unix_path"
24472  fi
24473
24474
24475  # Now try to locate executable using which
24476  new_path=`$WHICH "$new_path" 2> /dev/null`
24477
24478  if test "x$new_path" = x; then
24479    # Oops. Which didn't find the executable.
24480    # The splitting of arguments from the executable at a space might have been incorrect,
24481    # since paths with space are more likely in Windows. Give it another try with the whole
24482    # argument.
24483    path="$complete"
24484    arguments="EOL"
24485    new_path="$path"
24486
24487  windows_path="$new_path"
24488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24489    unix_path=`$CYGPATH -u "$windows_path"`
24490    new_path="$unix_path"
24491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24493    new_path="$unix_path"
24494  fi
24495
24496
24497    new_path=`$WHICH "$new_path" 2> /dev/null`
24498
24499    if test "x$new_path" = x; then
24500      # It's still not found. Now this is an unrecoverable error.
24501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24502$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24503      has_space=`$ECHO "$complete" | $GREP " "`
24504      if test "x$has_space" != x; then
24505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24507      fi
24508      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24509    fi
24510  fi
24511
24512  # Now new_path has a complete unix path to the binary
24513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24514    # Keep paths in /bin as-is, but remove trailing .exe if any
24515    new_path="${new_path/%.exe/}"
24516    # Do not save /bin paths to all_fixpath_prefixes!
24517  else
24518    # Not in mixed or Windows style, start by that.
24519    new_path=`cmd //c echo $new_path`
24520
24521  input_path="$new_path"
24522  # Check if we need to convert this using DOS-style short mode. If the path
24523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24524  # take no chances and rewrite it.
24525  # Note: m4 eats our [], so we need to use [ and ] instead.
24526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24527  if test "x$has_forbidden_chars" != x; then
24528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24530  fi
24531
24532    # Output is in $new_path
24533
24534  windows_path="$new_path"
24535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536    unix_path=`$CYGPATH -u "$windows_path"`
24537    new_path="$unix_path"
24538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24540    new_path="$unix_path"
24541  fi
24542
24543    # remove trailing .exe if any
24544    new_path="${new_path/%.exe/}"
24545
24546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24548  fi
24549
24550  else
24551    # We're on a posix platform. Hooray! :)
24552    # First separate the path from the arguments. This will split at the first
24553    # space.
24554    complete="$DUMPBIN"
24555    path="${complete%% *}"
24556    tmp="$complete EOL"
24557    arguments="${tmp#* }"
24558
24559    # Cannot rely on the command "which" here since it doesn't always work.
24560    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24561    if test -z "$is_absolute_path"; then
24562      # Path to executable is not absolute. Find it.
24563      IFS_save="$IFS"
24564      IFS=:
24565      for p in $PATH; do
24566        if test -f "$p/$path" && test -x "$p/$path"; then
24567          new_path="$p/$path"
24568          break
24569        fi
24570      done
24571      IFS="$IFS_save"
24572    else
24573      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24574$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24575      new_path="$path"
24576    fi
24577
24578    if test "x$new_path" = x; then
24579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24580$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24581        has_space=`$ECHO "$complete" | $GREP " "`
24582        if test "x$has_space" != x; then
24583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24585        fi
24586        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24587      fi
24588  fi
24589
24590      # Now join together the path and the arguments once again
24591      if test "x$arguments" != xEOL; then
24592        new_complete="$new_path ${arguments% *}"
24593      else
24594        new_complete="$new_path"
24595      fi
24596
24597  if test "x$complete" != "x$new_complete"; then
24598      DUMPBIN="$new_complete"
24599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24600$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24601    fi
24602
24603
24604    COMPILER_TYPE=CL
24605    CCXXFLAGS="$CCXXFLAGS -nologo"
24606
24607fi
24608
24609
24610
24611ac_ext=c
24612ac_cpp='$CPP $CPPFLAGS'
24613ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24614ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24615ac_compiler_gnu=$ac_cv_c_compiler_gnu
24616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24617$as_echo_n "checking how to run the C preprocessor... " >&6; }
24618# On Suns, sometimes $CPP names a directory.
24619if test -n "$CPP" && test -d "$CPP"; then
24620  CPP=
24621fi
24622if test -z "$CPP"; then
24623  if test "${ac_cv_prog_CPP+set}" = set; then :
24624  $as_echo_n "(cached) " >&6
24625else
24626      # Double quotes because CPP needs to be expanded
24627    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24628    do
24629      ac_preproc_ok=false
24630for ac_c_preproc_warn_flag in '' yes
24631do
24632  # Use a header file that comes with gcc, so configuring glibc
24633  # with a fresh cross-compiler works.
24634  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24635  # <limits.h> exists even on freestanding compilers.
24636  # On the NeXT, cc -E runs the code through the compiler's parser,
24637  # not just through cpp. "Syntax error" is here to catch this case.
24638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24639/* end confdefs.h.  */
24640#ifdef __STDC__
24641# include <limits.h>
24642#else
24643# include <assert.h>
24644#endif
24645		     Syntax error
24646_ACEOF
24647if ac_fn_c_try_cpp "$LINENO"; then :
24648
24649else
24650  # Broken: fails on valid input.
24651continue
24652fi
24653rm -f conftest.err conftest.i conftest.$ac_ext
24654
24655  # OK, works on sane cases.  Now check whether nonexistent headers
24656  # can be detected and how.
24657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h.  */
24659#include <ac_nonexistent.h>
24660_ACEOF
24661if ac_fn_c_try_cpp "$LINENO"; then :
24662  # Broken: success on invalid input.
24663continue
24664else
24665  # Passes both tests.
24666ac_preproc_ok=:
24667break
24668fi
24669rm -f conftest.err conftest.i conftest.$ac_ext
24670
24671done
24672# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24673rm -f conftest.i conftest.err conftest.$ac_ext
24674if $ac_preproc_ok; then :
24675  break
24676fi
24677
24678    done
24679    ac_cv_prog_CPP=$CPP
24680
24681fi
24682  CPP=$ac_cv_prog_CPP
24683else
24684  ac_cv_prog_CPP=$CPP
24685fi
24686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24687$as_echo "$CPP" >&6; }
24688ac_preproc_ok=false
24689for ac_c_preproc_warn_flag in '' yes
24690do
24691  # Use a header file that comes with gcc, so configuring glibc
24692  # with a fresh cross-compiler works.
24693  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24694  # <limits.h> exists even on freestanding compilers.
24695  # On the NeXT, cc -E runs the code through the compiler's parser,
24696  # not just through cpp. "Syntax error" is here to catch this case.
24697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24698/* end confdefs.h.  */
24699#ifdef __STDC__
24700# include <limits.h>
24701#else
24702# include <assert.h>
24703#endif
24704		     Syntax error
24705_ACEOF
24706if ac_fn_c_try_cpp "$LINENO"; then :
24707
24708else
24709  # Broken: fails on valid input.
24710continue
24711fi
24712rm -f conftest.err conftest.i conftest.$ac_ext
24713
24714  # OK, works on sane cases.  Now check whether nonexistent headers
24715  # can be detected and how.
24716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24717/* end confdefs.h.  */
24718#include <ac_nonexistent.h>
24719_ACEOF
24720if ac_fn_c_try_cpp "$LINENO"; then :
24721  # Broken: success on invalid input.
24722continue
24723else
24724  # Passes both tests.
24725ac_preproc_ok=:
24726break
24727fi
24728rm -f conftest.err conftest.i conftest.$ac_ext
24729
24730done
24731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24732rm -f conftest.i conftest.err conftest.$ac_ext
24733if $ac_preproc_ok; then :
24734
24735else
24736  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24738as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24739See \`config.log' for more details" "$LINENO" 5 ; }
24740fi
24741
24742ac_ext=cpp
24743ac_cpp='$CXXCPP $CPPFLAGS'
24744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24747
24748
24749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24750
24751  # First separate the path from the arguments. This will split at the first
24752  # space.
24753  complete="$CPP"
24754  path="${complete%% *}"
24755  tmp="$complete EOL"
24756  arguments="${tmp#* }"
24757
24758  # Input might be given as Windows format, start by converting to
24759  # unix format.
24760  new_path=`$CYGPATH -u "$path"`
24761
24762  # Now try to locate executable using which
24763  new_path=`$WHICH "$new_path" 2> /dev/null`
24764  # bat and cmd files are not always considered executable in cygwin causing which
24765  # to not find them
24766  if test "x$new_path" = x \
24767           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24768           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24769    new_path=`$CYGPATH -u "$path"`
24770  fi
24771  if test "x$new_path" = x; then
24772    # Oops. Which didn't find the executable.
24773    # The splitting of arguments from the executable at a space might have been incorrect,
24774    # since paths with space are more likely in Windows. Give it another try with the whole
24775    # argument.
24776    path="$complete"
24777    arguments="EOL"
24778    new_path=`$CYGPATH -u "$path"`
24779    new_path=`$WHICH "$new_path" 2> /dev/null`
24780    # bat and cmd files are not always considered executable in cygwin causing which
24781    # to not find them
24782    if test "x$new_path" = x \
24783             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24784             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24785      new_path=`$CYGPATH -u "$path"`
24786    fi
24787    if test "x$new_path" = x; then
24788      # It's still not found. Now this is an unrecoverable error.
24789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24790$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24791      has_space=`$ECHO "$complete" | $GREP " "`
24792      if test "x$has_space" != x; then
24793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24795      fi
24796      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24797    fi
24798  fi
24799
24800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24803  # "foo.exe" is OK but "foo" is an error.
24804  #
24805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24806  # It is also a way to make sure we got the proper file name for the real test later on.
24807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24808  if test "x$test_shortpath" = x; then
24809    # Short path failed, file does not exist as specified.
24810    # Try adding .exe or .cmd
24811    if test -f "${new_path}.exe"; then
24812       input_to_shortpath="${new_path}.exe"
24813    elif test -f "${new_path}.cmd"; then
24814       input_to_shortpath="${new_path}.cmd"
24815    else
24816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24817$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24820      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24821    fi
24822  else
24823    input_to_shortpath="$new_path"
24824  fi
24825
24826  # Call helper function which possibly converts this using DOS-style short mode.
24827  # If so, the updated path is stored in $new_path.
24828  new_path="$input_to_shortpath"
24829
24830  input_path="$input_to_shortpath"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24841      # Going to short mode and back again did indeed matter. Since short mode is
24842      # case insensitive, let's make it lowercase to improve readability.
24843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844      # Now convert it back to Unix-stile (cygpath)
24845      input_path=`$CYGPATH -u "$shortmode_path"`
24846      new_path="$input_path"
24847    fi
24848  fi
24849
24850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24851  if test "x$test_cygdrive_prefix" = x; then
24852    # As a simple fix, exclude /usr/bin since it's not a real path.
24853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24855      # a path prefixed by /cygdrive for fixpath to work.
24856      new_path="$CYGWIN_ROOT_PATH$input_path"
24857    fi
24858  fi
24859
24860  # remove trailing .exe if any
24861  new_path="${new_path/%.exe/}"
24862
24863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24864
24865  # First separate the path from the arguments. This will split at the first
24866  # space.
24867  complete="$CPP"
24868  path="${complete%% *}"
24869  tmp="$complete EOL"
24870  arguments="${tmp#* }"
24871
24872  # Input might be given as Windows format, start by converting to
24873  # unix format.
24874  new_path="$path"
24875
24876  windows_path="$new_path"
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878    unix_path=`$CYGPATH -u "$windows_path"`
24879    new_path="$unix_path"
24880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24882    new_path="$unix_path"
24883  fi
24884
24885
24886  # Now try to locate executable using which
24887  new_path=`$WHICH "$new_path" 2> /dev/null`
24888
24889  if test "x$new_path" = x; then
24890    # Oops. Which didn't find the executable.
24891    # The splitting of arguments from the executable at a space might have been incorrect,
24892    # since paths with space are more likely in Windows. Give it another try with the whole
24893    # argument.
24894    path="$complete"
24895    arguments="EOL"
24896    new_path="$path"
24897
24898  windows_path="$new_path"
24899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24900    unix_path=`$CYGPATH -u "$windows_path"`
24901    new_path="$unix_path"
24902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24904    new_path="$unix_path"
24905  fi
24906
24907
24908    new_path=`$WHICH "$new_path" 2> /dev/null`
24909
24910    if test "x$new_path" = x; then
24911      # It's still not found. Now this is an unrecoverable error.
24912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24913$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24914      has_space=`$ECHO "$complete" | $GREP " "`
24915      if test "x$has_space" != x; then
24916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24918      fi
24919      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24920    fi
24921  fi
24922
24923  # Now new_path has a complete unix path to the binary
24924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24925    # Keep paths in /bin as-is, but remove trailing .exe if any
24926    new_path="${new_path/%.exe/}"
24927    # Do not save /bin paths to all_fixpath_prefixes!
24928  else
24929    # Not in mixed or Windows style, start by that.
24930    new_path=`cmd //c echo $new_path`
24931
24932  input_path="$new_path"
24933  # Check if we need to convert this using DOS-style short mode. If the path
24934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24935  # take no chances and rewrite it.
24936  # Note: m4 eats our [], so we need to use [ and ] instead.
24937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24938  if test "x$has_forbidden_chars" != x; then
24939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24941  fi
24942
24943    # Output is in $new_path
24944
24945  windows_path="$new_path"
24946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24947    unix_path=`$CYGPATH -u "$windows_path"`
24948    new_path="$unix_path"
24949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24951    new_path="$unix_path"
24952  fi
24953
24954    # remove trailing .exe if any
24955    new_path="${new_path/%.exe/}"
24956
24957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24959  fi
24960
24961  else
24962    # We're on a posix platform. Hooray! :)
24963    # First separate the path from the arguments. This will split at the first
24964    # space.
24965    complete="$CPP"
24966    path="${complete%% *}"
24967    tmp="$complete EOL"
24968    arguments="${tmp#* }"
24969
24970    # Cannot rely on the command "which" here since it doesn't always work.
24971    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24972    if test -z "$is_absolute_path"; then
24973      # Path to executable is not absolute. Find it.
24974      IFS_save="$IFS"
24975      IFS=:
24976      for p in $PATH; do
24977        if test -f "$p/$path" && test -x "$p/$path"; then
24978          new_path="$p/$path"
24979          break
24980        fi
24981      done
24982      IFS="$IFS_save"
24983    else
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24985$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24986      new_path="$path"
24987    fi
24988
24989    if test "x$new_path" = x; then
24990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24991$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24992        has_space=`$ECHO "$complete" | $GREP " "`
24993        if test "x$has_space" != x; then
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24996        fi
24997        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24998      fi
24999  fi
25000
25001      # Now join together the path and the arguments once again
25002      if test "x$arguments" != xEOL; then
25003        new_complete="$new_path ${arguments% *}"
25004      else
25005        new_complete="$new_path"
25006      fi
25007
25008  if test "x$complete" != "x$new_complete"; then
25009      CPP="$new_complete"
25010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25011$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25012    fi
25013
25014
25015ac_ext=cpp
25016ac_cpp='$CXXCPP $CPPFLAGS'
25017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25021$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25022if test -z "$CXXCPP"; then
25023  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
25024  $as_echo_n "(cached) " >&6
25025else
25026      # Double quotes because CXXCPP needs to be expanded
25027    for CXXCPP in "$CXX -E" "/lib/cpp"
25028    do
25029      ac_preproc_ok=false
25030for ac_cxx_preproc_warn_flag in '' yes
25031do
25032  # Use a header file that comes with gcc, so configuring glibc
25033  # with a fresh cross-compiler works.
25034  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25035  # <limits.h> exists even on freestanding compilers.
25036  # On the NeXT, cc -E runs the code through the compiler's parser,
25037  # not just through cpp. "Syntax error" is here to catch this case.
25038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25039/* end confdefs.h.  */
25040#ifdef __STDC__
25041# include <limits.h>
25042#else
25043# include <assert.h>
25044#endif
25045		     Syntax error
25046_ACEOF
25047if ac_fn_cxx_try_cpp "$LINENO"; then :
25048
25049else
25050  # Broken: fails on valid input.
25051continue
25052fi
25053rm -f conftest.err conftest.i conftest.$ac_ext
25054
25055  # OK, works on sane cases.  Now check whether nonexistent headers
25056  # can be detected and how.
25057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25058/* end confdefs.h.  */
25059#include <ac_nonexistent.h>
25060_ACEOF
25061if ac_fn_cxx_try_cpp "$LINENO"; then :
25062  # Broken: success on invalid input.
25063continue
25064else
25065  # Passes both tests.
25066ac_preproc_ok=:
25067break
25068fi
25069rm -f conftest.err conftest.i conftest.$ac_ext
25070
25071done
25072# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25073rm -f conftest.i conftest.err conftest.$ac_ext
25074if $ac_preproc_ok; then :
25075  break
25076fi
25077
25078    done
25079    ac_cv_prog_CXXCPP=$CXXCPP
25080
25081fi
25082  CXXCPP=$ac_cv_prog_CXXCPP
25083else
25084  ac_cv_prog_CXXCPP=$CXXCPP
25085fi
25086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25087$as_echo "$CXXCPP" >&6; }
25088ac_preproc_ok=false
25089for ac_cxx_preproc_warn_flag in '' yes
25090do
25091  # Use a header file that comes with gcc, so configuring glibc
25092  # with a fresh cross-compiler works.
25093  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25094  # <limits.h> exists even on freestanding compilers.
25095  # On the NeXT, cc -E runs the code through the compiler's parser,
25096  # not just through cpp. "Syntax error" is here to catch this case.
25097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25098/* end confdefs.h.  */
25099#ifdef __STDC__
25100# include <limits.h>
25101#else
25102# include <assert.h>
25103#endif
25104		     Syntax error
25105_ACEOF
25106if ac_fn_cxx_try_cpp "$LINENO"; then :
25107
25108else
25109  # Broken: fails on valid input.
25110continue
25111fi
25112rm -f conftest.err conftest.i conftest.$ac_ext
25113
25114  # OK, works on sane cases.  Now check whether nonexistent headers
25115  # can be detected and how.
25116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25117/* end confdefs.h.  */
25118#include <ac_nonexistent.h>
25119_ACEOF
25120if ac_fn_cxx_try_cpp "$LINENO"; then :
25121  # Broken: success on invalid input.
25122continue
25123else
25124  # Passes both tests.
25125ac_preproc_ok=:
25126break
25127fi
25128rm -f conftest.err conftest.i conftest.$ac_ext
25129
25130done
25131# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25132rm -f conftest.i conftest.err conftest.$ac_ext
25133if $ac_preproc_ok; then :
25134
25135else
25136  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25138as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25139See \`config.log' for more details" "$LINENO" 5 ; }
25140fi
25141
25142ac_ext=cpp
25143ac_cpp='$CXXCPP $CPPFLAGS'
25144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25147
25148
25149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25150
25151  # First separate the path from the arguments. This will split at the first
25152  # space.
25153  complete="$CXXCPP"
25154  path="${complete%% *}"
25155  tmp="$complete EOL"
25156  arguments="${tmp#* }"
25157
25158  # Input might be given as Windows format, start by converting to
25159  # unix format.
25160  new_path=`$CYGPATH -u "$path"`
25161
25162  # Now try to locate executable using which
25163  new_path=`$WHICH "$new_path" 2> /dev/null`
25164  # bat and cmd files are not always considered executable in cygwin causing which
25165  # to not find them
25166  if test "x$new_path" = x \
25167           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25168           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25169    new_path=`$CYGPATH -u "$path"`
25170  fi
25171  if test "x$new_path" = x; then
25172    # Oops. Which didn't find the executable.
25173    # The splitting of arguments from the executable at a space might have been incorrect,
25174    # since paths with space are more likely in Windows. Give it another try with the whole
25175    # argument.
25176    path="$complete"
25177    arguments="EOL"
25178    new_path=`$CYGPATH -u "$path"`
25179    new_path=`$WHICH "$new_path" 2> /dev/null`
25180    # bat and cmd files are not always considered executable in cygwin causing which
25181    # to not find them
25182    if test "x$new_path" = x \
25183             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25184             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25185      new_path=`$CYGPATH -u "$path"`
25186    fi
25187    if test "x$new_path" = x; then
25188      # It's still not found. Now this is an unrecoverable error.
25189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25190$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25191      has_space=`$ECHO "$complete" | $GREP " "`
25192      if test "x$has_space" != x; then
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25195      fi
25196      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25197    fi
25198  fi
25199
25200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25203  # "foo.exe" is OK but "foo" is an error.
25204  #
25205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25206  # It is also a way to make sure we got the proper file name for the real test later on.
25207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25208  if test "x$test_shortpath" = x; then
25209    # Short path failed, file does not exist as specified.
25210    # Try adding .exe or .cmd
25211    if test -f "${new_path}.exe"; then
25212       input_to_shortpath="${new_path}.exe"
25213    elif test -f "${new_path}.cmd"; then
25214       input_to_shortpath="${new_path}.cmd"
25215    else
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25217$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25219$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25220      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25221    fi
25222  else
25223    input_to_shortpath="$new_path"
25224  fi
25225
25226  # Call helper function which possibly converts this using DOS-style short mode.
25227  # If so, the updated path is stored in $new_path.
25228  new_path="$input_to_shortpath"
25229
25230  input_path="$input_to_shortpath"
25231  # Check if we need to convert this using DOS-style short mode. If the path
25232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25233  # take no chances and rewrite it.
25234  # Note: m4 eats our [], so we need to use [ and ] instead.
25235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25236  if test "x$has_forbidden_chars" != x; then
25237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25241      # Going to short mode and back again did indeed matter. Since short mode is
25242      # case insensitive, let's make it lowercase to improve readability.
25243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25244      # Now convert it back to Unix-stile (cygpath)
25245      input_path=`$CYGPATH -u "$shortmode_path"`
25246      new_path="$input_path"
25247    fi
25248  fi
25249
25250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25251  if test "x$test_cygdrive_prefix" = x; then
25252    # As a simple fix, exclude /usr/bin since it's not a real path.
25253    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25255      # a path prefixed by /cygdrive for fixpath to work.
25256      new_path="$CYGWIN_ROOT_PATH$input_path"
25257    fi
25258  fi
25259
25260  # remove trailing .exe if any
25261  new_path="${new_path/%.exe/}"
25262
25263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264
25265  # First separate the path from the arguments. This will split at the first
25266  # space.
25267  complete="$CXXCPP"
25268  path="${complete%% *}"
25269  tmp="$complete EOL"
25270  arguments="${tmp#* }"
25271
25272  # Input might be given as Windows format, start by converting to
25273  # unix format.
25274  new_path="$path"
25275
25276  windows_path="$new_path"
25277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25278    unix_path=`$CYGPATH -u "$windows_path"`
25279    new_path="$unix_path"
25280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25282    new_path="$unix_path"
25283  fi
25284
25285
25286  # Now try to locate executable using which
25287  new_path=`$WHICH "$new_path" 2> /dev/null`
25288
25289  if test "x$new_path" = x; then
25290    # Oops. Which didn't find the executable.
25291    # The splitting of arguments from the executable at a space might have been incorrect,
25292    # since paths with space are more likely in Windows. Give it another try with the whole
25293    # argument.
25294    path="$complete"
25295    arguments="EOL"
25296    new_path="$path"
25297
25298  windows_path="$new_path"
25299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25300    unix_path=`$CYGPATH -u "$windows_path"`
25301    new_path="$unix_path"
25302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25304    new_path="$unix_path"
25305  fi
25306
25307
25308    new_path=`$WHICH "$new_path" 2> /dev/null`
25309
25310    if test "x$new_path" = x; then
25311      # It's still not found. Now this is an unrecoverable error.
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25313$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25314      has_space=`$ECHO "$complete" | $GREP " "`
25315      if test "x$has_space" != x; then
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25318      fi
25319      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25320    fi
25321  fi
25322
25323  # Now new_path has a complete unix path to the binary
25324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25325    # Keep paths in /bin as-is, but remove trailing .exe if any
25326    new_path="${new_path/%.exe/}"
25327    # Do not save /bin paths to all_fixpath_prefixes!
25328  else
25329    # Not in mixed or Windows style, start by that.
25330    new_path=`cmd //c echo $new_path`
25331
25332  input_path="$new_path"
25333  # Check if we need to convert this using DOS-style short mode. If the path
25334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25335  # take no chances and rewrite it.
25336  # Note: m4 eats our [], so we need to use [ and ] instead.
25337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25338  if test "x$has_forbidden_chars" != x; then
25339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25341  fi
25342
25343    # Output is in $new_path
25344
25345  windows_path="$new_path"
25346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25347    unix_path=`$CYGPATH -u "$windows_path"`
25348    new_path="$unix_path"
25349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25351    new_path="$unix_path"
25352  fi
25353
25354    # remove trailing .exe if any
25355    new_path="${new_path/%.exe/}"
25356
25357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25359  fi
25360
25361  else
25362    # We're on a posix platform. Hooray! :)
25363    # First separate the path from the arguments. This will split at the first
25364    # space.
25365    complete="$CXXCPP"
25366    path="${complete%% *}"
25367    tmp="$complete EOL"
25368    arguments="${tmp#* }"
25369
25370    # Cannot rely on the command "which" here since it doesn't always work.
25371    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25372    if test -z "$is_absolute_path"; then
25373      # Path to executable is not absolute. Find it.
25374      IFS_save="$IFS"
25375      IFS=:
25376      for p in $PATH; do
25377        if test -f "$p/$path" && test -x "$p/$path"; then
25378          new_path="$p/$path"
25379          break
25380        fi
25381      done
25382      IFS="$IFS_save"
25383    else
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25385$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25386      new_path="$path"
25387    fi
25388
25389    if test "x$new_path" = x; then
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25391$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25392        has_space=`$ECHO "$complete" | $GREP " "`
25393        if test "x$has_space" != x; then
25394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25396        fi
25397        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25398      fi
25399  fi
25400
25401      # Now join together the path and the arguments once again
25402      if test "x$arguments" != xEOL; then
25403        new_complete="$new_path ${arguments% *}"
25404      else
25405        new_complete="$new_path"
25406      fi
25407
25408  if test "x$complete" != "x$new_complete"; then
25409      CXXCPP="$new_complete"
25410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25411$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25412    fi
25413
25414
25415if test "x$COMPILE_TYPE" != "xcross"; then
25416    # If we are not cross compiling, use the same compilers for
25417    # building the build platform executables. The cross-compilation
25418    # case needed to be done earlier, but this can only be done after
25419    # the native tools have been localized.
25420    BUILD_CC="$CC"
25421    BUILD_CXX="$CXX"
25422    BUILD_LD="$LD"
25423fi
25424
25425# for solaris we really need solaris tools, and not gnu equivalent
25426#   these seems to normally reside in /usr/ccs/bin so add that to path before
25427#   starting to probe
25428#
25429#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25430#         so that it can be overriden --with-tools-dir
25431if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25432    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25433fi
25434
25435# Find the right assembler.
25436if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25437    # Extract the first word of "as", so it can be a program name with args.
25438set dummy as; ac_word=$2
25439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25440$as_echo_n "checking for $ac_word... " >&6; }
25441if test "${ac_cv_path_AS+set}" = set; then :
25442  $as_echo_n "(cached) " >&6
25443else
25444  case $AS in
25445  [\\/]* | ?:[\\/]*)
25446  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25447  ;;
25448  *)
25449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25450for as_dir in $PATH
25451do
25452  IFS=$as_save_IFS
25453  test -z "$as_dir" && as_dir=.
25454    for ac_exec_ext in '' $ac_executable_extensions; do
25455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25456    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25458    break 2
25459  fi
25460done
25461  done
25462IFS=$as_save_IFS
25463
25464  ;;
25465esac
25466fi
25467AS=$ac_cv_path_AS
25468if test -n "$AS"; then
25469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25470$as_echo "$AS" >&6; }
25471else
25472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25473$as_echo "no" >&6; }
25474fi
25475
25476
25477
25478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25479
25480  # First separate the path from the arguments. This will split at the first
25481  # space.
25482  complete="$AS"
25483  path="${complete%% *}"
25484  tmp="$complete EOL"
25485  arguments="${tmp#* }"
25486
25487  # Input might be given as Windows format, start by converting to
25488  # unix format.
25489  new_path=`$CYGPATH -u "$path"`
25490
25491  # Now try to locate executable using which
25492  new_path=`$WHICH "$new_path" 2> /dev/null`
25493  # bat and cmd files are not always considered executable in cygwin causing which
25494  # to not find them
25495  if test "x$new_path" = x \
25496           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25497           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25498    new_path=`$CYGPATH -u "$path"`
25499  fi
25500  if test "x$new_path" = x; then
25501    # Oops. Which didn't find the executable.
25502    # The splitting of arguments from the executable at a space might have been incorrect,
25503    # since paths with space are more likely in Windows. Give it another try with the whole
25504    # argument.
25505    path="$complete"
25506    arguments="EOL"
25507    new_path=`$CYGPATH -u "$path"`
25508    new_path=`$WHICH "$new_path" 2> /dev/null`
25509    # bat and cmd files are not always considered executable in cygwin causing which
25510    # to not find them
25511    if test "x$new_path" = x \
25512             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25513             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25514      new_path=`$CYGPATH -u "$path"`
25515    fi
25516    if test "x$new_path" = x; then
25517      # It's still not found. Now this is an unrecoverable error.
25518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25519$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25520      has_space=`$ECHO "$complete" | $GREP " "`
25521      if test "x$has_space" != x; then
25522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25524      fi
25525      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25526    fi
25527  fi
25528
25529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25532  # "foo.exe" is OK but "foo" is an error.
25533  #
25534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25535  # It is also a way to make sure we got the proper file name for the real test later on.
25536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25537  if test "x$test_shortpath" = x; then
25538    # Short path failed, file does not exist as specified.
25539    # Try adding .exe or .cmd
25540    if test -f "${new_path}.exe"; then
25541       input_to_shortpath="${new_path}.exe"
25542    elif test -f "${new_path}.cmd"; then
25543       input_to_shortpath="${new_path}.cmd"
25544    else
25545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25546$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25549      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25550    fi
25551  else
25552    input_to_shortpath="$new_path"
25553  fi
25554
25555  # Call helper function which possibly converts this using DOS-style short mode.
25556  # If so, the updated path is stored in $new_path.
25557  new_path="$input_to_shortpath"
25558
25559  input_path="$input_to_shortpath"
25560  # Check if we need to convert this using DOS-style short mode. If the path
25561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25562  # take no chances and rewrite it.
25563  # Note: m4 eats our [], so we need to use [ and ] instead.
25564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25565  if test "x$has_forbidden_chars" != x; then
25566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25570      # Going to short mode and back again did indeed matter. Since short mode is
25571      # case insensitive, let's make it lowercase to improve readability.
25572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25573      # Now convert it back to Unix-stile (cygpath)
25574      input_path=`$CYGPATH -u "$shortmode_path"`
25575      new_path="$input_path"
25576    fi
25577  fi
25578
25579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25580  if test "x$test_cygdrive_prefix" = x; then
25581    # As a simple fix, exclude /usr/bin since it's not a real path.
25582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25584      # a path prefixed by /cygdrive for fixpath to work.
25585      new_path="$CYGWIN_ROOT_PATH$input_path"
25586    fi
25587  fi
25588
25589  # remove trailing .exe if any
25590  new_path="${new_path/%.exe/}"
25591
25592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25593
25594  # First separate the path from the arguments. This will split at the first
25595  # space.
25596  complete="$AS"
25597  path="${complete%% *}"
25598  tmp="$complete EOL"
25599  arguments="${tmp#* }"
25600
25601  # Input might be given as Windows format, start by converting to
25602  # unix format.
25603  new_path="$path"
25604
25605  windows_path="$new_path"
25606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25607    unix_path=`$CYGPATH -u "$windows_path"`
25608    new_path="$unix_path"
25609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25611    new_path="$unix_path"
25612  fi
25613
25614
25615  # Now try to locate executable using which
25616  new_path=`$WHICH "$new_path" 2> /dev/null`
25617
25618  if test "x$new_path" = x; then
25619    # Oops. Which didn't find the executable.
25620    # The splitting of arguments from the executable at a space might have been incorrect,
25621    # since paths with space are more likely in Windows. Give it another try with the whole
25622    # argument.
25623    path="$complete"
25624    arguments="EOL"
25625    new_path="$path"
25626
25627  windows_path="$new_path"
25628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25629    unix_path=`$CYGPATH -u "$windows_path"`
25630    new_path="$unix_path"
25631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25633    new_path="$unix_path"
25634  fi
25635
25636
25637    new_path=`$WHICH "$new_path" 2> /dev/null`
25638
25639    if test "x$new_path" = x; then
25640      # It's still not found. Now this is an unrecoverable error.
25641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25642$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25643      has_space=`$ECHO "$complete" | $GREP " "`
25644      if test "x$has_space" != x; then
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25647      fi
25648      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25649    fi
25650  fi
25651
25652  # Now new_path has a complete unix path to the binary
25653  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25654    # Keep paths in /bin as-is, but remove trailing .exe if any
25655    new_path="${new_path/%.exe/}"
25656    # Do not save /bin paths to all_fixpath_prefixes!
25657  else
25658    # Not in mixed or Windows style, start by that.
25659    new_path=`cmd //c echo $new_path`
25660
25661  input_path="$new_path"
25662  # Check if we need to convert this using DOS-style short mode. If the path
25663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25664  # take no chances and rewrite it.
25665  # Note: m4 eats our [], so we need to use [ and ] instead.
25666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25667  if test "x$has_forbidden_chars" != x; then
25668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670  fi
25671
25672    # Output is in $new_path
25673
25674  windows_path="$new_path"
25675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25676    unix_path=`$CYGPATH -u "$windows_path"`
25677    new_path="$unix_path"
25678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25680    new_path="$unix_path"
25681  fi
25682
25683    # remove trailing .exe if any
25684    new_path="${new_path/%.exe/}"
25685
25686    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688  fi
25689
25690  else
25691    # We're on a posix platform. Hooray! :)
25692    # First separate the path from the arguments. This will split at the first
25693    # space.
25694    complete="$AS"
25695    path="${complete%% *}"
25696    tmp="$complete EOL"
25697    arguments="${tmp#* }"
25698
25699    # Cannot rely on the command "which" here since it doesn't always work.
25700    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25701    if test -z "$is_absolute_path"; then
25702      # Path to executable is not absolute. Find it.
25703      IFS_save="$IFS"
25704      IFS=:
25705      for p in $PATH; do
25706        if test -f "$p/$path" && test -x "$p/$path"; then
25707          new_path="$p/$path"
25708          break
25709        fi
25710      done
25711      IFS="$IFS_save"
25712    else
25713      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25714$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25715      new_path="$path"
25716    fi
25717
25718    if test "x$new_path" = x; then
25719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25720$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25721        has_space=`$ECHO "$complete" | $GREP " "`
25722        if test "x$has_space" != x; then
25723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25725        fi
25726        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25727      fi
25728  fi
25729
25730      # Now join together the path and the arguments once again
25731      if test "x$arguments" != xEOL; then
25732        new_complete="$new_path ${arguments% *}"
25733      else
25734        new_complete="$new_path"
25735      fi
25736
25737  if test "x$complete" != "x$new_complete"; then
25738      AS="$new_complete"
25739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25740$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25741    fi
25742
25743else
25744    AS="$CC -c"
25745fi
25746
25747
25748if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25749    # Extract the first word of "nm", so it can be a program name with args.
25750set dummy nm; ac_word=$2
25751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25752$as_echo_n "checking for $ac_word... " >&6; }
25753if test "${ac_cv_path_NM+set}" = set; then :
25754  $as_echo_n "(cached) " >&6
25755else
25756  case $NM in
25757  [\\/]* | ?:[\\/]*)
25758  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25759  ;;
25760  *)
25761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25762for as_dir in $PATH
25763do
25764  IFS=$as_save_IFS
25765  test -z "$as_dir" && as_dir=.
25766    for ac_exec_ext in '' $ac_executable_extensions; do
25767  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25768    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25770    break 2
25771  fi
25772done
25773  done
25774IFS=$as_save_IFS
25775
25776  ;;
25777esac
25778fi
25779NM=$ac_cv_path_NM
25780if test -n "$NM"; then
25781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25782$as_echo "$NM" >&6; }
25783else
25784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25785$as_echo "no" >&6; }
25786fi
25787
25788
25789
25790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25791
25792  # First separate the path from the arguments. This will split at the first
25793  # space.
25794  complete="$NM"
25795  path="${complete%% *}"
25796  tmp="$complete EOL"
25797  arguments="${tmp#* }"
25798
25799  # Input might be given as Windows format, start by converting to
25800  # unix format.
25801  new_path=`$CYGPATH -u "$path"`
25802
25803  # Now try to locate executable using which
25804  new_path=`$WHICH "$new_path" 2> /dev/null`
25805  # bat and cmd files are not always considered executable in cygwin causing which
25806  # to not find them
25807  if test "x$new_path" = x \
25808           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25809           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25810    new_path=`$CYGPATH -u "$path"`
25811  fi
25812  if test "x$new_path" = x; then
25813    # Oops. Which didn't find the executable.
25814    # The splitting of arguments from the executable at a space might have been incorrect,
25815    # since paths with space are more likely in Windows. Give it another try with the whole
25816    # argument.
25817    path="$complete"
25818    arguments="EOL"
25819    new_path=`$CYGPATH -u "$path"`
25820    new_path=`$WHICH "$new_path" 2> /dev/null`
25821    # bat and cmd files are not always considered executable in cygwin causing which
25822    # to not find them
25823    if test "x$new_path" = x \
25824             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25825             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25826      new_path=`$CYGPATH -u "$path"`
25827    fi
25828    if test "x$new_path" = x; then
25829      # It's still not found. Now this is an unrecoverable error.
25830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25832      has_space=`$ECHO "$complete" | $GREP " "`
25833      if test "x$has_space" != x; then
25834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25836      fi
25837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25838    fi
25839  fi
25840
25841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25844  # "foo.exe" is OK but "foo" is an error.
25845  #
25846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25847  # It is also a way to make sure we got the proper file name for the real test later on.
25848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25849  if test "x$test_shortpath" = x; then
25850    # Short path failed, file does not exist as specified.
25851    # Try adding .exe or .cmd
25852    if test -f "${new_path}.exe"; then
25853       input_to_shortpath="${new_path}.exe"
25854    elif test -f "${new_path}.cmd"; then
25855       input_to_shortpath="${new_path}.cmd"
25856    else
25857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25858$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25861      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25862    fi
25863  else
25864    input_to_shortpath="$new_path"
25865  fi
25866
25867  # Call helper function which possibly converts this using DOS-style short mode.
25868  # If so, the updated path is stored in $new_path.
25869  new_path="$input_to_shortpath"
25870
25871  input_path="$input_to_shortpath"
25872  # Check if we need to convert this using DOS-style short mode. If the path
25873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25874  # take no chances and rewrite it.
25875  # Note: m4 eats our [], so we need to use [ and ] instead.
25876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25877  if test "x$has_forbidden_chars" != x; then
25878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25882      # Going to short mode and back again did indeed matter. Since short mode is
25883      # case insensitive, let's make it lowercase to improve readability.
25884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25885      # Now convert it back to Unix-stile (cygpath)
25886      input_path=`$CYGPATH -u "$shortmode_path"`
25887      new_path="$input_path"
25888    fi
25889  fi
25890
25891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25892  if test "x$test_cygdrive_prefix" = x; then
25893    # As a simple fix, exclude /usr/bin since it's not a real path.
25894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25896      # a path prefixed by /cygdrive for fixpath to work.
25897      new_path="$CYGWIN_ROOT_PATH$input_path"
25898    fi
25899  fi
25900
25901  # remove trailing .exe if any
25902  new_path="${new_path/%.exe/}"
25903
25904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25905
25906  # First separate the path from the arguments. This will split at the first
25907  # space.
25908  complete="$NM"
25909  path="${complete%% *}"
25910  tmp="$complete EOL"
25911  arguments="${tmp#* }"
25912
25913  # Input might be given as Windows format, start by converting to
25914  # unix format.
25915  new_path="$path"
25916
25917  windows_path="$new_path"
25918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25919    unix_path=`$CYGPATH -u "$windows_path"`
25920    new_path="$unix_path"
25921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25923    new_path="$unix_path"
25924  fi
25925
25926
25927  # Now try to locate executable using which
25928  new_path=`$WHICH "$new_path" 2> /dev/null`
25929
25930  if test "x$new_path" = x; then
25931    # Oops. Which didn't find the executable.
25932    # The splitting of arguments from the executable at a space might have been incorrect,
25933    # since paths with space are more likely in Windows. Give it another try with the whole
25934    # argument.
25935    path="$complete"
25936    arguments="EOL"
25937    new_path="$path"
25938
25939  windows_path="$new_path"
25940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25941    unix_path=`$CYGPATH -u "$windows_path"`
25942    new_path="$unix_path"
25943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25945    new_path="$unix_path"
25946  fi
25947
25948
25949    new_path=`$WHICH "$new_path" 2> /dev/null`
25950
25951    if test "x$new_path" = x; then
25952      # It's still not found. Now this is an unrecoverable error.
25953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25955      has_space=`$ECHO "$complete" | $GREP " "`
25956      if test "x$has_space" != x; then
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25959      fi
25960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25961    fi
25962  fi
25963
25964  # Now new_path has a complete unix path to the binary
25965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25966    # Keep paths in /bin as-is, but remove trailing .exe if any
25967    new_path="${new_path/%.exe/}"
25968    # Do not save /bin paths to all_fixpath_prefixes!
25969  else
25970    # Not in mixed or Windows style, start by that.
25971    new_path=`cmd //c echo $new_path`
25972
25973  input_path="$new_path"
25974  # Check if we need to convert this using DOS-style short mode. If the path
25975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25976  # take no chances and rewrite it.
25977  # Note: m4 eats our [], so we need to use [ and ] instead.
25978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25979  if test "x$has_forbidden_chars" != x; then
25980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25982  fi
25983
25984    # Output is in $new_path
25985
25986  windows_path="$new_path"
25987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25988    unix_path=`$CYGPATH -u "$windows_path"`
25989    new_path="$unix_path"
25990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25992    new_path="$unix_path"
25993  fi
25994
25995    # remove trailing .exe if any
25996    new_path="${new_path/%.exe/}"
25997
25998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26000  fi
26001
26002  else
26003    # We're on a posix platform. Hooray! :)
26004    # First separate the path from the arguments. This will split at the first
26005    # space.
26006    complete="$NM"
26007    path="${complete%% *}"
26008    tmp="$complete EOL"
26009    arguments="${tmp#* }"
26010
26011    # Cannot rely on the command "which" here since it doesn't always work.
26012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26013    if test -z "$is_absolute_path"; then
26014      # Path to executable is not absolute. Find it.
26015      IFS_save="$IFS"
26016      IFS=:
26017      for p in $PATH; do
26018        if test -f "$p/$path" && test -x "$p/$path"; then
26019          new_path="$p/$path"
26020          break
26021        fi
26022      done
26023      IFS="$IFS_save"
26024    else
26025      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26026$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26027      new_path="$path"
26028    fi
26029
26030    if test "x$new_path" = x; then
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26032$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26033        has_space=`$ECHO "$complete" | $GREP " "`
26034        if test "x$has_space" != x; then
26035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26037        fi
26038        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26039      fi
26040  fi
26041
26042      # Now join together the path and the arguments once again
26043      if test "x$arguments" != xEOL; then
26044        new_complete="$new_path ${arguments% *}"
26045      else
26046        new_complete="$new_path"
26047      fi
26048
26049  if test "x$complete" != "x$new_complete"; then
26050      NM="$new_complete"
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26052$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26053    fi
26054
26055    # Extract the first word of "gnm", so it can be a program name with args.
26056set dummy gnm; ac_word=$2
26057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26058$as_echo_n "checking for $ac_word... " >&6; }
26059if test "${ac_cv_path_GNM+set}" = set; then :
26060  $as_echo_n "(cached) " >&6
26061else
26062  case $GNM in
26063  [\\/]* | ?:[\\/]*)
26064  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26065  ;;
26066  *)
26067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26068for as_dir in $PATH
26069do
26070  IFS=$as_save_IFS
26071  test -z "$as_dir" && as_dir=.
26072    for ac_exec_ext in '' $ac_executable_extensions; do
26073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26074    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26076    break 2
26077  fi
26078done
26079  done
26080IFS=$as_save_IFS
26081
26082  ;;
26083esac
26084fi
26085GNM=$ac_cv_path_GNM
26086if test -n "$GNM"; then
26087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26088$as_echo "$GNM" >&6; }
26089else
26090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26091$as_echo "no" >&6; }
26092fi
26093
26094
26095
26096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26097
26098  # First separate the path from the arguments. This will split at the first
26099  # space.
26100  complete="$GNM"
26101  path="${complete%% *}"
26102  tmp="$complete EOL"
26103  arguments="${tmp#* }"
26104
26105  # Input might be given as Windows format, start by converting to
26106  # unix format.
26107  new_path=`$CYGPATH -u "$path"`
26108
26109  # Now try to locate executable using which
26110  new_path=`$WHICH "$new_path" 2> /dev/null`
26111  # bat and cmd files are not always considered executable in cygwin causing which
26112  # to not find them
26113  if test "x$new_path" = x \
26114           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26115           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26116    new_path=`$CYGPATH -u "$path"`
26117  fi
26118  if test "x$new_path" = x; then
26119    # Oops. Which didn't find the executable.
26120    # The splitting of arguments from the executable at a space might have been incorrect,
26121    # since paths with space are more likely in Windows. Give it another try with the whole
26122    # argument.
26123    path="$complete"
26124    arguments="EOL"
26125    new_path=`$CYGPATH -u "$path"`
26126    new_path=`$WHICH "$new_path" 2> /dev/null`
26127    # bat and cmd files are not always considered executable in cygwin causing which
26128    # to not find them
26129    if test "x$new_path" = x \
26130             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26131             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26132      new_path=`$CYGPATH -u "$path"`
26133    fi
26134    if test "x$new_path" = x; then
26135      # It's still not found. Now this is an unrecoverable error.
26136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26137$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26138      has_space=`$ECHO "$complete" | $GREP " "`
26139      if test "x$has_space" != x; then
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26142      fi
26143      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26144    fi
26145  fi
26146
26147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26150  # "foo.exe" is OK but "foo" is an error.
26151  #
26152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26153  # It is also a way to make sure we got the proper file name for the real test later on.
26154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26155  if test "x$test_shortpath" = x; then
26156    # Short path failed, file does not exist as specified.
26157    # Try adding .exe or .cmd
26158    if test -f "${new_path}.exe"; then
26159       input_to_shortpath="${new_path}.exe"
26160    elif test -f "${new_path}.cmd"; then
26161       input_to_shortpath="${new_path}.cmd"
26162    else
26163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26164$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26166$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26167      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26168    fi
26169  else
26170    input_to_shortpath="$new_path"
26171  fi
26172
26173  # Call helper function which possibly converts this using DOS-style short mode.
26174  # If so, the updated path is stored in $new_path.
26175  new_path="$input_to_shortpath"
26176
26177  input_path="$input_to_shortpath"
26178  # Check if we need to convert this using DOS-style short mode. If the path
26179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26180  # take no chances and rewrite it.
26181  # Note: m4 eats our [], so we need to use [ and ] instead.
26182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26183  if test "x$has_forbidden_chars" != x; then
26184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26188      # Going to short mode and back again did indeed matter. Since short mode is
26189      # case insensitive, let's make it lowercase to improve readability.
26190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26191      # Now convert it back to Unix-stile (cygpath)
26192      input_path=`$CYGPATH -u "$shortmode_path"`
26193      new_path="$input_path"
26194    fi
26195  fi
26196
26197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26198  if test "x$test_cygdrive_prefix" = x; then
26199    # As a simple fix, exclude /usr/bin since it's not a real path.
26200    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26202      # a path prefixed by /cygdrive for fixpath to work.
26203      new_path="$CYGWIN_ROOT_PATH$input_path"
26204    fi
26205  fi
26206
26207  # remove trailing .exe if any
26208  new_path="${new_path/%.exe/}"
26209
26210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26211
26212  # First separate the path from the arguments. This will split at the first
26213  # space.
26214  complete="$GNM"
26215  path="${complete%% *}"
26216  tmp="$complete EOL"
26217  arguments="${tmp#* }"
26218
26219  # Input might be given as Windows format, start by converting to
26220  # unix format.
26221  new_path="$path"
26222
26223  windows_path="$new_path"
26224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26225    unix_path=`$CYGPATH -u "$windows_path"`
26226    new_path="$unix_path"
26227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26229    new_path="$unix_path"
26230  fi
26231
26232
26233  # Now try to locate executable using which
26234  new_path=`$WHICH "$new_path" 2> /dev/null`
26235
26236  if test "x$new_path" = x; then
26237    # Oops. Which didn't find the executable.
26238    # The splitting of arguments from the executable at a space might have been incorrect,
26239    # since paths with space are more likely in Windows. Give it another try with the whole
26240    # argument.
26241    path="$complete"
26242    arguments="EOL"
26243    new_path="$path"
26244
26245  windows_path="$new_path"
26246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26247    unix_path=`$CYGPATH -u "$windows_path"`
26248    new_path="$unix_path"
26249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26251    new_path="$unix_path"
26252  fi
26253
26254
26255    new_path=`$WHICH "$new_path" 2> /dev/null`
26256
26257    if test "x$new_path" = x; then
26258      # It's still not found. Now this is an unrecoverable error.
26259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26260$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26261      has_space=`$ECHO "$complete" | $GREP " "`
26262      if test "x$has_space" != x; then
26263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26265      fi
26266      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26267    fi
26268  fi
26269
26270  # Now new_path has a complete unix path to the binary
26271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26272    # Keep paths in /bin as-is, but remove trailing .exe if any
26273    new_path="${new_path/%.exe/}"
26274    # Do not save /bin paths to all_fixpath_prefixes!
26275  else
26276    # Not in mixed or Windows style, start by that.
26277    new_path=`cmd //c echo $new_path`
26278
26279  input_path="$new_path"
26280  # Check if we need to convert this using DOS-style short mode. If the path
26281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26282  # take no chances and rewrite it.
26283  # Note: m4 eats our [], so we need to use [ and ] instead.
26284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26285  if test "x$has_forbidden_chars" != x; then
26286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26288  fi
26289
26290    # Output is in $new_path
26291
26292  windows_path="$new_path"
26293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26294    unix_path=`$CYGPATH -u "$windows_path"`
26295    new_path="$unix_path"
26296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26298    new_path="$unix_path"
26299  fi
26300
26301    # remove trailing .exe if any
26302    new_path="${new_path/%.exe/}"
26303
26304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26306  fi
26307
26308  else
26309    # We're on a posix platform. Hooray! :)
26310    # First separate the path from the arguments. This will split at the first
26311    # space.
26312    complete="$GNM"
26313    path="${complete%% *}"
26314    tmp="$complete EOL"
26315    arguments="${tmp#* }"
26316
26317    # Cannot rely on the command "which" here since it doesn't always work.
26318    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26319    if test -z "$is_absolute_path"; then
26320      # Path to executable is not absolute. Find it.
26321      IFS_save="$IFS"
26322      IFS=:
26323      for p in $PATH; do
26324        if test -f "$p/$path" && test -x "$p/$path"; then
26325          new_path="$p/$path"
26326          break
26327        fi
26328      done
26329      IFS="$IFS_save"
26330    else
26331      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26332$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26333      new_path="$path"
26334    fi
26335
26336    if test "x$new_path" = x; then
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26338$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26339        has_space=`$ECHO "$complete" | $GREP " "`
26340        if test "x$has_space" != x; then
26341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26343        fi
26344        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26345      fi
26346  fi
26347
26348      # Now join together the path and the arguments once again
26349      if test "x$arguments" != xEOL; then
26350        new_complete="$new_path ${arguments% *}"
26351      else
26352        new_complete="$new_path"
26353      fi
26354
26355  if test "x$complete" != "x$new_complete"; then
26356      GNM="$new_complete"
26357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26358$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26359    fi
26360
26361    # Extract the first word of "strip", so it can be a program name with args.
26362set dummy strip; ac_word=$2
26363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26364$as_echo_n "checking for $ac_word... " >&6; }
26365if test "${ac_cv_path_STRIP+set}" = set; then :
26366  $as_echo_n "(cached) " >&6
26367else
26368  case $STRIP in
26369  [\\/]* | ?:[\\/]*)
26370  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26371  ;;
26372  *)
26373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26374for as_dir in $PATH
26375do
26376  IFS=$as_save_IFS
26377  test -z "$as_dir" && as_dir=.
26378    for ac_exec_ext in '' $ac_executable_extensions; do
26379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26380    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26382    break 2
26383  fi
26384done
26385  done
26386IFS=$as_save_IFS
26387
26388  ;;
26389esac
26390fi
26391STRIP=$ac_cv_path_STRIP
26392if test -n "$STRIP"; then
26393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26394$as_echo "$STRIP" >&6; }
26395else
26396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26397$as_echo "no" >&6; }
26398fi
26399
26400
26401
26402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26403
26404  # First separate the path from the arguments. This will split at the first
26405  # space.
26406  complete="$STRIP"
26407  path="${complete%% *}"
26408  tmp="$complete EOL"
26409  arguments="${tmp#* }"
26410
26411  # Input might be given as Windows format, start by converting to
26412  # unix format.
26413  new_path=`$CYGPATH -u "$path"`
26414
26415  # Now try to locate executable using which
26416  new_path=`$WHICH "$new_path" 2> /dev/null`
26417  # bat and cmd files are not always considered executable in cygwin causing which
26418  # to not find them
26419  if test "x$new_path" = x \
26420           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26421           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26422    new_path=`$CYGPATH -u "$path"`
26423  fi
26424  if test "x$new_path" = x; then
26425    # Oops. Which didn't find the executable.
26426    # The splitting of arguments from the executable at a space might have been incorrect,
26427    # since paths with space are more likely in Windows. Give it another try with the whole
26428    # argument.
26429    path="$complete"
26430    arguments="EOL"
26431    new_path=`$CYGPATH -u "$path"`
26432    new_path=`$WHICH "$new_path" 2> /dev/null`
26433    # bat and cmd files are not always considered executable in cygwin causing which
26434    # to not find them
26435    if test "x$new_path" = x \
26436             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26437             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26438      new_path=`$CYGPATH -u "$path"`
26439    fi
26440    if test "x$new_path" = x; then
26441      # It's still not found. Now this is an unrecoverable error.
26442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26443$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26444      has_space=`$ECHO "$complete" | $GREP " "`
26445      if test "x$has_space" != x; then
26446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26448      fi
26449      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26450    fi
26451  fi
26452
26453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26456  # "foo.exe" is OK but "foo" is an error.
26457  #
26458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26459  # It is also a way to make sure we got the proper file name for the real test later on.
26460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26461  if test "x$test_shortpath" = x; then
26462    # Short path failed, file does not exist as specified.
26463    # Try adding .exe or .cmd
26464    if test -f "${new_path}.exe"; then
26465       input_to_shortpath="${new_path}.exe"
26466    elif test -f "${new_path}.cmd"; then
26467       input_to_shortpath="${new_path}.cmd"
26468    else
26469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26470$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26474    fi
26475  else
26476    input_to_shortpath="$new_path"
26477  fi
26478
26479  # Call helper function which possibly converts this using DOS-style short mode.
26480  # If so, the updated path is stored in $new_path.
26481  new_path="$input_to_shortpath"
26482
26483  input_path="$input_to_shortpath"
26484  # Check if we need to convert this using DOS-style short mode. If the path
26485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26486  # take no chances and rewrite it.
26487  # Note: m4 eats our [], so we need to use [ and ] instead.
26488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26489  if test "x$has_forbidden_chars" != x; then
26490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26494      # Going to short mode and back again did indeed matter. Since short mode is
26495      # case insensitive, let's make it lowercase to improve readability.
26496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26497      # Now convert it back to Unix-stile (cygpath)
26498      input_path=`$CYGPATH -u "$shortmode_path"`
26499      new_path="$input_path"
26500    fi
26501  fi
26502
26503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26504  if test "x$test_cygdrive_prefix" = x; then
26505    # As a simple fix, exclude /usr/bin since it's not a real path.
26506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26508      # a path prefixed by /cygdrive for fixpath to work.
26509      new_path="$CYGWIN_ROOT_PATH$input_path"
26510    fi
26511  fi
26512
26513  # remove trailing .exe if any
26514  new_path="${new_path/%.exe/}"
26515
26516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26517
26518  # First separate the path from the arguments. This will split at the first
26519  # space.
26520  complete="$STRIP"
26521  path="${complete%% *}"
26522  tmp="$complete EOL"
26523  arguments="${tmp#* }"
26524
26525  # Input might be given as Windows format, start by converting to
26526  # unix format.
26527  new_path="$path"
26528
26529  windows_path="$new_path"
26530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26531    unix_path=`$CYGPATH -u "$windows_path"`
26532    new_path="$unix_path"
26533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26535    new_path="$unix_path"
26536  fi
26537
26538
26539  # Now try to locate executable using which
26540  new_path=`$WHICH "$new_path" 2> /dev/null`
26541
26542  if test "x$new_path" = x; then
26543    # Oops. Which didn't find the executable.
26544    # The splitting of arguments from the executable at a space might have been incorrect,
26545    # since paths with space are more likely in Windows. Give it another try with the whole
26546    # argument.
26547    path="$complete"
26548    arguments="EOL"
26549    new_path="$path"
26550
26551  windows_path="$new_path"
26552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26553    unix_path=`$CYGPATH -u "$windows_path"`
26554    new_path="$unix_path"
26555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26557    new_path="$unix_path"
26558  fi
26559
26560
26561    new_path=`$WHICH "$new_path" 2> /dev/null`
26562
26563    if test "x$new_path" = x; then
26564      # It's still not found. Now this is an unrecoverable error.
26565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26566$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26567      has_space=`$ECHO "$complete" | $GREP " "`
26568      if test "x$has_space" != x; then
26569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26571      fi
26572      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26573    fi
26574  fi
26575
26576  # Now new_path has a complete unix path to the binary
26577  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26578    # Keep paths in /bin as-is, but remove trailing .exe if any
26579    new_path="${new_path/%.exe/}"
26580    # Do not save /bin paths to all_fixpath_prefixes!
26581  else
26582    # Not in mixed or Windows style, start by that.
26583    new_path=`cmd //c echo $new_path`
26584
26585  input_path="$new_path"
26586  # Check if we need to convert this using DOS-style short mode. If the path
26587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26588  # take no chances and rewrite it.
26589  # Note: m4 eats our [], so we need to use [ and ] instead.
26590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26591  if test "x$has_forbidden_chars" != x; then
26592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26594  fi
26595
26596    # Output is in $new_path
26597
26598  windows_path="$new_path"
26599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600    unix_path=`$CYGPATH -u "$windows_path"`
26601    new_path="$unix_path"
26602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26604    new_path="$unix_path"
26605  fi
26606
26607    # remove trailing .exe if any
26608    new_path="${new_path/%.exe/}"
26609
26610    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26611    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26612  fi
26613
26614  else
26615    # We're on a posix platform. Hooray! :)
26616    # First separate the path from the arguments. This will split at the first
26617    # space.
26618    complete="$STRIP"
26619    path="${complete%% *}"
26620    tmp="$complete EOL"
26621    arguments="${tmp#* }"
26622
26623    # Cannot rely on the command "which" here since it doesn't always work.
26624    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26625    if test -z "$is_absolute_path"; then
26626      # Path to executable is not absolute. Find it.
26627      IFS_save="$IFS"
26628      IFS=:
26629      for p in $PATH; do
26630        if test -f "$p/$path" && test -x "$p/$path"; then
26631          new_path="$p/$path"
26632          break
26633        fi
26634      done
26635      IFS="$IFS_save"
26636    else
26637      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26638$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26639      new_path="$path"
26640    fi
26641
26642    if test "x$new_path" = x; then
26643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26644$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26645        has_space=`$ECHO "$complete" | $GREP " "`
26646        if test "x$has_space" != x; then
26647          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26648$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26649        fi
26650        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26651      fi
26652  fi
26653
26654      # Now join together the path and the arguments once again
26655      if test "x$arguments" != xEOL; then
26656        new_complete="$new_path ${arguments% *}"
26657      else
26658        new_complete="$new_path"
26659      fi
26660
26661  if test "x$complete" != "x$new_complete"; then
26662      STRIP="$new_complete"
26663      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26664$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26665    fi
26666
26667    # Extract the first word of "mcs", so it can be a program name with args.
26668set dummy mcs; ac_word=$2
26669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670$as_echo_n "checking for $ac_word... " >&6; }
26671if test "${ac_cv_path_MCS+set}" = set; then :
26672  $as_echo_n "(cached) " >&6
26673else
26674  case $MCS in
26675  [\\/]* | ?:[\\/]*)
26676  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26677  ;;
26678  *)
26679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680for as_dir in $PATH
26681do
26682  IFS=$as_save_IFS
26683  test -z "$as_dir" && as_dir=.
26684    for ac_exec_ext in '' $ac_executable_extensions; do
26685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26686    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688    break 2
26689  fi
26690done
26691  done
26692IFS=$as_save_IFS
26693
26694  ;;
26695esac
26696fi
26697MCS=$ac_cv_path_MCS
26698if test -n "$MCS"; then
26699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26700$as_echo "$MCS" >&6; }
26701else
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703$as_echo "no" >&6; }
26704fi
26705
26706
26707
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709
26710  # First separate the path from the arguments. This will split at the first
26711  # space.
26712  complete="$MCS"
26713  path="${complete%% *}"
26714  tmp="$complete EOL"
26715  arguments="${tmp#* }"
26716
26717  # Input might be given as Windows format, start by converting to
26718  # unix format.
26719  new_path=`$CYGPATH -u "$path"`
26720
26721  # Now try to locate executable using which
26722  new_path=`$WHICH "$new_path" 2> /dev/null`
26723  # bat and cmd files are not always considered executable in cygwin causing which
26724  # to not find them
26725  if test "x$new_path" = x \
26726           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26727           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26728    new_path=`$CYGPATH -u "$path"`
26729  fi
26730  if test "x$new_path" = x; then
26731    # Oops. Which didn't find the executable.
26732    # The splitting of arguments from the executable at a space might have been incorrect,
26733    # since paths with space are more likely in Windows. Give it another try with the whole
26734    # argument.
26735    path="$complete"
26736    arguments="EOL"
26737    new_path=`$CYGPATH -u "$path"`
26738    new_path=`$WHICH "$new_path" 2> /dev/null`
26739    # bat and cmd files are not always considered executable in cygwin causing which
26740    # to not find them
26741    if test "x$new_path" = x \
26742             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26743             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26744      new_path=`$CYGPATH -u "$path"`
26745    fi
26746    if test "x$new_path" = x; then
26747      # It's still not found. Now this is an unrecoverable error.
26748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26749$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26750      has_space=`$ECHO "$complete" | $GREP " "`
26751      if test "x$has_space" != x; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26754      fi
26755      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26756    fi
26757  fi
26758
26759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26762  # "foo.exe" is OK but "foo" is an error.
26763  #
26764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26765  # It is also a way to make sure we got the proper file name for the real test later on.
26766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26767  if test "x$test_shortpath" = x; then
26768    # Short path failed, file does not exist as specified.
26769    # Try adding .exe or .cmd
26770    if test -f "${new_path}.exe"; then
26771       input_to_shortpath="${new_path}.exe"
26772    elif test -f "${new_path}.cmd"; then
26773       input_to_shortpath="${new_path}.cmd"
26774    else
26775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26776$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26779      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26780    fi
26781  else
26782    input_to_shortpath="$new_path"
26783  fi
26784
26785  # Call helper function which possibly converts this using DOS-style short mode.
26786  # If so, the updated path is stored in $new_path.
26787  new_path="$input_to_shortpath"
26788
26789  input_path="$input_to_shortpath"
26790  # Check if we need to convert this using DOS-style short mode. If the path
26791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26792  # take no chances and rewrite it.
26793  # Note: m4 eats our [], so we need to use [ and ] instead.
26794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26795  if test "x$has_forbidden_chars" != x; then
26796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26800      # Going to short mode and back again did indeed matter. Since short mode is
26801      # case insensitive, let's make it lowercase to improve readability.
26802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803      # Now convert it back to Unix-stile (cygpath)
26804      input_path=`$CYGPATH -u "$shortmode_path"`
26805      new_path="$input_path"
26806    fi
26807  fi
26808
26809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26810  if test "x$test_cygdrive_prefix" = x; then
26811    # As a simple fix, exclude /usr/bin since it's not a real path.
26812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26814      # a path prefixed by /cygdrive for fixpath to work.
26815      new_path="$CYGWIN_ROOT_PATH$input_path"
26816    fi
26817  fi
26818
26819  # remove trailing .exe if any
26820  new_path="${new_path/%.exe/}"
26821
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823
26824  # First separate the path from the arguments. This will split at the first
26825  # space.
26826  complete="$MCS"
26827  path="${complete%% *}"
26828  tmp="$complete EOL"
26829  arguments="${tmp#* }"
26830
26831  # Input might be given as Windows format, start by converting to
26832  # unix format.
26833  new_path="$path"
26834
26835  windows_path="$new_path"
26836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837    unix_path=`$CYGPATH -u "$windows_path"`
26838    new_path="$unix_path"
26839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26841    new_path="$unix_path"
26842  fi
26843
26844
26845  # Now try to locate executable using which
26846  new_path=`$WHICH "$new_path" 2> /dev/null`
26847
26848  if test "x$new_path" = x; then
26849    # Oops. Which didn't find the executable.
26850    # The splitting of arguments from the executable at a space might have been incorrect,
26851    # since paths with space are more likely in Windows. Give it another try with the whole
26852    # argument.
26853    path="$complete"
26854    arguments="EOL"
26855    new_path="$path"
26856
26857  windows_path="$new_path"
26858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859    unix_path=`$CYGPATH -u "$windows_path"`
26860    new_path="$unix_path"
26861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26863    new_path="$unix_path"
26864  fi
26865
26866
26867    new_path=`$WHICH "$new_path" 2> /dev/null`
26868
26869    if test "x$new_path" = x; then
26870      # It's still not found. Now this is an unrecoverable error.
26871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26872$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26873      has_space=`$ECHO "$complete" | $GREP " "`
26874      if test "x$has_space" != x; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26877      fi
26878      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26879    fi
26880  fi
26881
26882  # Now new_path has a complete unix path to the binary
26883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26884    # Keep paths in /bin as-is, but remove trailing .exe if any
26885    new_path="${new_path/%.exe/}"
26886    # Do not save /bin paths to all_fixpath_prefixes!
26887  else
26888    # Not in mixed or Windows style, start by that.
26889    new_path=`cmd //c echo $new_path`
26890
26891  input_path="$new_path"
26892  # Check if we need to convert this using DOS-style short mode. If the path
26893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26894  # take no chances and rewrite it.
26895  # Note: m4 eats our [], so we need to use [ and ] instead.
26896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26897  if test "x$has_forbidden_chars" != x; then
26898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26900  fi
26901
26902    # Output is in $new_path
26903
26904  windows_path="$new_path"
26905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906    unix_path=`$CYGPATH -u "$windows_path"`
26907    new_path="$unix_path"
26908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26910    new_path="$unix_path"
26911  fi
26912
26913    # remove trailing .exe if any
26914    new_path="${new_path/%.exe/}"
26915
26916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26918  fi
26919
26920  else
26921    # We're on a posix platform. Hooray! :)
26922    # First separate the path from the arguments. This will split at the first
26923    # space.
26924    complete="$MCS"
26925    path="${complete%% *}"
26926    tmp="$complete EOL"
26927    arguments="${tmp#* }"
26928
26929    # Cannot rely on the command "which" here since it doesn't always work.
26930    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26931    if test -z "$is_absolute_path"; then
26932      # Path to executable is not absolute. Find it.
26933      IFS_save="$IFS"
26934      IFS=:
26935      for p in $PATH; do
26936        if test -f "$p/$path" && test -x "$p/$path"; then
26937          new_path="$p/$path"
26938          break
26939        fi
26940      done
26941      IFS="$IFS_save"
26942    else
26943      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26944$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26945      new_path="$path"
26946    fi
26947
26948    if test "x$new_path" = x; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26950$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26951        has_space=`$ECHO "$complete" | $GREP " "`
26952        if test "x$has_space" != x; then
26953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26955        fi
26956        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26957      fi
26958  fi
26959
26960      # Now join together the path and the arguments once again
26961      if test "x$arguments" != xEOL; then
26962        new_complete="$new_path ${arguments% *}"
26963      else
26964        new_complete="$new_path"
26965      fi
26966
26967  if test "x$complete" != "x$new_complete"; then
26968      MCS="$new_complete"
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26970$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26971    fi
26972
26973elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26974    if test -n "$ac_tool_prefix"; then
26975  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26976set dummy ${ac_tool_prefix}nm; ac_word=$2
26977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26978$as_echo_n "checking for $ac_word... " >&6; }
26979if test "${ac_cv_prog_NM+set}" = set; then :
26980  $as_echo_n "(cached) " >&6
26981else
26982  if test -n "$NM"; then
26983  ac_cv_prog_NM="$NM" # Let the user override the test.
26984else
26985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26986for as_dir in $PATH
26987do
26988  IFS=$as_save_IFS
26989  test -z "$as_dir" && as_dir=.
26990    for ac_exec_ext in '' $ac_executable_extensions; do
26991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26992    ac_cv_prog_NM="${ac_tool_prefix}nm"
26993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26994    break 2
26995  fi
26996done
26997  done
26998IFS=$as_save_IFS
26999
27000fi
27001fi
27002NM=$ac_cv_prog_NM
27003if test -n "$NM"; then
27004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27005$as_echo "$NM" >&6; }
27006else
27007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27008$as_echo "no" >&6; }
27009fi
27010
27011
27012fi
27013if test -z "$ac_cv_prog_NM"; then
27014  ac_ct_NM=$NM
27015  # Extract the first word of "nm", so it can be a program name with args.
27016set dummy nm; ac_word=$2
27017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27018$as_echo_n "checking for $ac_word... " >&6; }
27019if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
27020  $as_echo_n "(cached) " >&6
27021else
27022  if test -n "$ac_ct_NM"; then
27023  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27024else
27025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27026for as_dir in $PATH
27027do
27028  IFS=$as_save_IFS
27029  test -z "$as_dir" && as_dir=.
27030    for ac_exec_ext in '' $ac_executable_extensions; do
27031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27032    ac_cv_prog_ac_ct_NM="nm"
27033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27034    break 2
27035  fi
27036done
27037  done
27038IFS=$as_save_IFS
27039
27040fi
27041fi
27042ac_ct_NM=$ac_cv_prog_ac_ct_NM
27043if test -n "$ac_ct_NM"; then
27044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27045$as_echo "$ac_ct_NM" >&6; }
27046else
27047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27048$as_echo "no" >&6; }
27049fi
27050
27051  if test "x$ac_ct_NM" = x; then
27052    NM=""
27053  else
27054    case $cross_compiling:$ac_tool_warned in
27055yes:)
27056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27058ac_tool_warned=yes ;;
27059esac
27060    NM=$ac_ct_NM
27061  fi
27062else
27063  NM="$ac_cv_prog_NM"
27064fi
27065
27066
27067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27068
27069  # First separate the path from the arguments. This will split at the first
27070  # space.
27071  complete="$NM"
27072  path="${complete%% *}"
27073  tmp="$complete EOL"
27074  arguments="${tmp#* }"
27075
27076  # Input might be given as Windows format, start by converting to
27077  # unix format.
27078  new_path=`$CYGPATH -u "$path"`
27079
27080  # Now try to locate executable using which
27081  new_path=`$WHICH "$new_path" 2> /dev/null`
27082  # bat and cmd files are not always considered executable in cygwin causing which
27083  # to not find them
27084  if test "x$new_path" = x \
27085           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27086           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27087    new_path=`$CYGPATH -u "$path"`
27088  fi
27089  if test "x$new_path" = x; then
27090    # Oops. Which didn't find the executable.
27091    # The splitting of arguments from the executable at a space might have been incorrect,
27092    # since paths with space are more likely in Windows. Give it another try with the whole
27093    # argument.
27094    path="$complete"
27095    arguments="EOL"
27096    new_path=`$CYGPATH -u "$path"`
27097    new_path=`$WHICH "$new_path" 2> /dev/null`
27098    # bat and cmd files are not always considered executable in cygwin causing which
27099    # to not find them
27100    if test "x$new_path" = x \
27101             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27102             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27103      new_path=`$CYGPATH -u "$path"`
27104    fi
27105    if test "x$new_path" = x; then
27106      # It's still not found. Now this is an unrecoverable error.
27107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27108$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27109      has_space=`$ECHO "$complete" | $GREP " "`
27110      if test "x$has_space" != x; then
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27113      fi
27114      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27115    fi
27116  fi
27117
27118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27121  # "foo.exe" is OK but "foo" is an error.
27122  #
27123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27124  # It is also a way to make sure we got the proper file name for the real test later on.
27125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27126  if test "x$test_shortpath" = x; then
27127    # Short path failed, file does not exist as specified.
27128    # Try adding .exe or .cmd
27129    if test -f "${new_path}.exe"; then
27130       input_to_shortpath="${new_path}.exe"
27131    elif test -f "${new_path}.cmd"; then
27132       input_to_shortpath="${new_path}.cmd"
27133    else
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27135$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27138      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27139    fi
27140  else
27141    input_to_shortpath="$new_path"
27142  fi
27143
27144  # Call helper function which possibly converts this using DOS-style short mode.
27145  # If so, the updated path is stored in $new_path.
27146  new_path="$input_to_shortpath"
27147
27148  input_path="$input_to_shortpath"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27159      # Going to short mode and back again did indeed matter. Since short mode is
27160      # case insensitive, let's make it lowercase to improve readability.
27161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162      # Now convert it back to Unix-stile (cygpath)
27163      input_path=`$CYGPATH -u "$shortmode_path"`
27164      new_path="$input_path"
27165    fi
27166  fi
27167
27168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27169  if test "x$test_cygdrive_prefix" = x; then
27170    # As a simple fix, exclude /usr/bin since it's not a real path.
27171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27173      # a path prefixed by /cygdrive for fixpath to work.
27174      new_path="$CYGWIN_ROOT_PATH$input_path"
27175    fi
27176  fi
27177
27178  # remove trailing .exe if any
27179  new_path="${new_path/%.exe/}"
27180
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182
27183  # First separate the path from the arguments. This will split at the first
27184  # space.
27185  complete="$NM"
27186  path="${complete%% *}"
27187  tmp="$complete EOL"
27188  arguments="${tmp#* }"
27189
27190  # Input might be given as Windows format, start by converting to
27191  # unix format.
27192  new_path="$path"
27193
27194  windows_path="$new_path"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    new_path="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    new_path="$unix_path"
27201  fi
27202
27203
27204  # Now try to locate executable using which
27205  new_path=`$WHICH "$new_path" 2> /dev/null`
27206
27207  if test "x$new_path" = x; then
27208    # Oops. Which didn't find the executable.
27209    # The splitting of arguments from the executable at a space might have been incorrect,
27210    # since paths with space are more likely in Windows. Give it another try with the whole
27211    # argument.
27212    path="$complete"
27213    arguments="EOL"
27214    new_path="$path"
27215
27216  windows_path="$new_path"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    unix_path=`$CYGPATH -u "$windows_path"`
27219    new_path="$unix_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27222    new_path="$unix_path"
27223  fi
27224
27225
27226    new_path=`$WHICH "$new_path" 2> /dev/null`
27227
27228    if test "x$new_path" = x; then
27229      # It's still not found. Now this is an unrecoverable error.
27230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27231$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27232      has_space=`$ECHO "$complete" | $GREP " "`
27233      if test "x$has_space" != x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27236      fi
27237      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27238    fi
27239  fi
27240
27241  # Now new_path has a complete unix path to the binary
27242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27243    # Keep paths in /bin as-is, but remove trailing .exe if any
27244    new_path="${new_path/%.exe/}"
27245    # Do not save /bin paths to all_fixpath_prefixes!
27246  else
27247    # Not in mixed or Windows style, start by that.
27248    new_path=`cmd //c echo $new_path`
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27259  fi
27260
27261    # Output is in $new_path
27262
27263  windows_path="$new_path"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    new_path="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    new_path="$unix_path"
27270  fi
27271
27272    # remove trailing .exe if any
27273    new_path="${new_path/%.exe/}"
27274
27275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27277  fi
27278
27279  else
27280    # We're on a posix platform. Hooray! :)
27281    # First separate the path from the arguments. This will split at the first
27282    # space.
27283    complete="$NM"
27284    path="${complete%% *}"
27285    tmp="$complete EOL"
27286    arguments="${tmp#* }"
27287
27288    # Cannot rely on the command "which" here since it doesn't always work.
27289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27290    if test -z "$is_absolute_path"; then
27291      # Path to executable is not absolute. Find it.
27292      IFS_save="$IFS"
27293      IFS=:
27294      for p in $PATH; do
27295        if test -f "$p/$path" && test -x "$p/$path"; then
27296          new_path="$p/$path"
27297          break
27298        fi
27299      done
27300      IFS="$IFS_save"
27301    else
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27303$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27304      new_path="$path"
27305    fi
27306
27307    if test "x$new_path" = x; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27309$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27310        has_space=`$ECHO "$complete" | $GREP " "`
27311        if test "x$has_space" != x; then
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27314        fi
27315        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27316      fi
27317  fi
27318
27319      # Now join together the path and the arguments once again
27320      if test "x$arguments" != xEOL; then
27321        new_complete="$new_path ${arguments% *}"
27322      else
27323        new_complete="$new_path"
27324      fi
27325
27326  if test "x$complete" != "x$new_complete"; then
27327      NM="$new_complete"
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27329$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27330    fi
27331
27332    GNM="$NM"
27333
27334    if test -n "$ac_tool_prefix"; then
27335  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27336set dummy ${ac_tool_prefix}strip; ac_word=$2
27337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27338$as_echo_n "checking for $ac_word... " >&6; }
27339if test "${ac_cv_prog_STRIP+set}" = set; then :
27340  $as_echo_n "(cached) " >&6
27341else
27342  if test -n "$STRIP"; then
27343  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27344else
27345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27346for as_dir in $PATH
27347do
27348  IFS=$as_save_IFS
27349  test -z "$as_dir" && as_dir=.
27350    for ac_exec_ext in '' $ac_executable_extensions; do
27351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27352    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27354    break 2
27355  fi
27356done
27357  done
27358IFS=$as_save_IFS
27359
27360fi
27361fi
27362STRIP=$ac_cv_prog_STRIP
27363if test -n "$STRIP"; then
27364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27365$as_echo "$STRIP" >&6; }
27366else
27367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27368$as_echo "no" >&6; }
27369fi
27370
27371
27372fi
27373if test -z "$ac_cv_prog_STRIP"; then
27374  ac_ct_STRIP=$STRIP
27375  # Extract the first word of "strip", so it can be a program name with args.
27376set dummy strip; ac_word=$2
27377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27378$as_echo_n "checking for $ac_word... " >&6; }
27379if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27380  $as_echo_n "(cached) " >&6
27381else
27382  if test -n "$ac_ct_STRIP"; then
27383  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27384else
27385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27386for as_dir in $PATH
27387do
27388  IFS=$as_save_IFS
27389  test -z "$as_dir" && as_dir=.
27390    for ac_exec_ext in '' $ac_executable_extensions; do
27391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27392    ac_cv_prog_ac_ct_STRIP="strip"
27393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27394    break 2
27395  fi
27396done
27397  done
27398IFS=$as_save_IFS
27399
27400fi
27401fi
27402ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27403if test -n "$ac_ct_STRIP"; then
27404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27405$as_echo "$ac_ct_STRIP" >&6; }
27406else
27407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27408$as_echo "no" >&6; }
27409fi
27410
27411  if test "x$ac_ct_STRIP" = x; then
27412    STRIP=""
27413  else
27414    case $cross_compiling:$ac_tool_warned in
27415yes:)
27416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27418ac_tool_warned=yes ;;
27419esac
27420    STRIP=$ac_ct_STRIP
27421  fi
27422else
27423  STRIP="$ac_cv_prog_STRIP"
27424fi
27425
27426
27427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27428
27429  # First separate the path from the arguments. This will split at the first
27430  # space.
27431  complete="$STRIP"
27432  path="${complete%% *}"
27433  tmp="$complete EOL"
27434  arguments="${tmp#* }"
27435
27436  # Input might be given as Windows format, start by converting to
27437  # unix format.
27438  new_path=`$CYGPATH -u "$path"`
27439
27440  # Now try to locate executable using which
27441  new_path=`$WHICH "$new_path" 2> /dev/null`
27442  # bat and cmd files are not always considered executable in cygwin causing which
27443  # to not find them
27444  if test "x$new_path" = x \
27445           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27446           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27447    new_path=`$CYGPATH -u "$path"`
27448  fi
27449  if test "x$new_path" = x; then
27450    # Oops. Which didn't find the executable.
27451    # The splitting of arguments from the executable at a space might have been incorrect,
27452    # since paths with space are more likely in Windows. Give it another try with the whole
27453    # argument.
27454    path="$complete"
27455    arguments="EOL"
27456    new_path=`$CYGPATH -u "$path"`
27457    new_path=`$WHICH "$new_path" 2> /dev/null`
27458    # bat and cmd files are not always considered executable in cygwin causing which
27459    # to not find them
27460    if test "x$new_path" = x \
27461             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27462             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27463      new_path=`$CYGPATH -u "$path"`
27464    fi
27465    if test "x$new_path" = x; then
27466      # It's still not found. Now this is an unrecoverable error.
27467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27469      has_space=`$ECHO "$complete" | $GREP " "`
27470      if test "x$has_space" != x; then
27471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27473      fi
27474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27475    fi
27476  fi
27477
27478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27481  # "foo.exe" is OK but "foo" is an error.
27482  #
27483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27484  # It is also a way to make sure we got the proper file name for the real test later on.
27485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27486  if test "x$test_shortpath" = x; then
27487    # Short path failed, file does not exist as specified.
27488    # Try adding .exe or .cmd
27489    if test -f "${new_path}.exe"; then
27490       input_to_shortpath="${new_path}.exe"
27491    elif test -f "${new_path}.cmd"; then
27492       input_to_shortpath="${new_path}.cmd"
27493    else
27494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27495$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27498      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27499    fi
27500  else
27501    input_to_shortpath="$new_path"
27502  fi
27503
27504  # Call helper function which possibly converts this using DOS-style short mode.
27505  # If so, the updated path is stored in $new_path.
27506  new_path="$input_to_shortpath"
27507
27508  input_path="$input_to_shortpath"
27509  # Check if we need to convert this using DOS-style short mode. If the path
27510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27511  # take no chances and rewrite it.
27512  # Note: m4 eats our [], so we need to use [ and ] instead.
27513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27514  if test "x$has_forbidden_chars" != x; then
27515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27519      # Going to short mode and back again did indeed matter. Since short mode is
27520      # case insensitive, let's make it lowercase to improve readability.
27521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27522      # Now convert it back to Unix-stile (cygpath)
27523      input_path=`$CYGPATH -u "$shortmode_path"`
27524      new_path="$input_path"
27525    fi
27526  fi
27527
27528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27529  if test "x$test_cygdrive_prefix" = x; then
27530    # As a simple fix, exclude /usr/bin since it's not a real path.
27531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27533      # a path prefixed by /cygdrive for fixpath to work.
27534      new_path="$CYGWIN_ROOT_PATH$input_path"
27535    fi
27536  fi
27537
27538  # remove trailing .exe if any
27539  new_path="${new_path/%.exe/}"
27540
27541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27542
27543  # First separate the path from the arguments. This will split at the first
27544  # space.
27545  complete="$STRIP"
27546  path="${complete%% *}"
27547  tmp="$complete EOL"
27548  arguments="${tmp#* }"
27549
27550  # Input might be given as Windows format, start by converting to
27551  # unix format.
27552  new_path="$path"
27553
27554  windows_path="$new_path"
27555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27556    unix_path=`$CYGPATH -u "$windows_path"`
27557    new_path="$unix_path"
27558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27560    new_path="$unix_path"
27561  fi
27562
27563
27564  # Now try to locate executable using which
27565  new_path=`$WHICH "$new_path" 2> /dev/null`
27566
27567  if test "x$new_path" = x; then
27568    # Oops. Which didn't find the executable.
27569    # The splitting of arguments from the executable at a space might have been incorrect,
27570    # since paths with space are more likely in Windows. Give it another try with the whole
27571    # argument.
27572    path="$complete"
27573    arguments="EOL"
27574    new_path="$path"
27575
27576  windows_path="$new_path"
27577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27578    unix_path=`$CYGPATH -u "$windows_path"`
27579    new_path="$unix_path"
27580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27582    new_path="$unix_path"
27583  fi
27584
27585
27586    new_path=`$WHICH "$new_path" 2> /dev/null`
27587
27588    if test "x$new_path" = x; then
27589      # It's still not found. Now this is an unrecoverable error.
27590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27591$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27592      has_space=`$ECHO "$complete" | $GREP " "`
27593      if test "x$has_space" != x; then
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27596      fi
27597      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27598    fi
27599  fi
27600
27601  # Now new_path has a complete unix path to the binary
27602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27603    # Keep paths in /bin as-is, but remove trailing .exe if any
27604    new_path="${new_path/%.exe/}"
27605    # Do not save /bin paths to all_fixpath_prefixes!
27606  else
27607    # Not in mixed or Windows style, start by that.
27608    new_path=`cmd //c echo $new_path`
27609
27610  input_path="$new_path"
27611  # Check if we need to convert this using DOS-style short mode. If the path
27612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27613  # take no chances and rewrite it.
27614  # Note: m4 eats our [], so we need to use [ and ] instead.
27615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27616  if test "x$has_forbidden_chars" != x; then
27617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27619  fi
27620
27621    # Output is in $new_path
27622
27623  windows_path="$new_path"
27624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625    unix_path=`$CYGPATH -u "$windows_path"`
27626    new_path="$unix_path"
27627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27629    new_path="$unix_path"
27630  fi
27631
27632    # remove trailing .exe if any
27633    new_path="${new_path/%.exe/}"
27634
27635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27637  fi
27638
27639  else
27640    # We're on a posix platform. Hooray! :)
27641    # First separate the path from the arguments. This will split at the first
27642    # space.
27643    complete="$STRIP"
27644    path="${complete%% *}"
27645    tmp="$complete EOL"
27646    arguments="${tmp#* }"
27647
27648    # Cannot rely on the command "which" here since it doesn't always work.
27649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27650    if test -z "$is_absolute_path"; then
27651      # Path to executable is not absolute. Find it.
27652      IFS_save="$IFS"
27653      IFS=:
27654      for p in $PATH; do
27655        if test -f "$p/$path" && test -x "$p/$path"; then
27656          new_path="$p/$path"
27657          break
27658        fi
27659      done
27660      IFS="$IFS_save"
27661    else
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27663$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27664      new_path="$path"
27665    fi
27666
27667    if test "x$new_path" = x; then
27668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27669$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27670        has_space=`$ECHO "$complete" | $GREP " "`
27671        if test "x$has_space" != x; then
27672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27674        fi
27675        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27676      fi
27677  fi
27678
27679      # Now join together the path and the arguments once again
27680      if test "x$arguments" != xEOL; then
27681        new_complete="$new_path ${arguments% *}"
27682      else
27683        new_complete="$new_path"
27684      fi
27685
27686  if test "x$complete" != "x$new_complete"; then
27687      STRIP="$new_complete"
27688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27689$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27690    fi
27691
27692fi
27693
27694# objcopy is used for moving debug symbols to separate files when
27695# full debug symbols are enabled.
27696if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27697    if test -n "$ac_tool_prefix"; then
27698  for ac_prog in gobjcopy objcopy
27699  do
27700    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27703$as_echo_n "checking for $ac_word... " >&6; }
27704if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27705  $as_echo_n "(cached) " >&6
27706else
27707  if test -n "$OBJCOPY"; then
27708  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27709else
27710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27711for as_dir in $PATH
27712do
27713  IFS=$as_save_IFS
27714  test -z "$as_dir" && as_dir=.
27715    for ac_exec_ext in '' $ac_executable_extensions; do
27716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27717    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27719    break 2
27720  fi
27721done
27722  done
27723IFS=$as_save_IFS
27724
27725fi
27726fi
27727OBJCOPY=$ac_cv_prog_OBJCOPY
27728if test -n "$OBJCOPY"; then
27729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27730$as_echo "$OBJCOPY" >&6; }
27731else
27732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27733$as_echo "no" >&6; }
27734fi
27735
27736
27737    test -n "$OBJCOPY" && break
27738  done
27739fi
27740if test -z "$OBJCOPY"; then
27741  ac_ct_OBJCOPY=$OBJCOPY
27742  for ac_prog in gobjcopy objcopy
27743do
27744  # Extract the first word of "$ac_prog", so it can be a program name with args.
27745set dummy $ac_prog; ac_word=$2
27746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27747$as_echo_n "checking for $ac_word... " >&6; }
27748if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27749  $as_echo_n "(cached) " >&6
27750else
27751  if test -n "$ac_ct_OBJCOPY"; then
27752  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27753else
27754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27755for as_dir in $PATH
27756do
27757  IFS=$as_save_IFS
27758  test -z "$as_dir" && as_dir=.
27759    for ac_exec_ext in '' $ac_executable_extensions; do
27760  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27761    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27763    break 2
27764  fi
27765done
27766  done
27767IFS=$as_save_IFS
27768
27769fi
27770fi
27771ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27772if test -n "$ac_ct_OBJCOPY"; then
27773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27774$as_echo "$ac_ct_OBJCOPY" >&6; }
27775else
27776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27777$as_echo "no" >&6; }
27778fi
27779
27780
27781  test -n "$ac_ct_OBJCOPY" && break
27782done
27783
27784  if test "x$ac_ct_OBJCOPY" = x; then
27785    OBJCOPY=""
27786  else
27787    case $cross_compiling:$ac_tool_warned in
27788yes:)
27789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27791ac_tool_warned=yes ;;
27792esac
27793    OBJCOPY=$ac_ct_OBJCOPY
27794  fi
27795fi
27796
27797    # Only call fixup if objcopy was found.
27798    if test -n "$OBJCOPY"; then
27799
27800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27801
27802  # First separate the path from the arguments. This will split at the first
27803  # space.
27804  complete="$OBJCOPY"
27805  path="${complete%% *}"
27806  tmp="$complete EOL"
27807  arguments="${tmp#* }"
27808
27809  # Input might be given as Windows format, start by converting to
27810  # unix format.
27811  new_path=`$CYGPATH -u "$path"`
27812
27813  # Now try to locate executable using which
27814  new_path=`$WHICH "$new_path" 2> /dev/null`
27815  # bat and cmd files are not always considered executable in cygwin causing which
27816  # to not find them
27817  if test "x$new_path" = x \
27818           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27819           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27820    new_path=`$CYGPATH -u "$path"`
27821  fi
27822  if test "x$new_path" = x; then
27823    # Oops. Which didn't find the executable.
27824    # The splitting of arguments from the executable at a space might have been incorrect,
27825    # since paths with space are more likely in Windows. Give it another try with the whole
27826    # argument.
27827    path="$complete"
27828    arguments="EOL"
27829    new_path=`$CYGPATH -u "$path"`
27830    new_path=`$WHICH "$new_path" 2> /dev/null`
27831    # bat and cmd files are not always considered executable in cygwin causing which
27832    # to not find them
27833    if test "x$new_path" = x \
27834             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27835             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27836      new_path=`$CYGPATH -u "$path"`
27837    fi
27838    if test "x$new_path" = x; then
27839      # It's still not found. Now this is an unrecoverable error.
27840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27841$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27842      has_space=`$ECHO "$complete" | $GREP " "`
27843      if test "x$has_space" != x; then
27844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27846      fi
27847      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27848    fi
27849  fi
27850
27851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27854  # "foo.exe" is OK but "foo" is an error.
27855  #
27856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27857  # It is also a way to make sure we got the proper file name for the real test later on.
27858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27859  if test "x$test_shortpath" = x; then
27860    # Short path failed, file does not exist as specified.
27861    # Try adding .exe or .cmd
27862    if test -f "${new_path}.exe"; then
27863       input_to_shortpath="${new_path}.exe"
27864    elif test -f "${new_path}.cmd"; then
27865       input_to_shortpath="${new_path}.cmd"
27866    else
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27868$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27871      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27872    fi
27873  else
27874    input_to_shortpath="$new_path"
27875  fi
27876
27877  # Call helper function which possibly converts this using DOS-style short mode.
27878  # If so, the updated path is stored in $new_path.
27879  new_path="$input_to_shortpath"
27880
27881  input_path="$input_to_shortpath"
27882  # Check if we need to convert this using DOS-style short mode. If the path
27883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27884  # take no chances and rewrite it.
27885  # Note: m4 eats our [], so we need to use [ and ] instead.
27886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27887  if test "x$has_forbidden_chars" != x; then
27888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27892      # Going to short mode and back again did indeed matter. Since short mode is
27893      # case insensitive, let's make it lowercase to improve readability.
27894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895      # Now convert it back to Unix-stile (cygpath)
27896      input_path=`$CYGPATH -u "$shortmode_path"`
27897      new_path="$input_path"
27898    fi
27899  fi
27900
27901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27902  if test "x$test_cygdrive_prefix" = x; then
27903    # As a simple fix, exclude /usr/bin since it's not a real path.
27904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27906      # a path prefixed by /cygdrive for fixpath to work.
27907      new_path="$CYGWIN_ROOT_PATH$input_path"
27908    fi
27909  fi
27910
27911  # remove trailing .exe if any
27912  new_path="${new_path/%.exe/}"
27913
27914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27915
27916  # First separate the path from the arguments. This will split at the first
27917  # space.
27918  complete="$OBJCOPY"
27919  path="${complete%% *}"
27920  tmp="$complete EOL"
27921  arguments="${tmp#* }"
27922
27923  # Input might be given as Windows format, start by converting to
27924  # unix format.
27925  new_path="$path"
27926
27927  windows_path="$new_path"
27928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27929    unix_path=`$CYGPATH -u "$windows_path"`
27930    new_path="$unix_path"
27931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27933    new_path="$unix_path"
27934  fi
27935
27936
27937  # Now try to locate executable using which
27938  new_path=`$WHICH "$new_path" 2> /dev/null`
27939
27940  if test "x$new_path" = x; then
27941    # Oops. Which didn't find the executable.
27942    # The splitting of arguments from the executable at a space might have been incorrect,
27943    # since paths with space are more likely in Windows. Give it another try with the whole
27944    # argument.
27945    path="$complete"
27946    arguments="EOL"
27947    new_path="$path"
27948
27949  windows_path="$new_path"
27950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951    unix_path=`$CYGPATH -u "$windows_path"`
27952    new_path="$unix_path"
27953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27955    new_path="$unix_path"
27956  fi
27957
27958
27959    new_path=`$WHICH "$new_path" 2> /dev/null`
27960
27961    if test "x$new_path" = x; then
27962      # It's still not found. Now this is an unrecoverable error.
27963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27964$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27965      has_space=`$ECHO "$complete" | $GREP " "`
27966      if test "x$has_space" != x; then
27967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27969      fi
27970      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27971    fi
27972  fi
27973
27974  # Now new_path has a complete unix path to the binary
27975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27976    # Keep paths in /bin as-is, but remove trailing .exe if any
27977    new_path="${new_path/%.exe/}"
27978    # Do not save /bin paths to all_fixpath_prefixes!
27979  else
27980    # Not in mixed or Windows style, start by that.
27981    new_path=`cmd //c echo $new_path`
27982
27983  input_path="$new_path"
27984  # Check if we need to convert this using DOS-style short mode. If the path
27985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27986  # take no chances and rewrite it.
27987  # Note: m4 eats our [], so we need to use [ and ] instead.
27988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27989  if test "x$has_forbidden_chars" != x; then
27990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27992  fi
27993
27994    # Output is in $new_path
27995
27996  windows_path="$new_path"
27997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27998    unix_path=`$CYGPATH -u "$windows_path"`
27999    new_path="$unix_path"
28000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28002    new_path="$unix_path"
28003  fi
28004
28005    # remove trailing .exe if any
28006    new_path="${new_path/%.exe/}"
28007
28008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28010  fi
28011
28012  else
28013    # We're on a posix platform. Hooray! :)
28014    # First separate the path from the arguments. This will split at the first
28015    # space.
28016    complete="$OBJCOPY"
28017    path="${complete%% *}"
28018    tmp="$complete EOL"
28019    arguments="${tmp#* }"
28020
28021    # Cannot rely on the command "which" here since it doesn't always work.
28022    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28023    if test -z "$is_absolute_path"; then
28024      # Path to executable is not absolute. Find it.
28025      IFS_save="$IFS"
28026      IFS=:
28027      for p in $PATH; do
28028        if test -f "$p/$path" && test -x "$p/$path"; then
28029          new_path="$p/$path"
28030          break
28031        fi
28032      done
28033      IFS="$IFS_save"
28034    else
28035      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28036$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28037      new_path="$path"
28038    fi
28039
28040    if test "x$new_path" = x; then
28041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28042$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28043        has_space=`$ECHO "$complete" | $GREP " "`
28044        if test "x$has_space" != x; then
28045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28047        fi
28048        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28049      fi
28050  fi
28051
28052      # Now join together the path and the arguments once again
28053      if test "x$arguments" != xEOL; then
28054        new_complete="$new_path ${arguments% *}"
28055      else
28056        new_complete="$new_path"
28057      fi
28058
28059  if test "x$complete" != "x$new_complete"; then
28060      OBJCOPY="$new_complete"
28061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28062$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28063    fi
28064
28065    fi
28066fi
28067
28068if test -n "$ac_tool_prefix"; then
28069  for ac_prog in gobjdump objdump
28070  do
28071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28074$as_echo_n "checking for $ac_word... " >&6; }
28075if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
28076  $as_echo_n "(cached) " >&6
28077else
28078  if test -n "$OBJDUMP"; then
28079  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28080else
28081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28082for as_dir in $PATH
28083do
28084  IFS=$as_save_IFS
28085  test -z "$as_dir" && as_dir=.
28086    for ac_exec_ext in '' $ac_executable_extensions; do
28087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28088    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28090    break 2
28091  fi
28092done
28093  done
28094IFS=$as_save_IFS
28095
28096fi
28097fi
28098OBJDUMP=$ac_cv_prog_OBJDUMP
28099if test -n "$OBJDUMP"; then
28100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28101$as_echo "$OBJDUMP" >&6; }
28102else
28103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28104$as_echo "no" >&6; }
28105fi
28106
28107
28108    test -n "$OBJDUMP" && break
28109  done
28110fi
28111if test -z "$OBJDUMP"; then
28112  ac_ct_OBJDUMP=$OBJDUMP
28113  for ac_prog in gobjdump objdump
28114do
28115  # Extract the first word of "$ac_prog", so it can be a program name with args.
28116set dummy $ac_prog; ac_word=$2
28117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28118$as_echo_n "checking for $ac_word... " >&6; }
28119if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
28120  $as_echo_n "(cached) " >&6
28121else
28122  if test -n "$ac_ct_OBJDUMP"; then
28123  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28124else
28125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28126for as_dir in $PATH
28127do
28128  IFS=$as_save_IFS
28129  test -z "$as_dir" && as_dir=.
28130    for ac_exec_ext in '' $ac_executable_extensions; do
28131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28132    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28134    break 2
28135  fi
28136done
28137  done
28138IFS=$as_save_IFS
28139
28140fi
28141fi
28142ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28143if test -n "$ac_ct_OBJDUMP"; then
28144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28145$as_echo "$ac_ct_OBJDUMP" >&6; }
28146else
28147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28148$as_echo "no" >&6; }
28149fi
28150
28151
28152  test -n "$ac_ct_OBJDUMP" && break
28153done
28154
28155  if test "x$ac_ct_OBJDUMP" = x; then
28156    OBJDUMP=""
28157  else
28158    case $cross_compiling:$ac_tool_warned in
28159yes:)
28160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28162ac_tool_warned=yes ;;
28163esac
28164    OBJDUMP=$ac_ct_OBJDUMP
28165  fi
28166fi
28167
28168if test "x$OBJDUMP" != x; then
28169  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28170
28171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28172
28173  # First separate the path from the arguments. This will split at the first
28174  # space.
28175  complete="$OBJDUMP"
28176  path="${complete%% *}"
28177  tmp="$complete EOL"
28178  arguments="${tmp#* }"
28179
28180  # Input might be given as Windows format, start by converting to
28181  # unix format.
28182  new_path=`$CYGPATH -u "$path"`
28183
28184  # Now try to locate executable using which
28185  new_path=`$WHICH "$new_path" 2> /dev/null`
28186  # bat and cmd files are not always considered executable in cygwin causing which
28187  # to not find them
28188  if test "x$new_path" = x \
28189           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28190           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28191    new_path=`$CYGPATH -u "$path"`
28192  fi
28193  if test "x$new_path" = x; then
28194    # Oops. Which didn't find the executable.
28195    # The splitting of arguments from the executable at a space might have been incorrect,
28196    # since paths with space are more likely in Windows. Give it another try with the whole
28197    # argument.
28198    path="$complete"
28199    arguments="EOL"
28200    new_path=`$CYGPATH -u "$path"`
28201    new_path=`$WHICH "$new_path" 2> /dev/null`
28202    # bat and cmd files are not always considered executable in cygwin causing which
28203    # to not find them
28204    if test "x$new_path" = x \
28205             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28206             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28207      new_path=`$CYGPATH -u "$path"`
28208    fi
28209    if test "x$new_path" = x; then
28210      # It's still not found. Now this is an unrecoverable error.
28211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28212$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28213      has_space=`$ECHO "$complete" | $GREP " "`
28214      if test "x$has_space" != x; then
28215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28217      fi
28218      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28219    fi
28220  fi
28221
28222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28225  # "foo.exe" is OK but "foo" is an error.
28226  #
28227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28228  # It is also a way to make sure we got the proper file name for the real test later on.
28229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28230  if test "x$test_shortpath" = x; then
28231    # Short path failed, file does not exist as specified.
28232    # Try adding .exe or .cmd
28233    if test -f "${new_path}.exe"; then
28234       input_to_shortpath="${new_path}.exe"
28235    elif test -f "${new_path}.cmd"; then
28236       input_to_shortpath="${new_path}.cmd"
28237    else
28238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28239$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28242      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28243    fi
28244  else
28245    input_to_shortpath="$new_path"
28246  fi
28247
28248  # Call helper function which possibly converts this using DOS-style short mode.
28249  # If so, the updated path is stored in $new_path.
28250  new_path="$input_to_shortpath"
28251
28252  input_path="$input_to_shortpath"
28253  # Check if we need to convert this using DOS-style short mode. If the path
28254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28255  # take no chances and rewrite it.
28256  # Note: m4 eats our [], so we need to use [ and ] instead.
28257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28258  if test "x$has_forbidden_chars" != x; then
28259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28263      # Going to short mode and back again did indeed matter. Since short mode is
28264      # case insensitive, let's make it lowercase to improve readability.
28265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28266      # Now convert it back to Unix-stile (cygpath)
28267      input_path=`$CYGPATH -u "$shortmode_path"`
28268      new_path="$input_path"
28269    fi
28270  fi
28271
28272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28273  if test "x$test_cygdrive_prefix" = x; then
28274    # As a simple fix, exclude /usr/bin since it's not a real path.
28275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28277      # a path prefixed by /cygdrive for fixpath to work.
28278      new_path="$CYGWIN_ROOT_PATH$input_path"
28279    fi
28280  fi
28281
28282  # remove trailing .exe if any
28283  new_path="${new_path/%.exe/}"
28284
28285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28286
28287  # First separate the path from the arguments. This will split at the first
28288  # space.
28289  complete="$OBJDUMP"
28290  path="${complete%% *}"
28291  tmp="$complete EOL"
28292  arguments="${tmp#* }"
28293
28294  # Input might be given as Windows format, start by converting to
28295  # unix format.
28296  new_path="$path"
28297
28298  windows_path="$new_path"
28299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300    unix_path=`$CYGPATH -u "$windows_path"`
28301    new_path="$unix_path"
28302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28304    new_path="$unix_path"
28305  fi
28306
28307
28308  # Now try to locate executable using which
28309  new_path=`$WHICH "$new_path" 2> /dev/null`
28310
28311  if test "x$new_path" = x; then
28312    # Oops. Which didn't find the executable.
28313    # The splitting of arguments from the executable at a space might have been incorrect,
28314    # since paths with space are more likely in Windows. Give it another try with the whole
28315    # argument.
28316    path="$complete"
28317    arguments="EOL"
28318    new_path="$path"
28319
28320  windows_path="$new_path"
28321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322    unix_path=`$CYGPATH -u "$windows_path"`
28323    new_path="$unix_path"
28324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28326    new_path="$unix_path"
28327  fi
28328
28329
28330    new_path=`$WHICH "$new_path" 2> /dev/null`
28331
28332    if test "x$new_path" = x; then
28333      # It's still not found. Now this is an unrecoverable error.
28334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28335$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28336      has_space=`$ECHO "$complete" | $GREP " "`
28337      if test "x$has_space" != x; then
28338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28340      fi
28341      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28342    fi
28343  fi
28344
28345  # Now new_path has a complete unix path to the binary
28346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28347    # Keep paths in /bin as-is, but remove trailing .exe if any
28348    new_path="${new_path/%.exe/}"
28349    # Do not save /bin paths to all_fixpath_prefixes!
28350  else
28351    # Not in mixed or Windows style, start by that.
28352    new_path=`cmd //c echo $new_path`
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28363  fi
28364
28365    # Output is in $new_path
28366
28367  windows_path="$new_path"
28368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28369    unix_path=`$CYGPATH -u "$windows_path"`
28370    new_path="$unix_path"
28371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28373    new_path="$unix_path"
28374  fi
28375
28376    # remove trailing .exe if any
28377    new_path="${new_path/%.exe/}"
28378
28379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28381  fi
28382
28383  else
28384    # We're on a posix platform. Hooray! :)
28385    # First separate the path from the arguments. This will split at the first
28386    # space.
28387    complete="$OBJDUMP"
28388    path="${complete%% *}"
28389    tmp="$complete EOL"
28390    arguments="${tmp#* }"
28391
28392    # Cannot rely on the command "which" here since it doesn't always work.
28393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28394    if test -z "$is_absolute_path"; then
28395      # Path to executable is not absolute. Find it.
28396      IFS_save="$IFS"
28397      IFS=:
28398      for p in $PATH; do
28399        if test -f "$p/$path" && test -x "$p/$path"; then
28400          new_path="$p/$path"
28401          break
28402        fi
28403      done
28404      IFS="$IFS_save"
28405    else
28406      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28407$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28408      new_path="$path"
28409    fi
28410
28411    if test "x$new_path" = x; then
28412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28413$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28414        has_space=`$ECHO "$complete" | $GREP " "`
28415        if test "x$has_space" != x; then
28416          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28418        fi
28419        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28420      fi
28421  fi
28422
28423      # Now join together the path and the arguments once again
28424      if test "x$arguments" != xEOL; then
28425        new_complete="$new_path ${arguments% *}"
28426      else
28427        new_complete="$new_path"
28428      fi
28429
28430  if test "x$complete" != "x$new_complete"; then
28431      OBJDUMP="$new_complete"
28432      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28433$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28434    fi
28435
28436fi
28437
28438if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28439   # Extract the first word of "lipo", so it can be a program name with args.
28440set dummy lipo; ac_word=$2
28441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28442$as_echo_n "checking for $ac_word... " >&6; }
28443if test "${ac_cv_path_LIPO+set}" = set; then :
28444  $as_echo_n "(cached) " >&6
28445else
28446  case $LIPO in
28447  [\\/]* | ?:[\\/]*)
28448  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28449  ;;
28450  *)
28451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28452for as_dir in $PATH
28453do
28454  IFS=$as_save_IFS
28455  test -z "$as_dir" && as_dir=.
28456    for ac_exec_ext in '' $ac_executable_extensions; do
28457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28458    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28460    break 2
28461  fi
28462done
28463  done
28464IFS=$as_save_IFS
28465
28466  ;;
28467esac
28468fi
28469LIPO=$ac_cv_path_LIPO
28470if test -n "$LIPO"; then
28471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28472$as_echo "$LIPO" >&6; }
28473else
28474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28475$as_echo "no" >&6; }
28476fi
28477
28478
28479
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481
28482  # First separate the path from the arguments. This will split at the first
28483  # space.
28484  complete="$LIPO"
28485  path="${complete%% *}"
28486  tmp="$complete EOL"
28487  arguments="${tmp#* }"
28488
28489  # Input might be given as Windows format, start by converting to
28490  # unix format.
28491  new_path=`$CYGPATH -u "$path"`
28492
28493  # Now try to locate executable using which
28494  new_path=`$WHICH "$new_path" 2> /dev/null`
28495  # bat and cmd files are not always considered executable in cygwin causing which
28496  # to not find them
28497  if test "x$new_path" = x \
28498           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28499           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28500    new_path=`$CYGPATH -u "$path"`
28501  fi
28502  if test "x$new_path" = x; then
28503    # Oops. Which didn't find the executable.
28504    # The splitting of arguments from the executable at a space might have been incorrect,
28505    # since paths with space are more likely in Windows. Give it another try with the whole
28506    # argument.
28507    path="$complete"
28508    arguments="EOL"
28509    new_path=`$CYGPATH -u "$path"`
28510    new_path=`$WHICH "$new_path" 2> /dev/null`
28511    # bat and cmd files are not always considered executable in cygwin causing which
28512    # to not find them
28513    if test "x$new_path" = x \
28514             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28515             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28516      new_path=`$CYGPATH -u "$path"`
28517    fi
28518    if test "x$new_path" = x; then
28519      # It's still not found. Now this is an unrecoverable error.
28520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28521$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28522      has_space=`$ECHO "$complete" | $GREP " "`
28523      if test "x$has_space" != x; then
28524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28526      fi
28527      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28528    fi
28529  fi
28530
28531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28534  # "foo.exe" is OK but "foo" is an error.
28535  #
28536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28537  # It is also a way to make sure we got the proper file name for the real test later on.
28538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28539  if test "x$test_shortpath" = x; then
28540    # Short path failed, file does not exist as specified.
28541    # Try adding .exe or .cmd
28542    if test -f "${new_path}.exe"; then
28543       input_to_shortpath="${new_path}.exe"
28544    elif test -f "${new_path}.cmd"; then
28545       input_to_shortpath="${new_path}.cmd"
28546    else
28547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28548$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28551      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28552    fi
28553  else
28554    input_to_shortpath="$new_path"
28555  fi
28556
28557  # Call helper function which possibly converts this using DOS-style short mode.
28558  # If so, the updated path is stored in $new_path.
28559  new_path="$input_to_shortpath"
28560
28561  input_path="$input_to_shortpath"
28562  # Check if we need to convert this using DOS-style short mode. If the path
28563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28564  # take no chances and rewrite it.
28565  # Note: m4 eats our [], so we need to use [ and ] instead.
28566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28567  if test "x$has_forbidden_chars" != x; then
28568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28572      # Going to short mode and back again did indeed matter. Since short mode is
28573      # case insensitive, let's make it lowercase to improve readability.
28574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28575      # Now convert it back to Unix-stile (cygpath)
28576      input_path=`$CYGPATH -u "$shortmode_path"`
28577      new_path="$input_path"
28578    fi
28579  fi
28580
28581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28582  if test "x$test_cygdrive_prefix" = x; then
28583    # As a simple fix, exclude /usr/bin since it's not a real path.
28584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28586      # a path prefixed by /cygdrive for fixpath to work.
28587      new_path="$CYGWIN_ROOT_PATH$input_path"
28588    fi
28589  fi
28590
28591  # remove trailing .exe if any
28592  new_path="${new_path/%.exe/}"
28593
28594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28595
28596  # First separate the path from the arguments. This will split at the first
28597  # space.
28598  complete="$LIPO"
28599  path="${complete%% *}"
28600  tmp="$complete EOL"
28601  arguments="${tmp#* }"
28602
28603  # Input might be given as Windows format, start by converting to
28604  # unix format.
28605  new_path="$path"
28606
28607  windows_path="$new_path"
28608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28609    unix_path=`$CYGPATH -u "$windows_path"`
28610    new_path="$unix_path"
28611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28613    new_path="$unix_path"
28614  fi
28615
28616
28617  # Now try to locate executable using which
28618  new_path=`$WHICH "$new_path" 2> /dev/null`
28619
28620  if test "x$new_path" = x; then
28621    # Oops. Which didn't find the executable.
28622    # The splitting of arguments from the executable at a space might have been incorrect,
28623    # since paths with space are more likely in Windows. Give it another try with the whole
28624    # argument.
28625    path="$complete"
28626    arguments="EOL"
28627    new_path="$path"
28628
28629  windows_path="$new_path"
28630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28631    unix_path=`$CYGPATH -u "$windows_path"`
28632    new_path="$unix_path"
28633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28635    new_path="$unix_path"
28636  fi
28637
28638
28639    new_path=`$WHICH "$new_path" 2> /dev/null`
28640
28641    if test "x$new_path" = x; then
28642      # It's still not found. Now this is an unrecoverable error.
28643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28644$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28645      has_space=`$ECHO "$complete" | $GREP " "`
28646      if test "x$has_space" != x; then
28647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28649      fi
28650      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28651    fi
28652  fi
28653
28654  # Now new_path has a complete unix path to the binary
28655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28656    # Keep paths in /bin as-is, but remove trailing .exe if any
28657    new_path="${new_path/%.exe/}"
28658    # Do not save /bin paths to all_fixpath_prefixes!
28659  else
28660    # Not in mixed or Windows style, start by that.
28661    new_path=`cmd //c echo $new_path`
28662
28663  input_path="$new_path"
28664  # Check if we need to convert this using DOS-style short mode. If the path
28665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28666  # take no chances and rewrite it.
28667  # Note: m4 eats our [], so we need to use [ and ] instead.
28668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28669  if test "x$has_forbidden_chars" != x; then
28670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28672  fi
28673
28674    # Output is in $new_path
28675
28676  windows_path="$new_path"
28677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678    unix_path=`$CYGPATH -u "$windows_path"`
28679    new_path="$unix_path"
28680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28682    new_path="$unix_path"
28683  fi
28684
28685    # remove trailing .exe if any
28686    new_path="${new_path/%.exe/}"
28687
28688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28690  fi
28691
28692  else
28693    # We're on a posix platform. Hooray! :)
28694    # First separate the path from the arguments. This will split at the first
28695    # space.
28696    complete="$LIPO"
28697    path="${complete%% *}"
28698    tmp="$complete EOL"
28699    arguments="${tmp#* }"
28700
28701    # Cannot rely on the command "which" here since it doesn't always work.
28702    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28703    if test -z "$is_absolute_path"; then
28704      # Path to executable is not absolute. Find it.
28705      IFS_save="$IFS"
28706      IFS=:
28707      for p in $PATH; do
28708        if test -f "$p/$path" && test -x "$p/$path"; then
28709          new_path="$p/$path"
28710          break
28711        fi
28712      done
28713      IFS="$IFS_save"
28714    else
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28716$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28717      new_path="$path"
28718    fi
28719
28720    if test "x$new_path" = x; then
28721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28722$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28723        has_space=`$ECHO "$complete" | $GREP " "`
28724        if test "x$has_space" != x; then
28725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28727        fi
28728        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28729      fi
28730  fi
28731
28732      # Now join together the path and the arguments once again
28733      if test "x$arguments" != xEOL; then
28734        new_complete="$new_path ${arguments% *}"
28735      else
28736        new_complete="$new_path"
28737      fi
28738
28739  if test "x$complete" != "x$new_complete"; then
28740      LIPO="$new_complete"
28741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28742$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28743    fi
28744
28745fi
28746
28747
28748
28749# Restore old path without tools dir
28750PATH="$OLD_PATH"
28751
28752
28753# FIXME: Currently we must test this after paths but before flags. Fix!
28754
28755# And we can test some aspects on the target using configure macros.
28756
28757
28758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28759$as_echo_n "checking for ANSI C header files... " >&6; }
28760if test "${ac_cv_header_stdc+set}" = set; then :
28761  $as_echo_n "(cached) " >&6
28762else
28763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28764/* end confdefs.h.  */
28765#include <stdlib.h>
28766#include <stdarg.h>
28767#include <string.h>
28768#include <float.h>
28769
28770int
28771main ()
28772{
28773
28774  ;
28775  return 0;
28776}
28777_ACEOF
28778if ac_fn_cxx_try_compile "$LINENO"; then :
28779  ac_cv_header_stdc=yes
28780else
28781  ac_cv_header_stdc=no
28782fi
28783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28784
28785if test $ac_cv_header_stdc = yes; then
28786  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788/* end confdefs.h.  */
28789#include <string.h>
28790
28791_ACEOF
28792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28793  $EGREP "memchr" >/dev/null 2>&1; then :
28794
28795else
28796  ac_cv_header_stdc=no
28797fi
28798rm -f conftest*
28799
28800fi
28801
28802if test $ac_cv_header_stdc = yes; then
28803  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28805/* end confdefs.h.  */
28806#include <stdlib.h>
28807
28808_ACEOF
28809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28810  $EGREP "free" >/dev/null 2>&1; then :
28811
28812else
28813  ac_cv_header_stdc=no
28814fi
28815rm -f conftest*
28816
28817fi
28818
28819if test $ac_cv_header_stdc = yes; then
28820  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28821  if test "$cross_compiling" = yes; then :
28822  :
28823else
28824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28825/* end confdefs.h.  */
28826#include <ctype.h>
28827#include <stdlib.h>
28828#if ((' ' & 0x0FF) == 0x020)
28829# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28830# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28831#else
28832# define ISLOWER(c) \
28833		   (('a' <= (c) && (c) <= 'i') \
28834		     || ('j' <= (c) && (c) <= 'r') \
28835		     || ('s' <= (c) && (c) <= 'z'))
28836# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28837#endif
28838
28839#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28840int
28841main ()
28842{
28843  int i;
28844  for (i = 0; i < 256; i++)
28845    if (XOR (islower (i), ISLOWER (i))
28846	|| toupper (i) != TOUPPER (i))
28847      return 2;
28848  return 0;
28849}
28850_ACEOF
28851if ac_fn_cxx_try_run "$LINENO"; then :
28852
28853else
28854  ac_cv_header_stdc=no
28855fi
28856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28857  conftest.$ac_objext conftest.beam conftest.$ac_ext
28858fi
28859
28860fi
28861fi
28862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28863$as_echo "$ac_cv_header_stdc" >&6; }
28864if test $ac_cv_header_stdc = yes; then
28865
28866$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28867
28868fi
28869
28870# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28871for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28872		  inttypes.h stdint.h unistd.h
28873do :
28874  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28875ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28876"
28877if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28878  cat >>confdefs.h <<_ACEOF
28879#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28880_ACEOF
28881
28882fi
28883
28884done
28885
28886
28887
28888###############################################################################
28889#
28890# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28891# (The JVM can use 32 or 64 bit Java pointers but that decision
28892# is made at runtime.)
28893#
28894
28895if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28896  # Always specify -m flags on Solaris
28897
28898  # keep track of c/cxx flags that we added outselves...
28899  #   to prevent emitting warning...
28900  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28901  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28902  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28903
28904  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28905  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28906  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28907
28908  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28909  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28910  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28911
28912elif test "x$COMPILE_TYPE" = xreduced; then
28913  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28914    # Specify -m if running reduced on other Posix platforms
28915
28916  # keep track of c/cxx flags that we added outselves...
28917  #   to prevent emitting warning...
28918  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28919  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28920  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28921
28922  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28923  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28924  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28925
28926  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28927  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28928  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28929
28930  fi
28931fi
28932
28933# Make compilation sanity check
28934for ac_header in stdio.h
28935do :
28936  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28937if test "x$ac_cv_header_stdio_h" = x""yes; then :
28938  cat >>confdefs.h <<_ACEOF
28939#define HAVE_STDIO_H 1
28940_ACEOF
28941
28942else
28943
28944  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28945$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28946  if test "x$COMPILE_TYPE" = xreduced; then
28947    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28948$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28949  elif test "x$COMPILE_TYPE" = xcross; then
28950    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28951$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28952  fi
28953  as_fn_error $? "Cannot continue." "$LINENO" 5
28954
28955fi
28956
28957done
28958
28959
28960# The cast to long int works around a bug in the HP C Compiler
28961# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28962# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28963# This bug is HP SR number 8606223364.
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28965$as_echo_n "checking size of int *... " >&6; }
28966if test "${ac_cv_sizeof_int_p+set}" = set; then :
28967  $as_echo_n "(cached) " >&6
28968else
28969  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28970
28971else
28972  if test "$ac_cv_type_int_p" = yes; then
28973     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28975as_fn_error 77 "cannot compute sizeof (int *)
28976See \`config.log' for more details" "$LINENO" 5 ; }
28977   else
28978     ac_cv_sizeof_int_p=0
28979   fi
28980fi
28981
28982fi
28983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28984$as_echo "$ac_cv_sizeof_int_p" >&6; }
28985
28986
28987
28988cat >>confdefs.h <<_ACEOF
28989#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28990_ACEOF
28991
28992
28993
28994if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28995  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28996  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28997fi
28998
28999if test "x$SIZEOF_INT_P" = x; then
29000    # The test failed, lets stick to the assumed value.
29001    { $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
29002$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29003else
29004    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
29005
29006    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29007        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
29008    fi
29009fi
29010
29011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29012$as_echo_n "checking for target address size... " >&6; }
29013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29014$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29015
29016
29017###############################################################################
29018#
29019# Is the target little of big endian?
29020#
29021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29022$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29023if test "${ac_cv_c_bigendian+set}" = set; then :
29024  $as_echo_n "(cached) " >&6
29025else
29026  ac_cv_c_bigendian=unknown
29027    # See if we're dealing with a universal compiler.
29028    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29029/* end confdefs.h.  */
29030#ifndef __APPLE_CC__
29031	       not a universal capable compiler
29032	     #endif
29033	     typedef int dummy;
29034
29035_ACEOF
29036if ac_fn_cxx_try_compile "$LINENO"; then :
29037
29038	# Check for potential -arch flags.  It is not universal unless
29039	# there are at least two -arch flags with different values.
29040	ac_arch=
29041	ac_prev=
29042	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29043	 if test -n "$ac_prev"; then
29044	   case $ac_word in
29045	     i?86 | x86_64 | ppc | ppc64)
29046	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29047		 ac_arch=$ac_word
29048	       else
29049		 ac_cv_c_bigendian=universal
29050		 break
29051	       fi
29052	       ;;
29053	   esac
29054	   ac_prev=
29055	 elif test "x$ac_word" = "x-arch"; then
29056	   ac_prev=arch
29057	 fi
29058       done
29059fi
29060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29061    if test $ac_cv_c_bigendian = unknown; then
29062      # See if sys/param.h defines the BYTE_ORDER macro.
29063      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29064/* end confdefs.h.  */
29065#include <sys/types.h>
29066	     #include <sys/param.h>
29067
29068int
29069main ()
29070{
29071#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29072		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29073		     && LITTLE_ENDIAN)
29074	      bogus endian macros
29075	     #endif
29076
29077  ;
29078  return 0;
29079}
29080_ACEOF
29081if ac_fn_cxx_try_compile "$LINENO"; then :
29082  # It does; now see whether it defined to BIG_ENDIAN or not.
29083	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29084/* end confdefs.h.  */
29085#include <sys/types.h>
29086		#include <sys/param.h>
29087
29088int
29089main ()
29090{
29091#if BYTE_ORDER != BIG_ENDIAN
29092		 not big endian
29093		#endif
29094
29095  ;
29096  return 0;
29097}
29098_ACEOF
29099if ac_fn_cxx_try_compile "$LINENO"; then :
29100  ac_cv_c_bigendian=yes
29101else
29102  ac_cv_c_bigendian=no
29103fi
29104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29105fi
29106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29107    fi
29108    if test $ac_cv_c_bigendian = unknown; then
29109      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29110      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29111/* end confdefs.h.  */
29112#include <limits.h>
29113
29114int
29115main ()
29116{
29117#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29118	      bogus endian macros
29119	     #endif
29120
29121  ;
29122  return 0;
29123}
29124_ACEOF
29125if ac_fn_cxx_try_compile "$LINENO"; then :
29126  # It does; now see whether it defined to _BIG_ENDIAN or not.
29127	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29128/* end confdefs.h.  */
29129#include <limits.h>
29130
29131int
29132main ()
29133{
29134#ifndef _BIG_ENDIAN
29135		 not big endian
29136		#endif
29137
29138  ;
29139  return 0;
29140}
29141_ACEOF
29142if ac_fn_cxx_try_compile "$LINENO"; then :
29143  ac_cv_c_bigendian=yes
29144else
29145  ac_cv_c_bigendian=no
29146fi
29147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29148fi
29149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29150    fi
29151    if test $ac_cv_c_bigendian = unknown; then
29152      # Compile a test program.
29153      if test "$cross_compiling" = yes; then :
29154  # Try to guess by grepping values from an object file.
29155	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29156/* end confdefs.h.  */
29157short int ascii_mm[] =
29158		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29159		short int ascii_ii[] =
29160		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29161		int use_ascii (int i) {
29162		  return ascii_mm[i] + ascii_ii[i];
29163		}
29164		short int ebcdic_ii[] =
29165		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29166		short int ebcdic_mm[] =
29167		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29168		int use_ebcdic (int i) {
29169		  return ebcdic_mm[i] + ebcdic_ii[i];
29170		}
29171		extern int foo;
29172
29173int
29174main ()
29175{
29176return use_ascii (foo) == use_ebcdic (foo);
29177  ;
29178  return 0;
29179}
29180_ACEOF
29181if ac_fn_cxx_try_compile "$LINENO"; then :
29182  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29183	      ac_cv_c_bigendian=yes
29184	    fi
29185	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29186	      if test "$ac_cv_c_bigendian" = unknown; then
29187		ac_cv_c_bigendian=no
29188	      else
29189		# finding both strings is unlikely to happen, but who knows?
29190		ac_cv_c_bigendian=unknown
29191	      fi
29192	    fi
29193fi
29194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29195else
29196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29197/* end confdefs.h.  */
29198$ac_includes_default
29199int
29200main ()
29201{
29202
29203	     /* Are we little or big endian?  From Harbison&Steele.  */
29204	     union
29205	     {
29206	       long int l;
29207	       char c[sizeof (long int)];
29208	     } u;
29209	     u.l = 1;
29210	     return u.c[sizeof (long int) - 1] == 1;
29211
29212  ;
29213  return 0;
29214}
29215_ACEOF
29216if ac_fn_cxx_try_run "$LINENO"; then :
29217  ac_cv_c_bigendian=no
29218else
29219  ac_cv_c_bigendian=yes
29220fi
29221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29222  conftest.$ac_objext conftest.beam conftest.$ac_ext
29223fi
29224
29225    fi
29226fi
29227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29228$as_echo "$ac_cv_c_bigendian" >&6; }
29229 case $ac_cv_c_bigendian in #(
29230   yes)
29231     ENDIAN="big";; #(
29232   no)
29233     ENDIAN="little" ;; #(
29234   universal)
29235     ENDIAN="universal_endianness"
29236     ;; #(
29237   *)
29238     ENDIAN="unknown" ;;
29239 esac
29240
29241
29242if test "x$ENDIAN" = xuniversal_endianness; then
29243    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29244fi
29245if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29246    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
29247fi
29248
29249
29250# Configure flags for the tools
29251
29252
29253###############################################################################
29254#
29255# How to compile shared libraries.
29256#
29257
29258if test "x$GCC" = xyes; then
29259    COMPILER_NAME=gcc
29260    PICFLAG="-fPIC"
29261    LIBRARY_PREFIX=lib
29262    SHARED_LIBRARY='lib$1.so'
29263    STATIC_LIBRARY='lib$1.a'
29264    SHARED_LIBRARY_FLAGS="-shared"
29265    SHARED_LIBRARY_SUFFIX='.so'
29266    STATIC_LIBRARY_SUFFIX='.a'
29267    OBJ_SUFFIX='.o'
29268    EXE_SUFFIX=''
29269    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29270    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29271    C_FLAG_REORDER=''
29272    CXX_FLAG_REORDER=''
29273    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29274    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29275    LD="$CC"
29276    LDEXE="$CC"
29277    LDCXX="$CXX"
29278    LDEXECXX="$CXX"
29279    POST_STRIP_CMD="$STRIP -g"
29280
29281    # Linking is different on MacOSX
29282    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29283        # Might change in the future to clang.
29284        COMPILER_NAME=gcc
29285        SHARED_LIBRARY='lib$1.dylib'
29286        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29287        SHARED_LIBRARY_SUFFIX='.dylib'
29288        EXE_SUFFIX=''
29289        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29290        SET_SHARED_LIBRARY_MAPFILE=''
29291        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29292        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29293        POST_STRIP_CMD="$STRIP -S"
29294    fi
29295else
29296    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29297        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29298        COMPILER_NAME=ossc
29299        PICFLAG="-KPIC"
29300        LIBRARY_PREFIX=lib
29301        SHARED_LIBRARY='lib$1.so'
29302        STATIC_LIBRARY='lib$1.a'
29303        SHARED_LIBRARY_FLAGS="-G"
29304        SHARED_LIBRARY_SUFFIX='.so'
29305        STATIC_LIBRARY_SUFFIX='.a'
29306        OBJ_SUFFIX='.o'
29307        EXE_SUFFIX=''
29308        SET_SHARED_LIBRARY_NAME=''
29309        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29310	C_FLAG_REORDER='-xF'
29311	CXX_FLAG_REORDER='-xF'
29312        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29313        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29314        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29315        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29316        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29317        POST_STRIP_CMD="$STRIP -x"
29318        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29319    fi
29320    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29321        # If it is not gcc, then assume it is the MS Visual Studio compiler
29322        COMPILER_NAME=cl
29323        PICFLAG=""
29324        LIBRARY_PREFIX=
29325        SHARED_LIBRARY='$1.dll'
29326        STATIC_LIBRARY='$1.lib'
29327        SHARED_LIBRARY_FLAGS="-LD"
29328        SHARED_LIBRARY_SUFFIX='.dll'
29329        STATIC_LIBRARY_SUFFIX='.lib'
29330        OBJ_SUFFIX='.obj'
29331        EXE_SUFFIX='.exe'
29332        SET_SHARED_LIBRARY_NAME=''
29333        SET_SHARED_LIBRARY_MAPFILE=''
29334        SET_SHARED_LIBRARY_ORIGIN=''
29335        SET_EXECUTABLE_ORIGIN=''
29336    fi
29337fi
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357# The (cross) compiler is now configured, we can now test capabilities
29358# of the target platform.
29359
29360
29361
29362###############################################################################
29363#
29364# Setup the opt flags for different compilers
29365# and different operating systems.
29366#
29367
29368#
29369# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29370#
29371if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29372    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29373    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29374    CFLAGS="$CFLAGS -mstackrealign"
29375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29376$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29377    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29378/* end confdefs.h.  */
29379int main() { return 0; }
29380_ACEOF
29381if ac_fn_cxx_try_link "$LINENO"; then :
29382
29383		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29384$as_echo "yes" >&6; }
29385
29386else
29387
29388		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29389$as_echo "no" >&6; }
29390	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29391
29392fi
29393rm -f core conftest.err conftest.$ac_objext \
29394    conftest$ac_exeext conftest.$ac_ext
29395fi
29396
29397C_FLAG_DEPS="-MMD -MF"
29398CXX_FLAG_DEPS="-MMD -MF"
29399
29400case $COMPILER_TYPE in
29401  CC )
29402    case $COMPILER_NAME in
29403      gcc )
29404      	case $OPENJDK_TARGET_OS in
29405	  macosx )
29406	    # On MacOSX we optimize for size, something
29407	    # we should do for all platforms?
29408	    C_O_FLAG_HI="-Os"
29409	    C_O_FLAG_NORM="-Os"
29410	    C_O_FLAG_NONE=""
29411	    ;;
29412	  *)
29413	    C_O_FLAG_HI="-O3"
29414	    C_O_FLAG_NORM="-O2"
29415	    C_O_FLAG_NONE="-O0"
29416	    ;;
29417	esac
29418        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29419        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29420        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29421        CFLAGS_DEBUG_SYMBOLS="-g"
29422        CXXFLAGS_DEBUG_SYMBOLS="-g"
29423        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29424            CFLAGS_DEBUG_SYMBOLS="-g1"
29425            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29426        fi
29427        ;;
29428      ossc )
29429        #
29430        # Forte has different names for this with their C++ compiler...
29431        #
29432        C_FLAG_DEPS="-xMMD -xMF"
29433        CXX_FLAG_DEPS="-xMMD -xMF"
29434
29435        # Extra options used with HIGHEST
29436        #
29437        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29438        #          done with care, there are some assumptions below that need to
29439        #          be understood about the use of pointers, and IEEE behavior.
29440        #
29441        # Use non-standard floating point mode (not IEEE 754)
29442        CC_HIGHEST="$CC_HIGHEST -fns"
29443        # Do some simplification of floating point arithmetic (not IEEE 754)
29444        CC_HIGHEST="$CC_HIGHEST -fsimple"
29445        # Use single precision floating point with 'float'
29446        CC_HIGHEST="$CC_HIGHEST -fsingle"
29447        # Assume memory references via basic pointer types do not alias
29448        #   (Source with excessing pointer casting and data access with mixed
29449        #    pointer types are not recommended)
29450        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29451        # Use intrinsic or inline versions for math/std functions
29452        #   (If you expect perfect errno behavior, do not use this)
29453        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29454        # Loop data dependency optimizations (need -xO3 or higher)
29455        CC_HIGHEST="$CC_HIGHEST -xdepend"
29456        # Pointer parameters to functions do not overlap
29457        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29458        #    If you pass in multiple pointers to the same data, do not use this)
29459        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29460        # Inline some library routines
29461        #   (If you expect perfect errno behavior, do not use this)
29462        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29463        # Use optimized math routines
29464        #   (If you expect perfect errno behavior, do not use this)
29465        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29466        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29467
29468        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29469          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29470          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29471        fi
29472
29473        case $OPENJDK_TARGET_CPU_ARCH in
29474          x86)
29475            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29476            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29477            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29478            C_O_FLAG_NONE="-xregs=no%frameptr"
29479            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29480            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29481            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29482            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29483            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29484               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29485               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29486            fi
29487            ;;
29488          sparc)
29489            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29490            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29491            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29492            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29493            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29494            C_O_FLAG_NONE=""
29495            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29496            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29497            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29498            CXX_O_FLAG_NONE=""
29499            ;;
29500        esac
29501
29502    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29503    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29504    esac
29505    ;;
29506  CL )
29507    C_O_FLAG_HIGHEST="-O2"
29508    C_O_FLAG_HI="-O1"
29509    C_O_FLAG_NORM="-O1"
29510    C_O_FLAG_NONE="-Od"
29511    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29512    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29513    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29514    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29515    ;;
29516esac
29517
29518if test -z "$C_O_FLAG_HIGHEST"; then
29519   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29520fi
29521
29522if test -z "$CXX_O_FLAG_HIGHEST"; then
29523   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29524fi
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29540   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29541$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29542fi
29543
29544if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29545   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29546$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29547fi
29548
29549if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29550   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29551$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29552fi
29553
29554
29555# Check whether --with-extra-cflags was given.
29556if test "${with_extra_cflags+set}" = set; then :
29557  withval=$with_extra_cflags;
29558fi
29559
29560
29561
29562# Check whether --with-extra-cxxflags was given.
29563if test "${with_extra_cxxflags+set}" = set; then :
29564  withval=$with_extra_cxxflags;
29565fi
29566
29567
29568
29569# Check whether --with-extra-ldflags was given.
29570if test "${with_extra_ldflags+set}" = set; then :
29571  withval=$with_extra_ldflags;
29572fi
29573
29574
29575CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29576CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29577LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29578
29579# Hotspot needs these set in their legacy form
29580LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29581LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29582LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29583
29584
29585
29586
29587
29588###############################################################################
29589#
29590# Now setup the CFLAGS and LDFLAGS for the JDK build.
29591# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29592#
29593case $COMPILER_NAME in
29594      gcc )
29595      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29596                          -pipe \
29597                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29598	  case $OPENJDK_TARGET_CPU_ARCH in
29599	  arm )
29600            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29601	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29602	  ;;
29603	  ppc )
29604            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29605	  ;;
29606	  * )
29607	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29608	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29609          ;;
29610	  esac
29611          ;;
29612      ossc )
29613          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29614          case $OPENJDK_TARGET_CPU_ARCH in
29615          x86 )
29616            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29617       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29618          ;;
29619          esac
29620
29621      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29622      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29623
29624          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29625          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29626          ;;
29627      cl )
29628          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29629               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29630	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29631	       -DWIN32 -DIAL"
29632          case $OPENJDK_TARGET_CPU in
29633              x86 )
29634                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29635                  ;;
29636              x86_64 )
29637                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29638                  ;;
29639          esac
29640          ;;
29641esac
29642
29643###############################################################################
29644
29645# Adjust flags according to debug level.
29646case $DEBUG_LEVEL in
29647      fastdebug )
29648              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29649              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29650	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29651	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29652	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29653	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29654              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29655              ;;
29656      slowdebug )
29657              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29658              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29659	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29660	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29661	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29662	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29663              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29664              ;;
29665esac
29666
29667CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29668
29669# The package path is used only on macosx?
29670PACKAGE_PATH=/opt/local
29671
29672
29673if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29674    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29675    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29676    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29677    #   Note: -Dmacro         is the same as    #define macro 1
29678    #         -Dmacro=	    is the same as    #define macro
29679    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29680        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29681    else
29682        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29683    fi
29684else
29685    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29686fi
29687if test "x$OPENJDK_TARGET_OS" = xlinux; then
29688    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29689fi
29690if test "x$OPENJDK_TARGET_OS" = xwindows; then
29691    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29692fi
29693if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29694    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29695fi
29696if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29697    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29698    # Setting these parameters makes it an error to link to macosx APIs that are
29699    # newer than the given OS version and makes the linked binaries compatible even
29700    # if built on a newer version of the OS.
29701    # The expected format is X.Y.Z
29702    MACOSX_VERSION_MIN=10.7.0
29703
29704    # The macro takes the version with no dots, ex: 1070
29705    # Let the flags variables get resolved in make for easier override on make
29706    # command line.
29707    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29708    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29709fi
29710if test "x$OPENJDK_TARGET_OS" = xbsd; then
29711    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29712fi
29713if test "x$DEBUG_LEVEL" = xrelease; then
29714    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29715    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29716        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29717    fi
29718else
29719    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29720fi
29721
29722CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29723CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29724
29725CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29726        -I${JDK_OUTPUTDIR}/include \
29727        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29728        -I${JDK_TOPDIR}/src/share/javavm/export \
29729        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29730        -I${JDK_TOPDIR}/src/share/native/common \
29731        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29732
29733# The shared libraries are compiled using the picflag.
29734CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29735CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29736
29737# Executable flags
29738CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29739CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29740
29741# Now this is odd. The JDK native libraries have to link against libjvm.so
29742# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29743# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29744# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29745# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29746# libraries will link to whatever is in memory. Yuck.
29747#
29748# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29749if test "x$COMPILER_NAME" = xcl; then
29750    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29751    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29752        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29753    fi
29754    # TODO: make -debug optional "--disable-full-debug-symbols"
29755    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29756    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29757    LDFLAGS_JDKLIB_SUFFIX=""
29758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29759        LDFLAGS_STACK_SIZE=1048576
29760    else
29761        LDFLAGS_STACK_SIZE=327680
29762    fi
29763    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29764else
29765    if test "x$COMPILER_NAME" = xgcc; then
29766        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29767        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29768        if test -n "$HAS_GNU_HASH"; then
29769            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29770        fi
29771        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29772          # And since we now know that the linker is gnu, then add -z defs, to forbid
29773          # undefined symbols in object files.
29774          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29775          if test "x$DEBUG_LEVEL" = "xrelease"; then
29776              # When building release libraries, tell the linker optimize them.
29777              # Should this be supplied to the OSS linker as well?
29778              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29779          fi
29780        fi
29781    fi
29782    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29783                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29784
29785    # On some platforms (mac) the linker warns about non existing -L dirs.
29786    # Add server first if available. Linking aginst client does not always produce the same results.
29787    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29788    # Default to server for other variants.
29789    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29790        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29791    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29792        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29793    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29794        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29795    else
29796        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29797    fi
29798
29799    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29800    if test "x$COMPILER_NAME" = xossc; then
29801        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29802    fi
29803
29804    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29805    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29806        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29807    fi
29808fi
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824  # Some Zero and Shark settings.
29825  # ZERO_ARCHFLAG tells the compiler which mode to build for
29826  case "${OPENJDK_TARGET_CPU}" in
29827    s390)
29828      ZERO_ARCHFLAG="-m31"
29829      ;;
29830    *)
29831      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29832  esac
29833
29834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29835$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29836  supports=yes
29837
29838  saved_cflags="$CFLAGS"
29839  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29840  ac_ext=c
29841ac_cpp='$CPP $CPPFLAGS'
29842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29844ac_compiler_gnu=$ac_cv_c_compiler_gnu
29845
29846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29847/* end confdefs.h.  */
29848
29849    int i;
29850
29851_ACEOF
29852if ac_fn_c_try_compile "$LINENO"; then :
29853
29854else
29855  supports=no
29856fi
29857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29858  ac_ext=cpp
29859ac_cpp='$CXXCPP $CPPFLAGS'
29860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29863
29864  CFLAGS="$saved_cflags"
29865
29866  saved_cxxflags="$CXXFLAGS"
29867  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29868  ac_ext=cpp
29869ac_cpp='$CXXCPP $CPPFLAGS'
29870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29873
29874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29875/* end confdefs.h.  */
29876
29877    int i;
29878
29879_ACEOF
29880if ac_fn_cxx_try_compile "$LINENO"; then :
29881
29882else
29883  supports=no
29884fi
29885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29886  ac_ext=cpp
29887ac_cpp='$CXXCPP $CPPFLAGS'
29888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29891
29892  CXXFLAGS="$saved_cxxflags"
29893
29894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29895$as_echo "$supports" >&6; }
29896  if test "x$supports" = "xyes" ; then
29897    :
29898  else
29899    ZERO_ARCHFLAG=""
29900  fi
29901
29902
29903
29904  # Check that the compiler supports -mX flags
29905  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29906
29907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29908$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29909  supports=yes
29910
29911  saved_cflags="$CFLAGS"
29912  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29913  ac_ext=c
29914ac_cpp='$CPP $CPPFLAGS'
29915ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29916ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29917ac_compiler_gnu=$ac_cv_c_compiler_gnu
29918
29919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29920/* end confdefs.h.  */
29921
29922    int i;
29923
29924_ACEOF
29925if ac_fn_c_try_compile "$LINENO"; then :
29926
29927else
29928  supports=no
29929fi
29930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29931  ac_ext=cpp
29932ac_cpp='$CXXCPP $CPPFLAGS'
29933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29936
29937  CFLAGS="$saved_cflags"
29938
29939  saved_cxxflags="$CXXFLAGS"
29940  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29941  ac_ext=cpp
29942ac_cpp='$CXXCPP $CPPFLAGS'
29943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29946
29947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29948/* end confdefs.h.  */
29949
29950    int i;
29951
29952_ACEOF
29953if ac_fn_cxx_try_compile "$LINENO"; then :
29954
29955else
29956  supports=no
29957fi
29958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29959  ac_ext=cpp
29960ac_cpp='$CXXCPP $CPPFLAGS'
29961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29964
29965  CXXFLAGS="$saved_cxxflags"
29966
29967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29968$as_echo "$supports" >&6; }
29969  if test "x$supports" = "xyes" ; then
29970    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29971  else
29972    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29973  fi
29974
29975
29976
29977
29978# Setup debug symbols (need objcopy from the toolchain for that)
29979
29980#
29981# ENABLE_DEBUG_SYMBOLS
29982# This must be done after the toolchain is setup, since we're looking at objcopy.
29983#
29984# Check whether --enable-debug-symbols was given.
29985if test "${enable_debug_symbols+set}" = set; then :
29986  enableval=$enable_debug_symbols;
29987fi
29988
29989
29990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29991$as_echo_n "checking if we should generate debug symbols... " >&6; }
29992
29993if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29994   # explicit enabling of enable-debug-symbols and can't find objcopy
29995   #   this is an error
29996   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29997fi
29998
29999if test "x$enable_debug_symbols" = "xyes"; then
30000  ENABLE_DEBUG_SYMBOLS=true
30001elif test "x$enable_debug_symbols" = "xno"; then
30002  ENABLE_DEBUG_SYMBOLS=false
30003else
30004  # default on macosx is false
30005  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30006    ENABLE_DEBUG_SYMBOLS=false
30007  # Default is on if objcopy is found, otherwise off
30008  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
30009    ENABLE_DEBUG_SYMBOLS=true
30010  else
30011    ENABLE_DEBUG_SYMBOLS=false
30012  fi
30013fi
30014
30015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30016$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30017
30018#
30019# ZIP_DEBUGINFO_FILES
30020#
30021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30022$as_echo_n "checking if we should zip debug-info files... " >&6; }
30023# Check whether --enable-zip-debug-info was given.
30024if test "${enable_zip_debug_info+set}" = set; then :
30025  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30026else
30027  enable_zip_debug_info="yes"
30028fi
30029
30030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30031$as_echo "${enable_zip_debug_info}" >&6; }
30032
30033if test "x${enable_zip_debug_info}" = "xno"; then
30034   ZIP_DEBUGINFO_FILES=false
30035else
30036   ZIP_DEBUGINFO_FILES=true
30037fi
30038
30039
30040
30041
30042
30043
30044
30045###############################################################################
30046#
30047# Check dependencies for external and internal libraries.
30048#
30049###############################################################################
30050
30051
30052
30053###############################################################################
30054#
30055# OS specific settings that we never will need to probe.
30056#
30057if test "x$OPENJDK_TARGET_OS" = xlinux; then
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30059$as_echo_n "checking what is not needed on Linux?... " >&6; }
30060    PULSE_NOT_NEEDED=yes
30061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30062$as_echo "pulse" >&6; }
30063fi
30064
30065if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30067$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30068    ALSA_NOT_NEEDED=yes
30069    PULSE_NOT_NEEDED=yes
30070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30071$as_echo "alsa pulse" >&6; }
30072fi
30073
30074if test "x$OPENJDK_TARGET_OS" = xwindows; then
30075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30076$as_echo_n "checking what is not needed on Windows?... " >&6; }
30077    CUPS_NOT_NEEDED=yes
30078    ALSA_NOT_NEEDED=yes
30079    PULSE_NOT_NEEDED=yes
30080    X11_NOT_NEEDED=yes
30081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30082$as_echo "alsa cups pulse x11" >&6; }
30083fi
30084
30085if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30087$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30088    ALSA_NOT_NEEDED=yes
30089    PULSE_NOT_NEEDED=yes
30090    X11_NOT_NEEDED=yes
30091    FREETYPE2_NOT_NEEDED=yes
30092    # If the java runtime framework is disabled, then we need X11.
30093    # This will be adjusted below.
30094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30095$as_echo "alsa pulse x11" >&6; }
30096fi
30097
30098if test "x$OPENJDK_TARGET_OS" = xbsd; then
30099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30100$as_echo_n "checking what is not needed on bsd?... " >&6; }
30101    ALSA_NOT_NEEDED=yes
30102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30103$as_echo "alsa" >&6; }
30104fi
30105
30106if test "x$OPENJDK" = "xfalse"; then
30107    FREETYPE2_NOT_NEEDED=yes
30108fi
30109
30110if test "x$SUPPORT_HEADFUL" = xno; then
30111    X11_NOT_NEEDED=yes
30112fi
30113
30114###############################################################################
30115#
30116# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30117# that uses this API.
30118#
30119# Check whether --enable-macosx-runtime-support was given.
30120if test "${enable_macosx_runtime_support+set}" = set; then :
30121  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30122else
30123  MACOSX_RUNTIME_SUPPORT="no"
30124fi
30125
30126
30127USE_MACOSX_RUNTIME_SUPPORT=no
30128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30129$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30130if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30131    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30132        MACOSX_RUNTIME_SUPPORT=yes
30133        USE_MACOSX_RUNTIME_SUPPORT=yes
30134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30135$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30136    else
30137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30138$as_echo "yes, but explicitly disabled." >&6; }
30139    fi
30140else
30141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30142$as_echo "no" >&6; }
30143fi
30144
30145if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30147$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30148    X11_NOT_NEEDED=
30149    FREETYPE2_NOT_NEEDED=
30150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30151$as_echo "alsa pulse" >&6; }
30152fi
30153
30154
30155
30156###############################################################################
30157#
30158# Check for X Windows
30159#
30160
30161# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30162# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30163# --x-libraries for the sysroot, if that seems to be correct.
30164if test "x$SYS_ROOT" != "x/"; then
30165  if test "x$x_includes" = xNONE; then
30166    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30167      x_includes="$SYS_ROOT/usr/X11R6/include"
30168    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30169      x_includes="$SYS_ROOT/usr/include"
30170    fi
30171  fi
30172  if test "x$x_libraries" = xNONE; then
30173    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30174      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30175    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30176      x_libraries="$SYS_ROOT/usr/lib64"
30177    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30178      x_libraries="$SYS_ROOT/usr/lib"
30179    fi
30180  fi
30181fi
30182
30183# Now let autoconf do it's magic
30184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30185$as_echo_n "checking for X... " >&6; }
30186
30187
30188# Check whether --with-x was given.
30189if test "${with_x+set}" = set; then :
30190  withval=$with_x;
30191fi
30192
30193# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30194if test "x$with_x" = xno; then
30195  # The user explicitly disabled X.
30196  have_x=disabled
30197else
30198  case $x_includes,$x_libraries in #(
30199    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
30200    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30201  $as_echo_n "(cached) " >&6
30202else
30203  # One or both of the vars are not set, and there is no cached value.
30204ac_x_includes=no ac_x_libraries=no
30205rm -f -r conftest.dir
30206if mkdir conftest.dir; then
30207  cd conftest.dir
30208  cat >Imakefile <<'_ACEOF'
30209incroot:
30210	@echo incroot='${INCROOT}'
30211usrlibdir:
30212	@echo usrlibdir='${USRLIBDIR}'
30213libdir:
30214	@echo libdir='${LIBDIR}'
30215_ACEOF
30216  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30217    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30218    for ac_var in incroot usrlibdir libdir; do
30219      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30220    done
30221    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30222    for ac_extension in a so sl dylib la dll; do
30223      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30224	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30225	ac_im_usrlibdir=$ac_im_libdir; break
30226      fi
30227    done
30228    # Screen out bogus values from the imake configuration.  They are
30229    # bogus both because they are the default anyway, and because
30230    # using them would break gcc on systems where it needs fixed includes.
30231    case $ac_im_incroot in
30232	/usr/include) ac_x_includes= ;;
30233	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30234    esac
30235    case $ac_im_usrlibdir in
30236	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30237	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30238    esac
30239  fi
30240  cd ..
30241  rm -f -r conftest.dir
30242fi
30243
30244# Standard set of common directories for X headers.
30245# Check X11 before X11Rn because it is often a symlink to the current release.
30246ac_x_header_dirs='
30247/usr/X11/include
30248/usr/X11R7/include
30249/usr/X11R6/include
30250/usr/X11R5/include
30251/usr/X11R4/include
30252
30253/usr/include/X11
30254/usr/include/X11R7
30255/usr/include/X11R6
30256/usr/include/X11R5
30257/usr/include/X11R4
30258
30259/usr/local/X11/include
30260/usr/local/X11R7/include
30261/usr/local/X11R6/include
30262/usr/local/X11R5/include
30263/usr/local/X11R4/include
30264
30265/usr/local/include/X11
30266/usr/local/include/X11R7
30267/usr/local/include/X11R6
30268/usr/local/include/X11R5
30269/usr/local/include/X11R4
30270
30271/usr/X386/include
30272/usr/x386/include
30273/usr/XFree86/include/X11
30274
30275/usr/include
30276/usr/local/include
30277/usr/unsupported/include
30278/usr/athena/include
30279/usr/local/x11r5/include
30280/usr/lpp/Xamples/include
30281
30282/usr/openwin/include
30283/usr/openwin/share/include'
30284
30285if test "$ac_x_includes" = no; then
30286  # Guess where to find include files, by looking for Xlib.h.
30287  # First, try using that file with no special directory specified.
30288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30289/* end confdefs.h.  */
30290#include <X11/Xlib.h>
30291_ACEOF
30292if ac_fn_cxx_try_cpp "$LINENO"; then :
30293  # We can compile using X headers with no special include directory.
30294ac_x_includes=
30295else
30296  for ac_dir in $ac_x_header_dirs; do
30297  if test -r "$ac_dir/X11/Xlib.h"; then
30298    ac_x_includes=$ac_dir
30299    break
30300  fi
30301done
30302fi
30303rm -f conftest.err conftest.i conftest.$ac_ext
30304fi # $ac_x_includes = no
30305
30306if test "$ac_x_libraries" = no; then
30307  # Check for the libraries.
30308  # See if we find them without any special options.
30309  # Don't add to $LIBS permanently.
30310  ac_save_LIBS=$LIBS
30311  LIBS="-lX11 $LIBS"
30312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30313/* end confdefs.h.  */
30314#include <X11/Xlib.h>
30315int
30316main ()
30317{
30318XrmInitialize ()
30319  ;
30320  return 0;
30321}
30322_ACEOF
30323if ac_fn_cxx_try_link "$LINENO"; then :
30324  LIBS=$ac_save_LIBS
30325# We can link X programs with no special library path.
30326ac_x_libraries=
30327else
30328  LIBS=$ac_save_LIBS
30329for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30330do
30331  # Don't even attempt the hair of trying to link an X program!
30332  for ac_extension in a so sl dylib la dll; do
30333    if test -r "$ac_dir/libX11.$ac_extension"; then
30334      ac_x_libraries=$ac_dir
30335      break 2
30336    fi
30337  done
30338done
30339fi
30340rm -f core conftest.err conftest.$ac_objext \
30341    conftest$ac_exeext conftest.$ac_ext
30342fi # $ac_x_libraries = no
30343
30344case $ac_x_includes,$ac_x_libraries in #(
30345  no,* | *,no | *\'*)
30346    # Didn't find X, or a directory has "'" in its name.
30347    ac_cv_have_x="have_x=no";; #(
30348  *)
30349    # Record where we found X for the cache.
30350    ac_cv_have_x="have_x=yes\
30351	ac_x_includes='$ac_x_includes'\
30352	ac_x_libraries='$ac_x_libraries'"
30353esac
30354fi
30355;; #(
30356    *) have_x=yes;;
30357  esac
30358  eval "$ac_cv_have_x"
30359fi # $with_x != no
30360
30361if test "$have_x" != yes; then
30362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30363$as_echo "$have_x" >&6; }
30364  no_x=yes
30365else
30366  # If each of the values was on the command line, it overrides each guess.
30367  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30368  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30369  # Update the cache value to reflect the command line values.
30370  ac_cv_have_x="have_x=yes\
30371	ac_x_includes='$x_includes'\
30372	ac_x_libraries='$x_libraries'"
30373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30374$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30375fi
30376
30377if test "$no_x" = yes; then
30378  # Not all programs may use this symbol, but it does not hurt to define it.
30379
30380$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30381
30382  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30383else
30384  if test -n "$x_includes"; then
30385    X_CFLAGS="$X_CFLAGS -I$x_includes"
30386  fi
30387
30388  # It would also be nice to do this for all -L options, not just this one.
30389  if test -n "$x_libraries"; then
30390    X_LIBS="$X_LIBS -L$x_libraries"
30391    # For Solaris; some versions of Sun CC require a space after -R and
30392    # others require no space.  Words are not sufficient . . . .
30393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30394$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30395    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30396    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30397    ac_cxx_werror_flag=yes
30398    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30399/* end confdefs.h.  */
30400
30401int
30402main ()
30403{
30404
30405  ;
30406  return 0;
30407}
30408_ACEOF
30409if ac_fn_cxx_try_link "$LINENO"; then :
30410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30411$as_echo "no" >&6; }
30412       X_LIBS="$X_LIBS -R$x_libraries"
30413else
30414  LIBS="$ac_xsave_LIBS -R $x_libraries"
30415       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30416/* end confdefs.h.  */
30417
30418int
30419main ()
30420{
30421
30422  ;
30423  return 0;
30424}
30425_ACEOF
30426if ac_fn_cxx_try_link "$LINENO"; then :
30427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30428$as_echo "yes" >&6; }
30429	  X_LIBS="$X_LIBS -R $x_libraries"
30430else
30431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30432$as_echo "neither works" >&6; }
30433fi
30434rm -f core conftest.err conftest.$ac_objext \
30435    conftest$ac_exeext conftest.$ac_ext
30436fi
30437rm -f core conftest.err conftest.$ac_objext \
30438    conftest$ac_exeext conftest.$ac_ext
30439    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30440    LIBS=$ac_xsave_LIBS
30441  fi
30442
30443  # Check for system-dependent libraries X programs must link with.
30444  # Do this before checking for the system-independent R6 libraries
30445  # (-lICE), since we may need -lsocket or whatever for X linking.
30446
30447  if test "$ISC" = yes; then
30448    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30449  else
30450    # Martyn Johnson says this is needed for Ultrix, if the X
30451    # libraries were built with DECnet support.  And Karl Berry says
30452    # the Alpha needs dnet_stub (dnet does not exist).
30453    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30454    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30455/* end confdefs.h.  */
30456
30457/* Override any GCC internal prototype to avoid an error.
30458   Use char because int might match the return type of a GCC
30459   builtin and then its argument prototype would still apply.  */
30460#ifdef __cplusplus
30461extern "C"
30462#endif
30463char XOpenDisplay ();
30464int
30465main ()
30466{
30467return XOpenDisplay ();
30468  ;
30469  return 0;
30470}
30471_ACEOF
30472if ac_fn_cxx_try_link "$LINENO"; then :
30473
30474else
30475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30476$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30477if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30478  $as_echo_n "(cached) " >&6
30479else
30480  ac_check_lib_save_LIBS=$LIBS
30481LIBS="-ldnet  $LIBS"
30482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30483/* end confdefs.h.  */
30484
30485/* Override any GCC internal prototype to avoid an error.
30486   Use char because int might match the return type of a GCC
30487   builtin and then its argument prototype would still apply.  */
30488#ifdef __cplusplus
30489extern "C"
30490#endif
30491char dnet_ntoa ();
30492int
30493main ()
30494{
30495return dnet_ntoa ();
30496  ;
30497  return 0;
30498}
30499_ACEOF
30500if ac_fn_cxx_try_link "$LINENO"; then :
30501  ac_cv_lib_dnet_dnet_ntoa=yes
30502else
30503  ac_cv_lib_dnet_dnet_ntoa=no
30504fi
30505rm -f core conftest.err conftest.$ac_objext \
30506    conftest$ac_exeext conftest.$ac_ext
30507LIBS=$ac_check_lib_save_LIBS
30508fi
30509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30510$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30511if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30512  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30513fi
30514
30515    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30517$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30518if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30519  $as_echo_n "(cached) " >&6
30520else
30521  ac_check_lib_save_LIBS=$LIBS
30522LIBS="-ldnet_stub  $LIBS"
30523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30524/* end confdefs.h.  */
30525
30526/* Override any GCC internal prototype to avoid an error.
30527   Use char because int might match the return type of a GCC
30528   builtin and then its argument prototype would still apply.  */
30529#ifdef __cplusplus
30530extern "C"
30531#endif
30532char dnet_ntoa ();
30533int
30534main ()
30535{
30536return dnet_ntoa ();
30537  ;
30538  return 0;
30539}
30540_ACEOF
30541if ac_fn_cxx_try_link "$LINENO"; then :
30542  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30543else
30544  ac_cv_lib_dnet_stub_dnet_ntoa=no
30545fi
30546rm -f core conftest.err conftest.$ac_objext \
30547    conftest$ac_exeext conftest.$ac_ext
30548LIBS=$ac_check_lib_save_LIBS
30549fi
30550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30551$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30552if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30553  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30554fi
30555
30556    fi
30557fi
30558rm -f core conftest.err conftest.$ac_objext \
30559    conftest$ac_exeext conftest.$ac_ext
30560    LIBS="$ac_xsave_LIBS"
30561
30562    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30563    # to get the SysV transport functions.
30564    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30565    # needs -lnsl.
30566    # The nsl library prevents programs from opening the X display
30567    # on Irix 5.2, according to T.E. Dickey.
30568    # The functions gethostbyname, getservbyname, and inet_addr are
30569    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30570    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30571if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30572
30573fi
30574
30575    if test $ac_cv_func_gethostbyname = no; then
30576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30577$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30578if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30579  $as_echo_n "(cached) " >&6
30580else
30581  ac_check_lib_save_LIBS=$LIBS
30582LIBS="-lnsl  $LIBS"
30583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30584/* end confdefs.h.  */
30585
30586/* Override any GCC internal prototype to avoid an error.
30587   Use char because int might match the return type of a GCC
30588   builtin and then its argument prototype would still apply.  */
30589#ifdef __cplusplus
30590extern "C"
30591#endif
30592char gethostbyname ();
30593int
30594main ()
30595{
30596return gethostbyname ();
30597  ;
30598  return 0;
30599}
30600_ACEOF
30601if ac_fn_cxx_try_link "$LINENO"; then :
30602  ac_cv_lib_nsl_gethostbyname=yes
30603else
30604  ac_cv_lib_nsl_gethostbyname=no
30605fi
30606rm -f core conftest.err conftest.$ac_objext \
30607    conftest$ac_exeext conftest.$ac_ext
30608LIBS=$ac_check_lib_save_LIBS
30609fi
30610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30611$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30612if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30613  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30614fi
30615
30616      if test $ac_cv_lib_nsl_gethostbyname = no; then
30617	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30618$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30619if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30620  $as_echo_n "(cached) " >&6
30621else
30622  ac_check_lib_save_LIBS=$LIBS
30623LIBS="-lbsd  $LIBS"
30624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30625/* end confdefs.h.  */
30626
30627/* Override any GCC internal prototype to avoid an error.
30628   Use char because int might match the return type of a GCC
30629   builtin and then its argument prototype would still apply.  */
30630#ifdef __cplusplus
30631extern "C"
30632#endif
30633char gethostbyname ();
30634int
30635main ()
30636{
30637return gethostbyname ();
30638  ;
30639  return 0;
30640}
30641_ACEOF
30642if ac_fn_cxx_try_link "$LINENO"; then :
30643  ac_cv_lib_bsd_gethostbyname=yes
30644else
30645  ac_cv_lib_bsd_gethostbyname=no
30646fi
30647rm -f core conftest.err conftest.$ac_objext \
30648    conftest$ac_exeext conftest.$ac_ext
30649LIBS=$ac_check_lib_save_LIBS
30650fi
30651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30652$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30653if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30654  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30655fi
30656
30657      fi
30658    fi
30659
30660    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30661    # socket/setsockopt and other routines are undefined under SCO ODT
30662    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30663    # on later versions), says Simon Leinen: it contains gethostby*
30664    # variants that don't use the name server (or something).  -lsocket
30665    # must be given before -lnsl if both are needed.  We assume that
30666    # if connect needs -lnsl, so does gethostbyname.
30667    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30668if test "x$ac_cv_func_connect" = x""yes; then :
30669
30670fi
30671
30672    if test $ac_cv_func_connect = no; then
30673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30674$as_echo_n "checking for connect in -lsocket... " >&6; }
30675if test "${ac_cv_lib_socket_connect+set}" = set; then :
30676  $as_echo_n "(cached) " >&6
30677else
30678  ac_check_lib_save_LIBS=$LIBS
30679LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30681/* end confdefs.h.  */
30682
30683/* Override any GCC internal prototype to avoid an error.
30684   Use char because int might match the return type of a GCC
30685   builtin and then its argument prototype would still apply.  */
30686#ifdef __cplusplus
30687extern "C"
30688#endif
30689char connect ();
30690int
30691main ()
30692{
30693return connect ();
30694  ;
30695  return 0;
30696}
30697_ACEOF
30698if ac_fn_cxx_try_link "$LINENO"; then :
30699  ac_cv_lib_socket_connect=yes
30700else
30701  ac_cv_lib_socket_connect=no
30702fi
30703rm -f core conftest.err conftest.$ac_objext \
30704    conftest$ac_exeext conftest.$ac_ext
30705LIBS=$ac_check_lib_save_LIBS
30706fi
30707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30708$as_echo "$ac_cv_lib_socket_connect" >&6; }
30709if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30710  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30711fi
30712
30713    fi
30714
30715    # Guillermo Gomez says -lposix is necessary on A/UX.
30716    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30717if test "x$ac_cv_func_remove" = x""yes; then :
30718
30719fi
30720
30721    if test $ac_cv_func_remove = no; then
30722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30723$as_echo_n "checking for remove in -lposix... " >&6; }
30724if test "${ac_cv_lib_posix_remove+set}" = set; then :
30725  $as_echo_n "(cached) " >&6
30726else
30727  ac_check_lib_save_LIBS=$LIBS
30728LIBS="-lposix  $LIBS"
30729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30730/* end confdefs.h.  */
30731
30732/* Override any GCC internal prototype to avoid an error.
30733   Use char because int might match the return type of a GCC
30734   builtin and then its argument prototype would still apply.  */
30735#ifdef __cplusplus
30736extern "C"
30737#endif
30738char remove ();
30739int
30740main ()
30741{
30742return remove ();
30743  ;
30744  return 0;
30745}
30746_ACEOF
30747if ac_fn_cxx_try_link "$LINENO"; then :
30748  ac_cv_lib_posix_remove=yes
30749else
30750  ac_cv_lib_posix_remove=no
30751fi
30752rm -f core conftest.err conftest.$ac_objext \
30753    conftest$ac_exeext conftest.$ac_ext
30754LIBS=$ac_check_lib_save_LIBS
30755fi
30756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30757$as_echo "$ac_cv_lib_posix_remove" >&6; }
30758if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30759  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30760fi
30761
30762    fi
30763
30764    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30765    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30766if test "x$ac_cv_func_shmat" = x""yes; then :
30767
30768fi
30769
30770    if test $ac_cv_func_shmat = no; then
30771      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30772$as_echo_n "checking for shmat in -lipc... " >&6; }
30773if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30774  $as_echo_n "(cached) " >&6
30775else
30776  ac_check_lib_save_LIBS=$LIBS
30777LIBS="-lipc  $LIBS"
30778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30779/* end confdefs.h.  */
30780
30781/* Override any GCC internal prototype to avoid an error.
30782   Use char because int might match the return type of a GCC
30783   builtin and then its argument prototype would still apply.  */
30784#ifdef __cplusplus
30785extern "C"
30786#endif
30787char shmat ();
30788int
30789main ()
30790{
30791return shmat ();
30792  ;
30793  return 0;
30794}
30795_ACEOF
30796if ac_fn_cxx_try_link "$LINENO"; then :
30797  ac_cv_lib_ipc_shmat=yes
30798else
30799  ac_cv_lib_ipc_shmat=no
30800fi
30801rm -f core conftest.err conftest.$ac_objext \
30802    conftest$ac_exeext conftest.$ac_ext
30803LIBS=$ac_check_lib_save_LIBS
30804fi
30805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30806$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30807if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30808  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30809fi
30810
30811    fi
30812  fi
30813
30814  # Check for libraries that X11R6 Xt/Xaw programs need.
30815  ac_save_LDFLAGS=$LDFLAGS
30816  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30817  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30818  # check for ICE first), but we must link in the order -lSM -lICE or
30819  # we get undefined symbols.  So assume we have SM if we have ICE.
30820  # These have to be linked with before -lX11, unlike the other
30821  # libraries we check for below, so use a different variable.
30822  # John Interrante, Karl Berry
30823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30824$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30825if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30826  $as_echo_n "(cached) " >&6
30827else
30828  ac_check_lib_save_LIBS=$LIBS
30829LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831/* end confdefs.h.  */
30832
30833/* Override any GCC internal prototype to avoid an error.
30834   Use char because int might match the return type of a GCC
30835   builtin and then its argument prototype would still apply.  */
30836#ifdef __cplusplus
30837extern "C"
30838#endif
30839char IceConnectionNumber ();
30840int
30841main ()
30842{
30843return IceConnectionNumber ();
30844  ;
30845  return 0;
30846}
30847_ACEOF
30848if ac_fn_cxx_try_link "$LINENO"; then :
30849  ac_cv_lib_ICE_IceConnectionNumber=yes
30850else
30851  ac_cv_lib_ICE_IceConnectionNumber=no
30852fi
30853rm -f core conftest.err conftest.$ac_objext \
30854    conftest$ac_exeext conftest.$ac_ext
30855LIBS=$ac_check_lib_save_LIBS
30856fi
30857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30858$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30859if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30860  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30861fi
30862
30863  LDFLAGS=$ac_save_LDFLAGS
30864
30865fi
30866
30867
30868# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30869# this doesn't make sense so we remove it.
30870if test "x$COMPILE_TYPE" = xcross; then
30871  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30872fi
30873
30874if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30875
30876    # Print a helpful message on how to acquire the necessary build dependency.
30877    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30878    MISSING_DEPENDENCY=x11
30879    PKGHANDLER_COMMAND=
30880
30881    case $PKGHANDLER in
30882	apt-get)
30883                apt_help     $MISSING_DEPENDENCY ;;
30884    yum)
30885                yum_help     $MISSING_DEPENDENCY ;;
30886	port)
30887                port_help    $MISSING_DEPENDENCY ;;
30888	pkgutil)
30889                pkgutil_help $MISSING_DEPENDENCY ;;
30890	pkgadd)
30891                pkgadd_help  $MISSING_DEPENDENCY ;;
30892    * )
30893      break ;;
30894    esac
30895
30896    if test "x$PKGHANDLER_COMMAND" != x; then
30897        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30898    fi
30899
30900    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30901fi
30902
30903# Some of the old makefiles require a setting of OPENWIN_HOME
30904# Since the X11R6 directory has disappeared on later Linuxes,
30905# we need to probe for it.
30906if test "x$OPENJDK_TARGET_OS" = xlinux; then
30907    if test -d "$SYS_ROOT/usr/X11R6"; then
30908        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30909    elif test -d "$SYS_ROOT/usr/include/X11"; then
30910        OPENWIN_HOME="$SYS_ROOT/usr"
30911    fi
30912fi
30913if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30914    OPENWIN_HOME="/usr/openwin"
30915fi
30916
30917
30918
30919#
30920# Weird Sol10 something check...TODO change to try compile
30921#
30922if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30923  if test "`uname -r`" = "5.10"; then
30924     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30925     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30926     fi
30927  fi
30928fi
30929
30930ac_ext=c
30931ac_cpp='$CPP $CPPFLAGS'
30932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30934ac_compiler_gnu=$ac_cv_c_compiler_gnu
30935
30936OLD_CFLAGS="$CFLAGS"
30937CFLAGS="$CFLAGS $X_CFLAGS"
30938
30939# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30940for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30941do :
30942  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30943ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30944                   # include <X11/Xutil.h>
30945
30946"
30947if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30948  cat >>confdefs.h <<_ACEOF
30949#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30950_ACEOF
30951 X11_A_OK=yes
30952else
30953  X11_A_OK=no; break
30954fi
30955
30956done
30957
30958
30959CFLAGS="$OLD_CFLAGS"
30960ac_ext=cpp
30961ac_cpp='$CXXCPP $CPPFLAGS'
30962ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30963ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30964ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30965
30966
30967if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30968
30969    # Print a helpful message on how to acquire the necessary build dependency.
30970    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30971    MISSING_DEPENDENCY=x11
30972    PKGHANDLER_COMMAND=
30973
30974    case $PKGHANDLER in
30975	apt-get)
30976                apt_help     $MISSING_DEPENDENCY ;;
30977    yum)
30978                yum_help     $MISSING_DEPENDENCY ;;
30979	port)
30980                port_help    $MISSING_DEPENDENCY ;;
30981	pkgutil)
30982                pkgutil_help $MISSING_DEPENDENCY ;;
30983	pkgadd)
30984                pkgadd_help  $MISSING_DEPENDENCY ;;
30985    * )
30986      break ;;
30987    esac
30988
30989    if test "x$PKGHANDLER_COMMAND" != x; then
30990        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30991    fi
30992
30993    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30994fi
30995
30996
30997
30998
30999
31000
31001###############################################################################
31002#
31003# The common unix printing system cups is used to print from java.
31004#
31005
31006# Check whether --with-cups was given.
31007if test "${with_cups+set}" = set; then :
31008  withval=$with_cups;
31009fi
31010
31011
31012# Check whether --with-cups-include was given.
31013if test "${with_cups_include+set}" = set; then :
31014  withval=$with_cups_include;
31015fi
31016
31017
31018if test "x$CUPS_NOT_NEEDED" = xyes; then
31019	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31020		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31021$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31022	fi
31023	CUPS_CFLAGS=
31024else
31025	CUPS_FOUND=no
31026
31027	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31028	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31029	fi
31030
31031	if test "x${with_cups}" != x; then
31032	    CUPS_CFLAGS="-I${with_cups}/include"
31033	    CUPS_FOUND=yes
31034	fi
31035	if test "x${with_cups_include}" != x; then
31036	    CUPS_CFLAGS="-I${with_cups_include}"
31037	    CUPS_FOUND=yes
31038	fi
31039	if test "x$CUPS_FOUND" = xno; then
31040
31041
31042    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31043        # Source the builddeps file again, to make sure it uses the latest variables!
31044        . $builddepsfile
31045        # Look for a target and build machine specific resource!
31046        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31047        if test "x$resource" = x; then
31048            # Ok, lets instead look for a target specific resource
31049            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31050        fi
31051        if test "x$resource" = x; then
31052            # Ok, lets instead look for a build specific resource
31053            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31054        fi
31055        if test "x$resource" = x; then
31056            # Ok, lets instead look for a generic resource
31057            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31058            resource=${builddep_cups}
31059        fi
31060        if test "x$resource" != x; then
31061            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31062$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31063	    # If the resource in the builddeps.conf file is an existing directory,
31064	    # for example /java/linux/cups
31065	    if test -d ${resource}; then
31066	       depdir=${resource}
31067	    else
31068
31069# cups is for example mymodule
31070# $resource is for example libs/general/libmymod_1_2_3.zip
31071# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31072# $with_builddeps_dir is for example /localhome/builddeps
31073# depdir is the name of the variable into which we store the depdir, eg MYMOD
31074# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31075# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31076    filename=`basename $resource`
31077    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31078    filebase=${filename%%.*}
31079    extension=${filename#*.}
31080    installdir=$with_builddeps_dir/$filebase
31081    if test ! -f $installdir/$filename.unpacked; then
31082        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31083$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31084        if test ! -d $installdir; then
31085            mkdir -p $installdir
31086        fi
31087        if test ! -d $installdir; then
31088            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31089        fi
31090        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31091        touch $tmpfile
31092        if test ! -f $tmpfile; then
31093            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31094        fi
31095
31096    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31097    # $tmpfile is the local file name for the downloaded file.
31098    VALID_TOOL=no
31099    if test "x$BDEPS_FTP" = xwget; then
31100       VALID_TOOL=yes
31101       wget -O $tmpfile $with_builddeps_server/$resource
31102    fi
31103    if test "x$BDEPS_FTP" = xlftp; then
31104       VALID_TOOL=yes
31105       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31106    fi
31107    if test "x$BDEPS_FTP" = xftp; then
31108        VALID_TOOL=yes
31109        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31110        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31111        FTPUSERPWD=${FTPSERVER%%@*}
31112        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31113            FTPUSER=${userpwd%%:*}
31114            FTPPWD=${userpwd#*@}
31115            FTPSERVER=${FTPSERVER#*@}
31116        else
31117            FTPUSER=ftp
31118            FTPPWD=ftp
31119        fi
31120        # the "pass" command does not work on some
31121        # ftp clients (read ftp.exe) but if it works,
31122        # passive mode is better!
31123        (\
31124            echo "user $FTPUSER $FTPPWD"        ;\
31125            echo "pass"                         ;\
31126            echo "bin"                          ;\
31127            echo "get $FTPPATH $tmpfile"              ;\
31128        ) | ftp -in $FTPSERVER
31129    fi
31130    if test "x$VALID_TOOL" != xyes; then
31131       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31132    fi
31133
31134        mv $tmpfile $installdir/$filename
31135        if test ! -s $installdir/$filename; then
31136            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31137        fi
31138        case "$extension" in
31139            zip)  echo "Unzipping $installdir/$filename..."
31140               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31141            ;;
31142            tar.gz) echo "Untaring $installdir/$filename..."
31143               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31144            ;;
31145            tgz) echo "Untaring $installdir/$filename..."
31146               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31147            ;;
31148            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31149            ;;
31150        esac
31151    fi
31152    if test -f $installdir/$filename.unpacked; then
31153        depdir=$installdir
31154    fi
31155
31156	    fi
31157            # Source the builddeps file again, because in the previous command, the depdir
31158            # was updated to point at the current build dependency install directory.
31159            . $builddepsfile
31160            # Now extract variables from the builddeps.conf files.
31161            theroot=${builddep_cups_ROOT}
31162            thecflags=${builddep_cups_CFLAGS}
31163            thelibs=${builddep_cups_LIBS}
31164            if test "x$depdir" = x; then
31165                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31166            fi
31167            CUPS=$depdir
31168            if test "x$theroot" != x; then
31169               CUPS="$theroot"
31170            fi
31171            if test "x$thecflags" != x; then
31172               CUPS_CFLAGS="$thecflags"
31173            fi
31174            if test "x$thelibs" != x; then
31175               CUPS_LIBS="$thelibs"
31176            fi
31177            CUPS_FOUND=yes
31178
31179        fi
31180
31181    fi
31182
31183	fi
31184	if test "x$CUPS_FOUND" = xno; then
31185	    # Are the cups headers installed in the default /usr/include location?
31186	    for ac_header in cups/cups.h cups/ppd.h
31187do :
31188  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31189ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31190if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31191  cat >>confdefs.h <<_ACEOF
31192#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31193_ACEOF
31194 CUPS_FOUND=yes
31195	                      CUPS_CFLAGS=
31196	                      DEFAULT_CUPS=yes
31197fi
31198
31199done
31200
31201	fi
31202	if test "x$CUPS_FOUND" = xno; then
31203	    # Getting nervous now? Lets poke around for standard Solaris third-party
31204	    # package installation locations.
31205	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31206$as_echo_n "checking for cups headers... " >&6; }
31207	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31208	       # An SFW package seems to be installed!
31209	       CUPS_FOUND=yes
31210	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31211	    elif test -s /opt/csw/include/cups/cups.h; then
31212	       # A CSW package seems to be installed!
31213	       CUPS_FOUND=yes
31214	       CUPS_CFLAGS="-I/opt/csw/include"
31215	    fi
31216	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31217$as_echo "$CUPS_FOUND" >&6; }
31218	fi
31219	if test "x$CUPS_FOUND" = xno; then
31220
31221    # Print a helpful message on how to acquire the necessary build dependency.
31222    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31223    MISSING_DEPENDENCY=cups
31224    PKGHANDLER_COMMAND=
31225
31226    case $PKGHANDLER in
31227	apt-get)
31228                apt_help     $MISSING_DEPENDENCY ;;
31229    yum)
31230                yum_help     $MISSING_DEPENDENCY ;;
31231	port)
31232                port_help    $MISSING_DEPENDENCY ;;
31233	pkgutil)
31234                pkgutil_help $MISSING_DEPENDENCY ;;
31235	pkgadd)
31236                pkgadd_help  $MISSING_DEPENDENCY ;;
31237    * )
31238      break ;;
31239    esac
31240
31241    if test "x$PKGHANDLER_COMMAND" != x; then
31242        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31243    fi
31244
31245	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31246	fi
31247fi
31248
31249
31250
31251
31252
31253
31254###############################################################################
31255#
31256# The ubiquitous freetype2 library is used to render fonts.
31257#
31258
31259# Check whether --with-freetype was given.
31260if test "${with_freetype+set}" = set; then :
31261  withval=$with_freetype;
31262fi
31263
31264
31265# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31266USING_SYSTEM_FT_LIB=false
31267
31268if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31269	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31270		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31271$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31272	fi
31273	FREETYPE2_CFLAGS=
31274	FREETYPE2_LIBS=
31275        FREETYPE2_LIB_PATH=
31276else
31277	FREETYPE2_FOUND=no
31278
31279	if test "x$with_freetype" != x; then
31280
31281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31282
31283  # Input might be given as Windows format, start by converting to
31284  # unix format.
31285  path="$with_freetype"
31286  new_path=`$CYGPATH -u "$path"`
31287
31288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31291  # "foo.exe" is OK but "foo" is an error.
31292  #
31293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31294  # It is also a way to make sure we got the proper file name for the real test later on.
31295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31296  if test "x$test_shortpath" = x; then
31297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31298$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31299    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31300  fi
31301
31302  # Call helper function which possibly converts this using DOS-style short mode.
31303  # If so, the updated path is stored in $new_path.
31304
31305  input_path="$new_path"
31306  # Check if we need to convert this using DOS-style short mode. If the path
31307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31308  # take no chances and rewrite it.
31309  # Note: m4 eats our [], so we need to use [ and ] instead.
31310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31311  if test "x$has_forbidden_chars" != x; then
31312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31316      # Going to short mode and back again did indeed matter. Since short mode is
31317      # case insensitive, let's make it lowercase to improve readability.
31318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31319      # Now convert it back to Unix-stile (cygpath)
31320      input_path=`$CYGPATH -u "$shortmode_path"`
31321      new_path="$input_path"
31322    fi
31323  fi
31324
31325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31326  if test "x$test_cygdrive_prefix" = x; then
31327    # As a simple fix, exclude /usr/bin since it's not a real path.
31328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31330      # a path prefixed by /cygdrive for fixpath to work.
31331      new_path="$CYGWIN_ROOT_PATH$input_path"
31332    fi
31333  fi
31334
31335
31336  if test "x$path" != "x$new_path"; then
31337    with_freetype="$new_path"
31338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31339$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31340  fi
31341
31342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31343
31344  path="$with_freetype"
31345  has_colon=`$ECHO $path | $GREP ^.:`
31346  new_path="$path"
31347  if test "x$has_colon" = x; then
31348    # Not in mixed or Windows style, start by that.
31349    new_path=`cmd //c echo $path`
31350  fi
31351
31352
31353  input_path="$new_path"
31354  # Check if we need to convert this using DOS-style short mode. If the path
31355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31356  # take no chances and rewrite it.
31357  # Note: m4 eats our [], so we need to use [ and ] instead.
31358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31359  if test "x$has_forbidden_chars" != x; then
31360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31362  fi
31363
31364
31365  windows_path="$new_path"
31366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367    unix_path=`$CYGPATH -u "$windows_path"`
31368    new_path="$unix_path"
31369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31371    new_path="$unix_path"
31372  fi
31373
31374  if test "x$path" != "x$new_path"; then
31375    with_freetype="$new_path"
31376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31377$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31378  fi
31379
31380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31382
31383  else
31384    # We're on a posix platform. Hooray! :)
31385    path="$with_freetype"
31386    has_space=`$ECHO "$path" | $GREP " "`
31387    if test "x$has_space" != x; then
31388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31389$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31390      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31391    fi
31392
31393    # Use eval to expand a potential ~
31394    eval path="$path"
31395    if test ! -f "$path" && test ! -d "$path"; then
31396      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31397    fi
31398
31399    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31400  fi
31401
31402	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31403            FREETYPE2_LIB_PATH="$with_freetype/lib"
31404            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31405                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31406                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31407            fi
31408            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31409                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31410            fi
31411	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31412            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31413                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31414            fi
31415 	    FREETYPE2_FOUND=yes
31416   	    if test "x$FREETYPE2_FOUND" = xyes; then
31417	        # Verify that the directories exist
31418                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31419		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31420		fi
31421	        # List the contents of the lib.
31422		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31423                if test "x$FREETYPELIB" = x; then
31424		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31425		fi
31426	        # Check one h-file
31427                if ! test -s "$with_freetype/include/ft2build.h"; then
31428		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31429		fi
31430            fi
31431        fi
31432	if test "x$FREETYPE2_FOUND" = xno; then
31433
31434
31435    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31436        # Source the builddeps file again, to make sure it uses the latest variables!
31437        . $builddepsfile
31438        # Look for a target and build machine specific resource!
31439        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31440        if test "x$resource" = x; then
31441            # Ok, lets instead look for a target specific resource
31442            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31443        fi
31444        if test "x$resource" = x; then
31445            # Ok, lets instead look for a build specific resource
31446            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31447        fi
31448        if test "x$resource" = x; then
31449            # Ok, lets instead look for a generic resource
31450            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31451            resource=${builddep_freetype2}
31452        fi
31453        if test "x$resource" != x; then
31454            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31455$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31456	    # If the resource in the builddeps.conf file is an existing directory,
31457	    # for example /java/linux/cups
31458	    if test -d ${resource}; then
31459	       depdir=${resource}
31460	    else
31461
31462# freetype2 is for example mymodule
31463# $resource is for example libs/general/libmymod_1_2_3.zip
31464# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31465# $with_builddeps_dir is for example /localhome/builddeps
31466# depdir is the name of the variable into which we store the depdir, eg MYMOD
31467# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31468# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31469    filename=`basename $resource`
31470    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31471    filebase=${filename%%.*}
31472    extension=${filename#*.}
31473    installdir=$with_builddeps_dir/$filebase
31474    if test ! -f $installdir/$filename.unpacked; then
31475        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31476$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31477        if test ! -d $installdir; then
31478            mkdir -p $installdir
31479        fi
31480        if test ! -d $installdir; then
31481            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31482        fi
31483        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31484        touch $tmpfile
31485        if test ! -f $tmpfile; then
31486            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31487        fi
31488
31489    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31490    # $tmpfile is the local file name for the downloaded file.
31491    VALID_TOOL=no
31492    if test "x$BDEPS_FTP" = xwget; then
31493       VALID_TOOL=yes
31494       wget -O $tmpfile $with_builddeps_server/$resource
31495    fi
31496    if test "x$BDEPS_FTP" = xlftp; then
31497       VALID_TOOL=yes
31498       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31499    fi
31500    if test "x$BDEPS_FTP" = xftp; then
31501        VALID_TOOL=yes
31502        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31503        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31504        FTPUSERPWD=${FTPSERVER%%@*}
31505        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31506            FTPUSER=${userpwd%%:*}
31507            FTPPWD=${userpwd#*@}
31508            FTPSERVER=${FTPSERVER#*@}
31509        else
31510            FTPUSER=ftp
31511            FTPPWD=ftp
31512        fi
31513        # the "pass" command does not work on some
31514        # ftp clients (read ftp.exe) but if it works,
31515        # passive mode is better!
31516        (\
31517            echo "user $FTPUSER $FTPPWD"        ;\
31518            echo "pass"                         ;\
31519            echo "bin"                          ;\
31520            echo "get $FTPPATH $tmpfile"              ;\
31521        ) | ftp -in $FTPSERVER
31522    fi
31523    if test "x$VALID_TOOL" != xyes; then
31524       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31525    fi
31526
31527        mv $tmpfile $installdir/$filename
31528        if test ! -s $installdir/$filename; then
31529            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31530        fi
31531        case "$extension" in
31532            zip)  echo "Unzipping $installdir/$filename..."
31533               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31534            ;;
31535            tar.gz) echo "Untaring $installdir/$filename..."
31536               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31537            ;;
31538            tgz) echo "Untaring $installdir/$filename..."
31539               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31540            ;;
31541            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31542            ;;
31543        esac
31544    fi
31545    if test -f $installdir/$filename.unpacked; then
31546        depdir=$installdir
31547    fi
31548
31549	    fi
31550            # Source the builddeps file again, because in the previous command, the depdir
31551            # was updated to point at the current build dependency install directory.
31552            . $builddepsfile
31553            # Now extract variables from the builddeps.conf files.
31554            theroot=${builddep_freetype2_ROOT}
31555            thecflags=${builddep_freetype2_CFLAGS}
31556            thelibs=${builddep_freetype2_LIBS}
31557            if test "x$depdir" = x; then
31558                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31559            fi
31560            FREETYPE2=$depdir
31561            if test "x$theroot" != x; then
31562               FREETYPE2="$theroot"
31563            fi
31564            if test "x$thecflags" != x; then
31565               FREETYPE2_CFLAGS="$thecflags"
31566            fi
31567            if test "x$thelibs" != x; then
31568               FREETYPE2_LIBS="$thelibs"
31569            fi
31570            FREETYPE2_FOUND=yes
31571            else FREETYPE2_FOUND=no
31572
31573        fi
31574        else FREETYPE2_FOUND=no
31575
31576    fi
31577
31578            USING_SYSTEM_FT_LIB=true
31579	fi
31580	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31581            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31582
31583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31584
31585  # Input might be given as Windows format, start by converting to
31586  # unix format.
31587  path="$FREETYPELOCATION"
31588  new_path=`$CYGPATH -u "$path"`
31589
31590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31593  # "foo.exe" is OK but "foo" is an error.
31594  #
31595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31596  # It is also a way to make sure we got the proper file name for the real test later on.
31597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31598  if test "x$test_shortpath" = x; then
31599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31600$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31601    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31602  fi
31603
31604  # Call helper function which possibly converts this using DOS-style short mode.
31605  # If so, the updated path is stored in $new_path.
31606
31607  input_path="$new_path"
31608  # Check if we need to convert this using DOS-style short mode. If the path
31609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31610  # take no chances and rewrite it.
31611  # Note: m4 eats our [], so we need to use [ and ] instead.
31612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31613  if test "x$has_forbidden_chars" != x; then
31614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31618      # Going to short mode and back again did indeed matter. Since short mode is
31619      # case insensitive, let's make it lowercase to improve readability.
31620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31621      # Now convert it back to Unix-stile (cygpath)
31622      input_path=`$CYGPATH -u "$shortmode_path"`
31623      new_path="$input_path"
31624    fi
31625  fi
31626
31627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31628  if test "x$test_cygdrive_prefix" = x; then
31629    # As a simple fix, exclude /usr/bin since it's not a real path.
31630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31632      # a path prefixed by /cygdrive for fixpath to work.
31633      new_path="$CYGWIN_ROOT_PATH$input_path"
31634    fi
31635  fi
31636
31637
31638  if test "x$path" != "x$new_path"; then
31639    FREETYPELOCATION="$new_path"
31640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31641$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31642  fi
31643
31644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31645
31646  path="$FREETYPELOCATION"
31647  has_colon=`$ECHO $path | $GREP ^.:`
31648  new_path="$path"
31649  if test "x$has_colon" = x; then
31650    # Not in mixed or Windows style, start by that.
31651    new_path=`cmd //c echo $path`
31652  fi
31653
31654
31655  input_path="$new_path"
31656  # Check if we need to convert this using DOS-style short mode. If the path
31657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31658  # take no chances and rewrite it.
31659  # Note: m4 eats our [], so we need to use [ and ] instead.
31660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31661  if test "x$has_forbidden_chars" != x; then
31662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31664  fi
31665
31666
31667  windows_path="$new_path"
31668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31669    unix_path=`$CYGPATH -u "$windows_path"`
31670    new_path="$unix_path"
31671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31673    new_path="$unix_path"
31674  fi
31675
31676  if test "x$path" != "x$new_path"; then
31677    FREETYPELOCATION="$new_path"
31678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31679$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31680  fi
31681
31682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31684
31685  else
31686    # We're on a posix platform. Hooray! :)
31687    path="$FREETYPELOCATION"
31688    has_space=`$ECHO "$path" | $GREP " "`
31689    if test "x$has_space" != x; then
31690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31691$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31692      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31693    fi
31694
31695    # Use eval to expand a potential ~
31696    eval path="$path"
31697    if test ! -f "$path" && test ! -d "$path"; then
31698      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31699    fi
31700
31701    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31702  fi
31703
31704	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31705$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31706	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31707	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31708	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31709 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31710                if ! test -s "$FREETYPE2_LIBS"; then
31711		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31712		fi
31713                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31714		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31715		fi
31716                USING_SYSTEM_FT_LIB=true
31717                FREETYPE2_FOUND=yes
31718	    fi
31719	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31720$as_echo "$FREETYPE2_FOUND" >&6; }
31721        fi
31722	if test "x$FREETYPE2_FOUND" = xno; then
31723
31724pkg_failed=no
31725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31726$as_echo_n "checking for FREETYPE2... " >&6; }
31727
31728if test -n "$FREETYPE2_CFLAGS"; then
31729    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31730 elif test -n "$PKG_CONFIG"; then
31731    if test -n "$PKG_CONFIG" && \
31732    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31733  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31734  ac_status=$?
31735  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31736  test $ac_status = 0; }; then
31737  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31738else
31739  pkg_failed=yes
31740fi
31741 else
31742    pkg_failed=untried
31743fi
31744if test -n "$FREETYPE2_LIBS"; then
31745    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31746 elif test -n "$PKG_CONFIG"; then
31747    if test -n "$PKG_CONFIG" && \
31748    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31749  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31750  ac_status=$?
31751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31752  test $ac_status = 0; }; then
31753  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31754else
31755  pkg_failed=yes
31756fi
31757 else
31758    pkg_failed=untried
31759fi
31760
31761
31762
31763if test $pkg_failed = yes; then
31764
31765if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31766        _pkg_short_errors_supported=yes
31767else
31768        _pkg_short_errors_supported=no
31769fi
31770        if test $_pkg_short_errors_supported = yes; then
31771	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31772        else
31773	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31774        fi
31775	# Put the nasty error message in config.log where it belongs
31776	echo "$FREETYPE2_PKG_ERRORS" >&5
31777
31778	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31779$as_echo "no" >&6; }
31780                FREETYPE2_FOUND=no
31781elif test $pkg_failed = untried; then
31782	FREETYPE2_FOUND=no
31783else
31784	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31785	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31787$as_echo "yes" >&6; }
31788	FREETYPE2_FOUND=yes
31789fi
31790            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31791            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31792            USING_SYSTEM_FT_LIB=true
31793            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31794            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31795              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31796            fi
31797	fi
31798	if test "x$FREETYPE2_FOUND" = xno; then
31799	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31800$as_echo_n "checking for freetype in some standard locations... " >&6; }
31801
31802	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31803	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31804	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31805	    fi
31806	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31807	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31808	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31809	    fi
31810
31811	    PREV_CXXCFLAGS="$CXXFLAGS"
31812	    PREV_LDFLAGS="$LDFLAGS"
31813	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31814	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31815	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31816/* end confdefs.h.  */
31817#include<ft2build.h>
31818	                    #include FT_FREETYPE_H
31819	                   int main() { return 0; }
31820
31821_ACEOF
31822if ac_fn_cxx_try_link "$LINENO"; then :
31823
31824	                      # Yes, the default cflags and libs did the trick.
31825	                      FREETYPE2_FOUND=yes
31826	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31827	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31828
31829else
31830
31831	                      FREETYPE2_FOUND=no
31832
31833fi
31834rm -f core conftest.err conftest.$ac_objext \
31835    conftest$ac_exeext conftest.$ac_ext
31836            CXXCFLAGS="$PREV_CXXFLAGS"
31837	    LDFLAGS="$PREV_LDFLAGS"
31838	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31839$as_echo "$FREETYPE2_FOUND" >&6; }
31840            USING_SYSTEM_FT_LIB=true
31841	fi
31842	if test "x$FREETYPE2_FOUND" = xno; then
31843
31844    # Print a helpful message on how to acquire the necessary build dependency.
31845    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31846    MISSING_DEPENDENCY=freetype2
31847    PKGHANDLER_COMMAND=
31848
31849    case $PKGHANDLER in
31850	apt-get)
31851                apt_help     $MISSING_DEPENDENCY ;;
31852    yum)
31853                yum_help     $MISSING_DEPENDENCY ;;
31854	port)
31855                port_help    $MISSING_DEPENDENCY ;;
31856	pkgutil)
31857                pkgutil_help $MISSING_DEPENDENCY ;;
31858	pkgadd)
31859                pkgadd_help  $MISSING_DEPENDENCY ;;
31860    * )
31861      break ;;
31862    esac
31863
31864    if test "x$PKGHANDLER_COMMAND" != x; then
31865        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31866    fi
31867
31868		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31869	fi
31870
31871        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31872            # AC_CHECK_LIB does not support use of cl.exe
31873            PREV_LDFLAGS="$LDFLAGS"
31874            LDFLAGS="$FREETYPE2_LIBS"
31875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31876$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31877if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31878  $as_echo_n "(cached) " >&6
31879else
31880  ac_check_lib_save_LIBS=$LIBS
31881LIBS="-lfreetype  $LIBS"
31882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31883/* end confdefs.h.  */
31884
31885/* Override any GCC internal prototype to avoid an error.
31886   Use char because int might match the return type of a GCC
31887   builtin and then its argument prototype would still apply.  */
31888#ifdef __cplusplus
31889extern "C"
31890#endif
31891char FT_Init_FreeType ();
31892int
31893main ()
31894{
31895return FT_Init_FreeType ();
31896  ;
31897  return 0;
31898}
31899_ACEOF
31900if ac_fn_cxx_try_link "$LINENO"; then :
31901  ac_cv_lib_freetype_FT_Init_FreeType=yes
31902else
31903  ac_cv_lib_freetype_FT_Init_FreeType=no
31904fi
31905rm -f core conftest.err conftest.$ac_objext \
31906    conftest$ac_exeext conftest.$ac_ext
31907LIBS=$ac_check_lib_save_LIBS
31908fi
31909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31910$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31911if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31912  FREETYPE2_FOUND=true
31913else
31914  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31915fi
31916
31917            LDFLAGS="$PREV_LDFLAGS"
31918        fi
31919fi
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929###############################################################################
31930#
31931# Check for alsa headers and libraries. Used on Linux/GNU systems.
31932#
31933
31934# Check whether --with-alsa was given.
31935if test "${with_alsa+set}" = set; then :
31936  withval=$with_alsa;
31937fi
31938
31939
31940# Check whether --with-alsa-include was given.
31941if test "${with_alsa_include+set}" = set; then :
31942  withval=$with_alsa_include;
31943fi
31944
31945
31946# Check whether --with-alsa-lib was given.
31947if test "${with_alsa_lib+set}" = set; then :
31948  withval=$with_alsa_lib;
31949fi
31950
31951
31952if test "x$ALSA_NOT_NEEDED" = xyes; then
31953	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31954		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31955$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31956	fi
31957	ALSA_CFLAGS=
31958	ALSA_LIBS=
31959else
31960	ALSA_FOUND=no
31961
31962	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31963	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31964	fi
31965
31966	if test "x${with_alsa}" != x; then
31967	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31968	    ALSA_CFLAGS="-I${with_alsa}/include"
31969	    ALSA_FOUND=yes
31970	fi
31971	if test "x${with_alsa_include}" != x; then
31972	    ALSA_CFLAGS="-I${with_alsa_include}"
31973	    ALSA_FOUND=yes
31974	fi
31975	if test "x${with_alsa_lib}" != x; then
31976	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31977	    ALSA_FOUND=yes
31978	fi
31979	if test "x$ALSA_FOUND" = xno; then
31980
31981
31982    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31983        # Source the builddeps file again, to make sure it uses the latest variables!
31984        . $builddepsfile
31985        # Look for a target and build machine specific resource!
31986        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31987        if test "x$resource" = x; then
31988            # Ok, lets instead look for a target specific resource
31989            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31990        fi
31991        if test "x$resource" = x; then
31992            # Ok, lets instead look for a build specific resource
31993            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31994        fi
31995        if test "x$resource" = x; then
31996            # Ok, lets instead look for a generic resource
31997            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31998            resource=${builddep_alsa}
31999        fi
32000        if test "x$resource" != x; then
32001            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
32002$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32003	    # If the resource in the builddeps.conf file is an existing directory,
32004	    # for example /java/linux/cups
32005	    if test -d ${resource}; then
32006	       depdir=${resource}
32007	    else
32008
32009# alsa is for example mymodule
32010# $resource is for example libs/general/libmymod_1_2_3.zip
32011# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32012# $with_builddeps_dir is for example /localhome/builddeps
32013# depdir is the name of the variable into which we store the depdir, eg MYMOD
32014# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32015# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32016    filename=`basename $resource`
32017    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32018    filebase=${filename%%.*}
32019    extension=${filename#*.}
32020    installdir=$with_builddeps_dir/$filebase
32021    if test ! -f $installdir/$filename.unpacked; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32023$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32024        if test ! -d $installdir; then
32025            mkdir -p $installdir
32026        fi
32027        if test ! -d $installdir; then
32028            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32029        fi
32030        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32031        touch $tmpfile
32032        if test ! -f $tmpfile; then
32033            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32034        fi
32035
32036    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32037    # $tmpfile is the local file name for the downloaded file.
32038    VALID_TOOL=no
32039    if test "x$BDEPS_FTP" = xwget; then
32040       VALID_TOOL=yes
32041       wget -O $tmpfile $with_builddeps_server/$resource
32042    fi
32043    if test "x$BDEPS_FTP" = xlftp; then
32044       VALID_TOOL=yes
32045       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32046    fi
32047    if test "x$BDEPS_FTP" = xftp; then
32048        VALID_TOOL=yes
32049        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32050        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32051        FTPUSERPWD=${FTPSERVER%%@*}
32052        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32053            FTPUSER=${userpwd%%:*}
32054            FTPPWD=${userpwd#*@}
32055            FTPSERVER=${FTPSERVER#*@}
32056        else
32057            FTPUSER=ftp
32058            FTPPWD=ftp
32059        fi
32060        # the "pass" command does not work on some
32061        # ftp clients (read ftp.exe) but if it works,
32062        # passive mode is better!
32063        (\
32064            echo "user $FTPUSER $FTPPWD"        ;\
32065            echo "pass"                         ;\
32066            echo "bin"                          ;\
32067            echo "get $FTPPATH $tmpfile"              ;\
32068        ) | ftp -in $FTPSERVER
32069    fi
32070    if test "x$VALID_TOOL" != xyes; then
32071       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32072    fi
32073
32074        mv $tmpfile $installdir/$filename
32075        if test ! -s $installdir/$filename; then
32076            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32077        fi
32078        case "$extension" in
32079            zip)  echo "Unzipping $installdir/$filename..."
32080               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32081            ;;
32082            tar.gz) echo "Untaring $installdir/$filename..."
32083               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32084            ;;
32085            tgz) echo "Untaring $installdir/$filename..."
32086               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32087            ;;
32088            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32089            ;;
32090        esac
32091    fi
32092    if test -f $installdir/$filename.unpacked; then
32093        depdir=$installdir
32094    fi
32095
32096	    fi
32097            # Source the builddeps file again, because in the previous command, the depdir
32098            # was updated to point at the current build dependency install directory.
32099            . $builddepsfile
32100            # Now extract variables from the builddeps.conf files.
32101            theroot=${builddep_alsa_ROOT}
32102            thecflags=${builddep_alsa_CFLAGS}
32103            thelibs=${builddep_alsa_LIBS}
32104            if test "x$depdir" = x; then
32105                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32106            fi
32107            ALSA=$depdir
32108            if test "x$theroot" != x; then
32109               ALSA="$theroot"
32110            fi
32111            if test "x$thecflags" != x; then
32112               ALSA_CFLAGS="$thecflags"
32113            fi
32114            if test "x$thelibs" != x; then
32115               ALSA_LIBS="$thelibs"
32116            fi
32117            ALSA_FOUND=yes
32118            else ALSA_FOUND=no
32119
32120        fi
32121        else ALSA_FOUND=no
32122
32123    fi
32124
32125	fi
32126	if test "x$ALSA_FOUND" = xno; then
32127
32128pkg_failed=no
32129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32130$as_echo_n "checking for ALSA... " >&6; }
32131
32132if test -n "$ALSA_CFLAGS"; then
32133    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32134 elif test -n "$PKG_CONFIG"; then
32135    if test -n "$PKG_CONFIG" && \
32136    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32137  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32138  ac_status=$?
32139  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32140  test $ac_status = 0; }; then
32141  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32142else
32143  pkg_failed=yes
32144fi
32145 else
32146    pkg_failed=untried
32147fi
32148if test -n "$ALSA_LIBS"; then
32149    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32150 elif test -n "$PKG_CONFIG"; then
32151    if test -n "$PKG_CONFIG" && \
32152    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32153  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32154  ac_status=$?
32155  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32156  test $ac_status = 0; }; then
32157  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32158else
32159  pkg_failed=yes
32160fi
32161 else
32162    pkg_failed=untried
32163fi
32164
32165
32166
32167if test $pkg_failed = yes; then
32168
32169if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32170        _pkg_short_errors_supported=yes
32171else
32172        _pkg_short_errors_supported=no
32173fi
32174        if test $_pkg_short_errors_supported = yes; then
32175	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32176        else
32177	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32178        fi
32179	# Put the nasty error message in config.log where it belongs
32180	echo "$ALSA_PKG_ERRORS" >&5
32181
32182	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32183$as_echo "no" >&6; }
32184                ALSA_FOUND=no
32185elif test $pkg_failed = untried; then
32186	ALSA_FOUND=no
32187else
32188	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32189	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32191$as_echo "yes" >&6; }
32192	ALSA_FOUND=yes
32193fi
32194	fi
32195	if test "x$ALSA_FOUND" = xno; then
32196	    for ac_header in alsa/asoundlib.h
32197do :
32198  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32199if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32200  cat >>confdefs.h <<_ACEOF
32201#define HAVE_ALSA_ASOUNDLIB_H 1
32202_ACEOF
32203 ALSA_FOUND=yes
32204	                      ALSA_CFLAGS=-Iignoreme
32205	                      ALSA_LIBS=-lasound
32206	                      DEFAULT_ALSA=yes
32207else
32208  ALSA_FOUND=no
32209fi
32210
32211done
32212
32213	fi
32214	if test "x$ALSA_FOUND" = xno; then
32215
32216    # Print a helpful message on how to acquire the necessary build dependency.
32217    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32218    MISSING_DEPENDENCY=alsa
32219    PKGHANDLER_COMMAND=
32220
32221    case $PKGHANDLER in
32222	apt-get)
32223                apt_help     $MISSING_DEPENDENCY ;;
32224    yum)
32225                yum_help     $MISSING_DEPENDENCY ;;
32226	port)
32227                port_help    $MISSING_DEPENDENCY ;;
32228	pkgutil)
32229                pkgutil_help $MISSING_DEPENDENCY ;;
32230	pkgadd)
32231                pkgadd_help  $MISSING_DEPENDENCY ;;
32232    * )
32233      break ;;
32234    esac
32235
32236    if test "x$PKGHANDLER_COMMAND" != x; then
32237        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32238    fi
32239
32240	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32241	fi
32242fi
32243
32244
32245
32246
32247
32248
32249
32250###############################################################################
32251#
32252# Check for the jpeg library
32253#
32254
32255USE_EXTERNAL_LIBJPEG=true
32256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32257$as_echo_n "checking for main in -ljpeg... " >&6; }
32258if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32259  $as_echo_n "(cached) " >&6
32260else
32261  ac_check_lib_save_LIBS=$LIBS
32262LIBS="-ljpeg  $LIBS"
32263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32264/* end confdefs.h.  */
32265
32266
32267int
32268main ()
32269{
32270return main ();
32271  ;
32272  return 0;
32273}
32274_ACEOF
32275if ac_fn_cxx_try_link "$LINENO"; then :
32276  ac_cv_lib_jpeg_main=yes
32277else
32278  ac_cv_lib_jpeg_main=no
32279fi
32280rm -f core conftest.err conftest.$ac_objext \
32281    conftest$ac_exeext conftest.$ac_ext
32282LIBS=$ac_check_lib_save_LIBS
32283fi
32284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32285$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32286if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32287  cat >>confdefs.h <<_ACEOF
32288#define HAVE_LIBJPEG 1
32289_ACEOF
32290
32291  LIBS="-ljpeg $LIBS"
32292
32293else
32294   USE_EXTERNAL_LIBJPEG=false
32295               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32296$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32297
32298fi
32299
32300
32301
32302###############################################################################
32303#
32304# Check for the gif library
32305#
32306
32307
32308# Check whether --with-giflib was given.
32309if test "${with_giflib+set}" = set; then :
32310  withval=$with_giflib;
32311fi
32312
32313
32314
32315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32316$as_echo_n "checking for which giflib to use... " >&6; }
32317
32318# default is bundled
32319DEFAULT_GIFLIB=bundled
32320
32321#
32322# if user didn't specify, use DEFAULT_GIFLIB
32323#
32324if test "x${with_giflib}" = "x"; then
32325    with_giflib=${DEFAULT_GIFLIB}
32326fi
32327
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32329$as_echo "${with_giflib}" >&6; }
32330
32331if test "x${with_giflib}" = "xbundled"; then
32332    USE_EXTERNAL_LIBGIF=false
32333elif test "x${with_giflib}" = "xsystem"; then
32334    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32335if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32336
32337else
32338   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32339fi
32340
32341
32342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32343$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32344if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32345  $as_echo_n "(cached) " >&6
32346else
32347  ac_check_lib_save_LIBS=$LIBS
32348LIBS="-lgif  $LIBS"
32349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32350/* end confdefs.h.  */
32351
32352/* Override any GCC internal prototype to avoid an error.
32353   Use char because int might match the return type of a GCC
32354   builtin and then its argument prototype would still apply.  */
32355#ifdef __cplusplus
32356extern "C"
32357#endif
32358char DGifGetCode ();
32359int
32360main ()
32361{
32362return DGifGetCode ();
32363  ;
32364  return 0;
32365}
32366_ACEOF
32367if ac_fn_cxx_try_link "$LINENO"; then :
32368  ac_cv_lib_gif_DGifGetCode=yes
32369else
32370  ac_cv_lib_gif_DGifGetCode=no
32371fi
32372rm -f core conftest.err conftest.$ac_objext \
32373    conftest$ac_exeext conftest.$ac_ext
32374LIBS=$ac_check_lib_save_LIBS
32375fi
32376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32377$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32378if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32379  cat >>confdefs.h <<_ACEOF
32380#define HAVE_LIBGIF 1
32381_ACEOF
32382
32383  LIBS="-lgif $LIBS"
32384
32385else
32386   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32387fi
32388
32389
32390    USE_EXTERNAL_LIBGIF=true
32391else
32392    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32393fi
32394
32395
32396###############################################################################
32397#
32398# Check for the zlib library
32399#
32400
32401
32402# Check whether --with-zlib was given.
32403if test "${with_zlib+set}" = set; then :
32404  withval=$with_zlib;
32405fi
32406
32407
32408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32409$as_echo_n "checking for compress in -lz... " >&6; }
32410if test "${ac_cv_lib_z_compress+set}" = set; then :
32411  $as_echo_n "(cached) " >&6
32412else
32413  ac_check_lib_save_LIBS=$LIBS
32414LIBS="-lz  $LIBS"
32415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32416/* end confdefs.h.  */
32417
32418/* Override any GCC internal prototype to avoid an error.
32419   Use char because int might match the return type of a GCC
32420   builtin and then its argument prototype would still apply.  */
32421#ifdef __cplusplus
32422extern "C"
32423#endif
32424char compress ();
32425int
32426main ()
32427{
32428return compress ();
32429  ;
32430  return 0;
32431}
32432_ACEOF
32433if ac_fn_cxx_try_link "$LINENO"; then :
32434  ac_cv_lib_z_compress=yes
32435else
32436  ac_cv_lib_z_compress=no
32437fi
32438rm -f core conftest.err conftest.$ac_objext \
32439    conftest$ac_exeext conftest.$ac_ext
32440LIBS=$ac_check_lib_save_LIBS
32441fi
32442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32443$as_echo "$ac_cv_lib_z_compress" >&6; }
32444if test "x$ac_cv_lib_z_compress" = x""yes; then :
32445   ZLIB_FOUND=yes
32446else
32447   ZLIB_FOUND=no
32448fi
32449
32450
32451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32452$as_echo_n "checking for which zlib to use... " >&6; }
32453
32454DEFAULT_ZLIB=bundled
32455if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32456#
32457# On macosx default is system...on others default is
32458#
32459    DEFAULT_ZLIB=system
32460fi
32461
32462if test "x${ZLIB_FOUND}" != "xyes"; then
32463#
32464# If we don't find any system...set default to bundled
32465#
32466    DEFAULT_ZLIB=bundled
32467fi
32468
32469#
32470# If user didn't specify, use DEFAULT_ZLIB
32471#
32472if test "x${with_zlib}" = "x"; then
32473    with_zlib=${DEFAULT_ZLIB}
32474fi
32475
32476if test "x${with_zlib}" = "xbundled"; then
32477    USE_EXTERNAL_LIBZ=false
32478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32479$as_echo "bundled" >&6; }
32480elif test "x${with_zlib}" = "xsystem"; then
32481    if test "x${ZLIB_FOUND}" = "xyes"; then
32482        USE_EXTERNAL_LIBZ=true
32483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32484$as_echo "system" >&6; }
32485    else
32486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32487$as_echo "system not found" >&6; }
32488        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32489    fi
32490else
32491    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32492fi
32493
32494
32495
32496###############################################################################
32497LIBZIP_CAN_USE_MMAP=true
32498
32499
32500
32501###############################################################################
32502#
32503# Check if altzone exists in time.h
32504#
32505
32506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32507/* end confdefs.h.  */
32508#include <time.h>
32509int
32510main ()
32511{
32512return (int)altzone;
32513  ;
32514  return 0;
32515}
32516_ACEOF
32517if ac_fn_cxx_try_link "$LINENO"; then :
32518  has_altzone=yes
32519else
32520  has_altzone=no
32521fi
32522rm -f core conftest.err conftest.$ac_objext \
32523    conftest$ac_exeext conftest.$ac_ext
32524if test "x$has_altzone" = xyes; then
32525
32526$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32527
32528fi
32529
32530###############################################################################
32531#
32532# Check the maths library
32533#
32534
32535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32536$as_echo_n "checking for cos in -lm... " >&6; }
32537if test "${ac_cv_lib_m_cos+set}" = set; then :
32538  $as_echo_n "(cached) " >&6
32539else
32540  ac_check_lib_save_LIBS=$LIBS
32541LIBS="-lm  $LIBS"
32542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32543/* end confdefs.h.  */
32544
32545/* Override any GCC internal prototype to avoid an error.
32546   Use char because int might match the return type of a GCC
32547   builtin and then its argument prototype would still apply.  */
32548#ifdef __cplusplus
32549extern "C"
32550#endif
32551char cos ();
32552int
32553main ()
32554{
32555return cos ();
32556  ;
32557  return 0;
32558}
32559_ACEOF
32560if ac_fn_cxx_try_link "$LINENO"; then :
32561  ac_cv_lib_m_cos=yes
32562else
32563  ac_cv_lib_m_cos=no
32564fi
32565rm -f core conftest.err conftest.$ac_objext \
32566    conftest$ac_exeext conftest.$ac_ext
32567LIBS=$ac_check_lib_save_LIBS
32568fi
32569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32570$as_echo "$ac_cv_lib_m_cos" >&6; }
32571if test "x$ac_cv_lib_m_cos" = x""yes; then :
32572  cat >>confdefs.h <<_ACEOF
32573#define HAVE_LIBM 1
32574_ACEOF
32575
32576  LIBS="-lm $LIBS"
32577
32578else
32579
32580                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32581$as_echo "$as_me: Maths library was not found" >&6;}
32582
32583fi
32584
32585
32586
32587###############################################################################
32588#
32589# Check for libdl.so
32590
32591save_LIBS="$LIBS"
32592LIBS=""
32593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32594$as_echo_n "checking for dlopen in -ldl... " >&6; }
32595if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32596  $as_echo_n "(cached) " >&6
32597else
32598  ac_check_lib_save_LIBS=$LIBS
32599LIBS="-ldl  $LIBS"
32600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32601/* end confdefs.h.  */
32602
32603/* Override any GCC internal prototype to avoid an error.
32604   Use char because int might match the return type of a GCC
32605   builtin and then its argument prototype would still apply.  */
32606#ifdef __cplusplus
32607extern "C"
32608#endif
32609char dlopen ();
32610int
32611main ()
32612{
32613return dlopen ();
32614  ;
32615  return 0;
32616}
32617_ACEOF
32618if ac_fn_cxx_try_link "$LINENO"; then :
32619  ac_cv_lib_dl_dlopen=yes
32620else
32621  ac_cv_lib_dl_dlopen=no
32622fi
32623rm -f core conftest.err conftest.$ac_objext \
32624    conftest$ac_exeext conftest.$ac_ext
32625LIBS=$ac_check_lib_save_LIBS
32626fi
32627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32628$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32629if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32630  cat >>confdefs.h <<_ACEOF
32631#define HAVE_LIBDL 1
32632_ACEOF
32633
32634  LIBS="-ldl $LIBS"
32635
32636fi
32637
32638LIBDL="$LIBS"
32639
32640LIBS="$save_LIBS"
32641
32642
32643
32644###############################################################################
32645#
32646# statically link libstdc++ before C++ ABI is stablized on Linux unless
32647# dynamic build is configured on command line.
32648#
32649
32650# Check whether --with-stdc++lib was given.
32651if test "${with_stdc__lib+set}" = set; then :
32652  withval=$with_stdc__lib;
32653    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32654        && test "x$with_stdc__lib" != xdefault; then
32655      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32656    fi
32657
32658else
32659  with_stdc__lib=default
32660
32661fi
32662
32663
32664if test "x$OPENJDK_TARGET_OS" = xlinux; then
32665    # Test if -lstdc++ works.
32666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32667$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32668    ac_ext=cpp
32669ac_cpp='$CXXCPP $CPPFLAGS'
32670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32673
32674    OLD_CXXFLAGS="$CXXFLAGS"
32675    CXXFLAGS="$CXXFLAGS -lstdc++"
32676    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32677/* end confdefs.h.  */
32678
32679int
32680main ()
32681{
32682return 0;
32683  ;
32684  return 0;
32685}
32686_ACEOF
32687if ac_fn_cxx_try_link "$LINENO"; then :
32688  has_dynamic_libstdcxx=yes
32689else
32690  has_dynamic_libstdcxx=no
32691fi
32692rm -f core conftest.err conftest.$ac_objext \
32693    conftest$ac_exeext conftest.$ac_ext
32694    CXXFLAGS="$OLD_CXXFLAGS"
32695    ac_ext=cpp
32696ac_cpp='$CXXCPP $CPPFLAGS'
32697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32700
32701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32702$as_echo "$has_dynamic_libstdcxx" >&6; }
32703
32704    # Test if stdc++ can be linked statically.
32705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32706$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32707    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32708    ac_ext=cpp
32709ac_cpp='$CXXCPP $CPPFLAGS'
32710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32713
32714    OLD_LIBS="$LIBS"
32715    OLD_CXX="$CXX"
32716    LIBS="$STATIC_STDCXX_FLAGS"
32717    CXX="$CC"
32718    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32719/* end confdefs.h.  */
32720
32721int
32722main ()
32723{
32724return 0;
32725  ;
32726  return 0;
32727}
32728_ACEOF
32729if ac_fn_cxx_try_link "$LINENO"; then :
32730  has_static_libstdcxx=yes
32731else
32732  has_static_libstdcxx=no
32733fi
32734rm -f core conftest.err conftest.$ac_objext \
32735    conftest$ac_exeext conftest.$ac_ext
32736    LIBS="$OLD_LIBS"
32737    CXX="$OLD_CXX"
32738    ac_ext=cpp
32739ac_cpp='$CXXCPP $CPPFLAGS'
32740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32743
32744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32745$as_echo "$has_static_libstdcxx" >&6; }
32746
32747    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32748        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32749    fi
32750
32751    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32752        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32753    fi
32754
32755    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32756        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32757    fi
32758
32759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32760$as_echo_n "checking how to link with libstdc++... " >&6; }
32761    # If dynamic was requested, it's available since it would fail above otherwise.
32762    # If dynamic wasn't requested, go with static unless it isn't available.
32763    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32764        LIBCXX="$LIBCXX -lstdc++"
32765        LDCXX="$CXX"
32766        STATIC_CXX_SETTING="STATIC_CXX=false"
32767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32768$as_echo "dynamic" >&6; }
32769    else
32770        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32771        LDCXX="$CC"
32772        STATIC_CXX_SETTING="STATIC_CXX=true"
32773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32774$as_echo "static" >&6; }
32775    fi
32776fi
32777
32778
32779if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32780    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32781
32782pkg_failed=no
32783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32784$as_echo_n "checking for LIBFFI... " >&6; }
32785
32786if test -n "$LIBFFI_CFLAGS"; then
32787    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32788 elif test -n "$PKG_CONFIG"; then
32789    if test -n "$PKG_CONFIG" && \
32790    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32791  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32792  ac_status=$?
32793  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32794  test $ac_status = 0; }; then
32795  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32796else
32797  pkg_failed=yes
32798fi
32799 else
32800    pkg_failed=untried
32801fi
32802if test -n "$LIBFFI_LIBS"; then
32803    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32804 elif test -n "$PKG_CONFIG"; then
32805    if test -n "$PKG_CONFIG" && \
32806    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32807  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32808  ac_status=$?
32809  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32810  test $ac_status = 0; }; then
32811  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32812else
32813  pkg_failed=yes
32814fi
32815 else
32816    pkg_failed=untried
32817fi
32818
32819
32820
32821if test $pkg_failed = yes; then
32822
32823if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32824        _pkg_short_errors_supported=yes
32825else
32826        _pkg_short_errors_supported=no
32827fi
32828        if test $_pkg_short_errors_supported = yes; then
32829	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32830        else
32831	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32832        fi
32833	# Put the nasty error message in config.log where it belongs
32834	echo "$LIBFFI_PKG_ERRORS" >&5
32835
32836	as_fn_error $? "Package requirements (libffi) were not met:
32837
32838$LIBFFI_PKG_ERRORS
32839
32840Consider adjusting the PKG_CONFIG_PATH environment variable if you
32841installed software in a non-standard prefix.
32842
32843Alternatively, you may set the environment variables LIBFFI_CFLAGS
32844and LIBFFI_LIBS to avoid the need to call pkg-config.
32845See the pkg-config man page for more details.
32846" "$LINENO" 5
32847elif test $pkg_failed = untried; then
32848	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32850as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32851is in your PATH or set the PKG_CONFIG environment variable to the full
32852path to pkg-config.
32853
32854Alternatively, you may set the environment variables LIBFFI_CFLAGS
32855and LIBFFI_LIBS to avoid the need to call pkg-config.
32856See the pkg-config man page for more details.
32857
32858To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32859See \`config.log' for more details" "$LINENO" 5 ; }
32860else
32861	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32862	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32864$as_echo "yes" >&6; }
32865	:
32866fi
32867
32868fi
32869
32870if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32871    # Extract the first word of "llvm-config", so it can be a program name with args.
32872set dummy llvm-config; ac_word=$2
32873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32874$as_echo_n "checking for $ac_word... " >&6; }
32875if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32876  $as_echo_n "(cached) " >&6
32877else
32878  if test -n "$LLVM_CONFIG"; then
32879  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32880else
32881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32882for as_dir in $PATH
32883do
32884  IFS=$as_save_IFS
32885  test -z "$as_dir" && as_dir=.
32886    for ac_exec_ext in '' $ac_executable_extensions; do
32887  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32888    ac_cv_prog_LLVM_CONFIG="llvm-config"
32889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32890    break 2
32891  fi
32892done
32893  done
32894IFS=$as_save_IFS
32895
32896fi
32897fi
32898LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32899if test -n "$LLVM_CONFIG"; then
32900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32901$as_echo "$LLVM_CONFIG" >&6; }
32902else
32903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32904$as_echo "no" >&6; }
32905fi
32906
32907
32908
32909    if test "x$LLVM_CONFIG" != xllvm-config; then
32910        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32911    fi
32912
32913    llvm_components="jit mcjit engine nativecodegen native"
32914    unset LLVM_CFLAGS
32915    for flag in $("$LLVM_CONFIG" --cxxflags); do
32916      if echo "${flag}" | grep -q '^-[ID]'; then
32917        if test "${flag}" != "-D_DEBUG" ; then
32918          if test "${LLVM_CFLAGS}" != "" ; then
32919            LLVM_CFLAGS="${LLVM_CFLAGS} "
32920          fi
32921          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32922        fi
32923      fi
32924    done
32925    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32926    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32927
32928    unset LLVM_LDFLAGS
32929    for flag in $("${LLVM_CONFIG}" --ldflags); do
32930      if echo "${flag}" | grep -q '^-L'; then
32931        if test "${LLVM_LDFLAGS}" != ""; then
32932          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32933        fi
32934        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32935      fi
32936    done
32937
32938    unset LLVM_LIBS
32939    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32940      if echo "${flag}" | grep -q '^-l'; then
32941        if test "${LLVM_LIBS}" != ""; then
32942          LLVM_LIBS="${LLVM_LIBS} "
32943        fi
32944        LLVM_LIBS="${LLVM_LIBS}${flag}"
32945      fi
32946    done
32947
32948
32949
32950
32951fi
32952
32953# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32954if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32955    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32956fi
32957
32958# TODO better (platform agnostic) test
32959if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32960    LIBCXX="-lstdc++"
32961fi
32962
32963
32964
32965
32966
32967# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32968
32969# When using cygwin or msys, we need a wrapper binary that renames
32970# /cygdrive/c/ arguments into c:/ arguments and peeks into
32971# @files and rewrites these too! This wrapper binary is
32972# called fixpath.
32973FIXPATH=
32974if test "x$OPENJDK_BUILD_OS" = xwindows; then
32975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32976$as_echo_n "checking if fixpath can be created... " >&6; }
32977    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32978    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32979    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32980      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32981      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32982      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32983      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32984    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32985      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32986      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32987
32988      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32989      # @ was chosen as separator to minimize risk of other tools messing around with it
32990      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32991      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32992
32993      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32994    fi
32995    rm -f $OUTPUT_ROOT/fixpath*
32996    cd $OUTPUT_ROOT
32997    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32998    cd $CURDIR
32999
33000    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33002$as_echo "no" >&6; }
33003        cat $OUTPUT_ROOT/fixpath1.log
33004        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
33005    fi
33006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33007$as_echo "yes" >&6; }
33008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
33009$as_echo_n "checking if fixpath.exe works... " >&6; }
33010    cd $OUTPUT_ROOT
33011    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33012    cd $CURDIR
33013    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33015$as_echo "no" >&6; }
33016        cat $OUTPUT_ROOT/fixpath2.log
33017        as_fn_error $? "fixpath did not work!" "$LINENO" 5
33018    fi
33019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33020$as_echo "yes" >&6; }
33021    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33022fi
33023
33024
33025
33026
33027###############################################################################
33028#
33029# We need to do some final tweaking, when everything else is done.
33030#
33031###############################################################################
33032
33033
33034HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33035
33036
33037# The name of the Service Agent jar.
33038SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33039if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33040  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33041fi
33042
33043
33044
33045
33046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33047$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33048
33049if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33050    ENABLE_INTREE_EC=yes
33051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33052$as_echo "yes" >&6; }
33053else
33054    ENABLE_INTREE_EC=no
33055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33056$as_echo "no" >&6; }
33057fi
33058
33059
33060
33061
33062###############################################################################
33063#
33064# Configure parts of the build that only affect the build performance,
33065# not the result.
33066#
33067###############################################################################
33068
33069
33070  # How many cores do we have on this build system?
33071
33072# Check whether --with-num-cores was given.
33073if test "${with_num_cores+set}" = set; then :
33074  withval=$with_num_cores;
33075fi
33076
33077  if test "x$with_num_cores" = x; then
33078    # The number of cores were not specified, try to probe them.
33079
33080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33081$as_echo_n "checking for number of cores... " >&6; }
33082    NUM_CORES=1
33083    FOUND_CORES=no
33084
33085    if test -f /proc/cpuinfo; then
33086        # Looks like a Linux (or cygwin) system
33087        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33088        FOUND_CORES=yes
33089    elif test -x /usr/sbin/psrinfo; then
33090        # Looks like a Solaris system
33091        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33092        FOUND_CORES=yes
33093    elif test -x /usr/sbin/system_profiler; then
33094        # Looks like a MacOSX system
33095        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33096        FOUND_CORES=yes
33097    elif test -n "$NUMBER_OF_PROCESSORS"; then
33098        # On windows, look in the env
33099        NUM_CORES=$NUMBER_OF_PROCESSORS
33100        FOUND_CORES=yes
33101    fi
33102
33103    if test "x$FOUND_CORES" = xyes; then
33104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33105$as_echo "$NUM_CORES" >&6; }
33106    else
33107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33108$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33110$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33111    fi
33112
33113
33114  else
33115    NUM_CORES=$with_num_cores
33116  fi
33117
33118
33119
33120  # How much memory do we have on this build system?
33121
33122# Check whether --with-memory-size was given.
33123if test "${with_memory_size+set}" = set; then :
33124  withval=$with_memory_size;
33125fi
33126
33127  if test "x$with_memory_size" = x; then
33128    # The memory size was not specified, try to probe it.
33129
33130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33131$as_echo_n "checking for memory size... " >&6; }
33132    # Default to 1024 MB
33133    MEMORY_SIZE=1024
33134    FOUND_MEM=no
33135
33136    if test -f /proc/meminfo; then
33137        # Looks like a Linux (or cygwin) system
33138        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33139        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33140        FOUND_MEM=yes
33141    elif test -x /usr/sbin/prtconf; then
33142        # Looks like a Solaris system
33143        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33144        FOUND_MEM=yes
33145    elif test -x /usr/sbin/system_profiler; then
33146        # Looks like a MacOSX system
33147        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33148        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33149        FOUND_MEM=yes
33150    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33151        # Windows, but without cygwin
33152        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33153        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33154        FOUND_MEM=yes
33155    fi
33156
33157    if test "x$FOUND_MEM" = xyes; then
33158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33159$as_echo "$MEMORY_SIZE MB" >&6; }
33160    else
33161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33162$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33164$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33165    fi
33166
33167  else
33168    MEMORY_SIZE=$with_memory_size
33169  fi
33170
33171
33172
33173  # Provide a decent default number of parallel jobs for make depending on
33174  # number of cores, amount of memory and machine architecture.
33175
33176# Check whether --with-jobs was given.
33177if test "${with_jobs+set}" = set; then :
33178  withval=$with_jobs;
33179fi
33180
33181  if test "x$with_jobs" = x; then
33182    # Number of jobs was not specified, calculate.
33183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33184$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33185    # Approximate memory in GB, rounding up a bit.
33186    memory_gb=`expr $MEMORY_SIZE / 1100`
33187    # Pick the lowest of memory in gb and number of cores.
33188    if test "$memory_gb" -lt "$NUM_CORES"; then
33189      JOBS="$memory_gb"
33190    else
33191      JOBS="$NUM_CORES"
33192      # On bigger machines, leave some room for other processes to run
33193      if test "$JOBS" -gt "4"; then
33194        JOBS=`expr $JOBS '*' 90 / 100`
33195      fi
33196    fi
33197    # Cap number of jobs to 16
33198    if test "$JOBS" -gt "16"; then
33199      JOBS=16
33200    fi
33201    if test "$JOBS" -eq "0"; then
33202      JOBS=1
33203    fi
33204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33205$as_echo "$JOBS" >&6; }
33206  else
33207    JOBS=$with_jobs
33208  fi
33209
33210
33211
33212# Setup smart javac (after cores and memory have been setup)
33213
33214
33215# Check whether --with-sjavac-server-java was given.
33216if test "${with_sjavac_server_java+set}" = set; then :
33217  withval=$with_sjavac_server_java;
33218fi
33219
33220
33221if test "x$with_sjavac_server_java" != x; then
33222    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33223    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33224    if test "x$FOUND_VERSION" = x; then
33225        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33226    fi
33227else
33228    SJAVAC_SERVER_JAVA=""
33229    # Hotspot specific options.
33230
33231    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33232    $ECHO "Command: $JAVA -verbosegc -version" >&5
33233    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33234    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33235    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33236    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33237        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33238	JVM_ARG_OK=true
33239    else
33240	$ECHO "Arg failed:" >&5
33241	$ECHO "$OUTPUT" >&5
33242	JVM_ARG_OK=false
33243    fi
33244
33245    # JRockit specific options.
33246
33247    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33248    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33249    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33250    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33251    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33252    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33253        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33254	JVM_ARG_OK=true
33255    else
33256	$ECHO "Arg failed:" >&5
33257	$ECHO "$OUTPUT" >&5
33258	JVM_ARG_OK=false
33259    fi
33260
33261    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33262fi
33263
33264
33265if test "$MEMORY_SIZE" -gt "2500"; then
33266
33267    $ECHO "Check if jvm arg is ok: -d64" >&5
33268    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33269    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33270    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33271    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33272    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33273        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33274	JVM_ARG_OK=true
33275    else
33276	$ECHO "Arg failed:" >&5
33277	$ECHO "$OUTPUT" >&5
33278	JVM_ARG_OK=false
33279    fi
33280
33281    if test "$JVM_ARG_OK" = true; then
33282        JVM_64BIT=true
33283	JVM_ARG_OK=false
33284    fi
33285    fi
33286
33287if test "$JVM_64BIT" = true; then
33288    if test "$MEMORY_SIZE" -gt "17000"; then
33289
33290    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33291    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33292    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33293    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33294    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33295    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33296        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33297	JVM_ARG_OK=true
33298    else
33299	$ECHO "Arg failed:" >&5
33300	$ECHO "$OUTPUT" >&5
33301	JVM_ARG_OK=false
33302    fi
33303
33304    fi
33305    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33306
33307    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33308    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33309    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33310    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33311    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33312    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33313        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33314	JVM_ARG_OK=true
33315    else
33316	$ECHO "Arg failed:" >&5
33317	$ECHO "$OUTPUT" >&5
33318	JVM_ARG_OK=false
33319    fi
33320
33321    fi
33322    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33323
33324    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33325    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33326    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33327    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33328    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33329    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33330        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33331	JVM_ARG_OK=true
33332    else
33333	$ECHO "Arg failed:" >&5
33334	$ECHO "$OUTPUT" >&5
33335	JVM_ARG_OK=false
33336    fi
33337
33338    fi
33339    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33340
33341    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33342    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33343    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33344    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33345    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33346    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33347        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33348	JVM_ARG_OK=true
33349    else
33350	$ECHO "Arg failed:" >&5
33351	$ECHO "$OUTPUT" >&5
33352	JVM_ARG_OK=false
33353    fi
33354
33355    fi
33356fi
33357if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33358
33359    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33360    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33361    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33362    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33363    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33364    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33365        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33366	JVM_ARG_OK=true
33367    else
33368	$ECHO "Arg failed:" >&5
33369	$ECHO "$OUTPUT" >&5
33370	JVM_ARG_OK=false
33371    fi
33372
33373fi
33374if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33375
33376    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33377    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33378    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33379    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33380    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33381    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33382        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33383	JVM_ARG_OK=true
33384    else
33385	$ECHO "Arg failed:" >&5
33386	$ECHO "$OUTPUT" >&5
33387	JVM_ARG_OK=false
33388    fi
33389
33390fi
33391if test "$JVM_ARG_OK" = false; then
33392
33393    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33394    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33395    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33396    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33397    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33398    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33399        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33400	JVM_ARG_OK=true
33401    else
33402	$ECHO "Arg failed:" >&5
33403	$ECHO "$OUTPUT" >&5
33404	JVM_ARG_OK=false
33405    fi
33406
33407fi
33408
33409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33410$as_echo_n "checking whether to use sjavac... " >&6; }
33411# Check whether --enable-sjavac was given.
33412if test "${enable_sjavac+set}" = set; then :
33413  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33414else
33415  ENABLE_SJAVAC='no'
33416fi
33417
33418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33419$as_echo "$ENABLE_SJAVAC" >&6; }
33420
33421
33422if test "x$ENABLE_SJAVAC" = xyes; then
33423    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33424else
33425    SJAVAC_SERVER_DIR=
33426fi
33427
33428
33429
33430
33431# Can the C/C++ compiler use precompiled headers?
33432
33433
33434###############################################################################
33435#
33436# Can the C/C++ compiler use precompiled headers?
33437#
33438# Check whether --enable-precompiled-headers was given.
33439if test "${enable_precompiled_headers+set}" = set; then :
33440  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33441else
33442  ENABLE_PRECOMPH=yes
33443fi
33444
33445
33446USE_PRECOMPILED_HEADER=1
33447if test "x$ENABLE_PRECOMPH" = xno; then
33448    USE_PRECOMPILED_HEADER=0
33449fi
33450
33451if test "x$ENABLE_PRECOMPH" = xyes; then
33452    # Check that the compiler actually supports precomp headers.
33453    if test "x$GCC" = xyes; then
33454         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33455$as_echo_n "checking that precompiled headers work... " >&6; }
33456         echo "int alfa();" > conftest.h
33457         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33458         if test ! -f conftest.hpp.gch; then
33459             USE_PRECOMPILED_HEADER=0
33460             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33461$as_echo "no" >&6; }
33462         else
33463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33464$as_echo "yes" >&6; }
33465         fi
33466         rm -f conftest.h conftest.hpp.gch
33467    fi
33468fi
33469
33470
33471
33472
33473# Setup use of ccache, if available
33474
33475    # Check whether --enable-ccache was given.
33476if test "${enable_ccache+set}" = set; then :
33477  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33478else
33479  ENABLE_CCACHE=yes
33480fi
33481
33482    if test "x$ENABLE_CCACHE" = xyes; then
33483        OLD_PATH="$PATH"
33484        if test "x$TOOLS_DIR" != x; then
33485          PATH=$TOOLS_DIR:$PATH
33486        fi
33487        # Extract the first word of "ccache", so it can be a program name with args.
33488set dummy ccache; ac_word=$2
33489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33490$as_echo_n "checking for $ac_word... " >&6; }
33491if test "${ac_cv_path_CCACHE+set}" = set; then :
33492  $as_echo_n "(cached) " >&6
33493else
33494  case $CCACHE in
33495  [\\/]* | ?:[\\/]*)
33496  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33497  ;;
33498  *)
33499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33500for as_dir in $PATH
33501do
33502  IFS=$as_save_IFS
33503  test -z "$as_dir" && as_dir=.
33504    for ac_exec_ext in '' $ac_executable_extensions; do
33505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33506    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33508    break 2
33509  fi
33510done
33511  done
33512IFS=$as_save_IFS
33513
33514  ;;
33515esac
33516fi
33517CCACHE=$ac_cv_path_CCACHE
33518if test -n "$CCACHE"; then
33519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33520$as_echo "$CCACHE" >&6; }
33521else
33522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33523$as_echo "no" >&6; }
33524fi
33525
33526
33527        PATH="$OLD_PATH"
33528    else
33529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33530$as_echo_n "checking for ccache... " >&6; }
33531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33532$as_echo "explicitly disabled" >&6; }
33533        CCACHE=
33534    fi
33535
33536
33537
33538# Check whether --with-ccache-dir was given.
33539if test "${with_ccache_dir+set}" = set; then :
33540  withval=$with_ccache_dir;
33541fi
33542
33543
33544    if test "x$with_ccache_dir" != x; then
33545        # When using a non home ccache directory, assume the use is to share ccache files
33546        # with other users. Thus change the umask.
33547        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33548    fi
33549    CCACHE_FOUND=""
33550    if test "x$CCACHE" != x; then
33551
33552    if test "x$CCACHE" != x; then
33553        CCACHE_FOUND="true"
33554        # Only use ccache if it is 3.1.4 or later, which supports
33555        # precompiled headers.
33556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33557$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33558        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33559        if test "x$HAS_GOOD_CCACHE" = x; then
33560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33561$as_echo "no, disabling ccache" >&6; }
33562            CCACHE=
33563        else
33564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33565$as_echo "yes" >&6; }
33566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33567$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33568            PUSHED_FLAGS="$CXXFLAGS"
33569            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33570            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33571/* end confdefs.h.  */
33572
33573int
33574main ()
33575{
33576
33577  ;
33578  return 0;
33579}
33580_ACEOF
33581if ac_fn_cxx_try_compile "$LINENO"; then :
33582  CC_KNOWS_CCACHE_TRICK=yes
33583else
33584  CC_KNOWS_CCACHE_TRICK=no
33585fi
33586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33587            CXXFLAGS="$PUSHED_FLAGS"
33588            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33589                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33590$as_echo "yes" >&6; }
33591            else
33592                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33593$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33594                CCACHE=
33595            fi
33596        fi
33597    fi
33598
33599    if test "x$CCACHE" != x; then
33600        CCACHE_SLOPPINESS=time_macros
33601        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33602        CCACHE_FLAGS=-fpch-preprocess
33603
33604        if test "x$SET_CCACHE_DIR" != x; then
33605            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33606	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33607        fi
33608    fi
33609
33610    fi
33611
33612
33613###############################################################################
33614#
33615# And now the finish...
33616#
33617###############################################################################
33618
33619# Check for some common pitfalls
33620
33621  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33622    file_to_test="$SRC_ROOT/LICENSE"
33623    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33624      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
33625    fi
33626  fi
33627
33628
33629
33630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33631$as_echo_n "checking if build directory is on local disk... " >&6; }
33632
33633	# df -l lists only local disks; if the given directory is not found then
33634	# a non-zero exit code is given
33635  if test "x$DF" = x; then
33636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637      # msys does not have df; use Windows "net use" instead.
33638      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33639      if test "x$IS_NETWORK_DISK" = x; then
33640        OUTPUT_DIR_IS_LOCAL="yes"
33641      else
33642        OUTPUT_DIR_IS_LOCAL="no"
33643      fi
33644    else
33645      # No df here, say it's local
33646      OUTPUT_DIR_IS_LOCAL="yes"
33647    fi
33648  else
33649    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33650      OUTPUT_DIR_IS_LOCAL="yes"
33651    else
33652      OUTPUT_DIR_IS_LOCAL="no"
33653    fi
33654  fi
33655
33656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33657$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33658
33659
33660
33661# Check if the user has any old-style ALT_ variables set.
33662FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33663
33664# Before generating output files, test if they exist. If they do, this is a reconfigure.
33665# Since we can't properly handle the dependencies for this, warn the user about the situation
33666if test -e $OUTPUT_ROOT/spec.gmk; then
33667  IS_RECONFIGURE=yes
33668else
33669  IS_RECONFIGURE=no
33670fi
33671
33672if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33673  HIDE_PERFORMANCE_HINTS=yes
33674else
33675  HIDE_PERFORMANCE_HINTS=no
33676  # Hide it the next time around...
33677  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33678fi
33679
33680
33681
33682# At the end, call the custom hook. (Dummy macro if no custom sources available)
33683
33684
33685# We're messing a bit with internal autoconf variables to put the config.status
33686# in the output directory instead of the current directory.
33687CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33688# Create the actual output files. Now the main work of configure is done.
33689cat >confcache <<\_ACEOF
33690# This file is a shell script that caches the results of configure
33691# tests run on this system so they can be shared between configure
33692# scripts and configure runs, see configure's option --config-cache.
33693# It is not useful on other systems.  If it contains results you don't
33694# want to keep, you may remove or edit it.
33695#
33696# config.status only pays attention to the cache file if you give it
33697# the --recheck option to rerun configure.
33698#
33699# `ac_cv_env_foo' variables (set or unset) will be overridden when
33700# loading this file, other *unset* `ac_cv_foo' will be assigned the
33701# following values.
33702
33703_ACEOF
33704
33705# The following way of writing the cache mishandles newlines in values,
33706# but we know of no workaround that is simple, portable, and efficient.
33707# So, we kill variables containing newlines.
33708# Ultrix sh set writes to stderr and can't be redirected directly,
33709# and sets the high bit in the cache file unless we assign to the vars.
33710(
33711  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33712    eval ac_val=\$$ac_var
33713    case $ac_val in #(
33714    *${as_nl}*)
33715      case $ac_var in #(
33716      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33718      esac
33719      case $ac_var in #(
33720      _ | IFS | as_nl) ;; #(
33721      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33722      *) { eval $ac_var=; unset $ac_var;} ;;
33723      esac ;;
33724    esac
33725  done
33726
33727  (set) 2>&1 |
33728    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33729    *${as_nl}ac_space=\ *)
33730      # `set' does not quote correctly, so add quotes: double-quote
33731      # substitution turns \\\\ into \\, and sed turns \\ into \.
33732      sed -n \
33733	"s/'/'\\\\''/g;
33734	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33735      ;; #(
33736    *)
33737      # `set' quotes correctly as required by POSIX, so do not add quotes.
33738      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33739      ;;
33740    esac |
33741    sort
33742) |
33743  sed '
33744     /^ac_cv_env_/b end
33745     t clear
33746     :clear
33747     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33748     t end
33749     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33750     :end' >>confcache
33751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33752  if test -w "$cache_file"; then
33753    test "x$cache_file" != "x/dev/null" &&
33754      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33755$as_echo "$as_me: updating cache $cache_file" >&6;}
33756    cat confcache >$cache_file
33757  else
33758    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33759$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33760  fi
33761fi
33762rm -f confcache
33763
33764test "x$prefix" = xNONE && prefix=$ac_default_prefix
33765# Let make expand exec_prefix.
33766test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33767
33768DEFS=-DHAVE_CONFIG_H
33769
33770ac_libobjs=
33771ac_ltlibobjs=
33772U=
33773for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33774  # 1. Remove the extension, and $U if already installed.
33775  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33776  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33777  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33778  #    will be set to the directory where LIBOBJS objects are built.
33779  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33780  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33781done
33782LIBOBJS=$ac_libobjs
33783
33784LTLIBOBJS=$ac_ltlibobjs
33785
33786
33787
33788: ${CONFIG_STATUS=./config.status}
33789ac_write_fail=0
33790ac_clean_files_save=$ac_clean_files
33791ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33792{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33793$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33794as_write_fail=0
33795cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33796#! $SHELL
33797# Generated by $as_me.
33798# Run this file to recreate the current configuration.
33799# Compiler output produced by configure, useful for debugging
33800# configure, is in config.log if it exists.
33801
33802debug=false
33803ac_cs_recheck=false
33804ac_cs_silent=false
33805
33806SHELL=\${CONFIG_SHELL-$SHELL}
33807export SHELL
33808_ASEOF
33809cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33810## -------------------- ##
33811## M4sh Initialization. ##
33812## -------------------- ##
33813
33814# Be more Bourne compatible
33815DUALCASE=1; export DUALCASE # for MKS sh
33816if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33817  emulate sh
33818  NULLCMD=:
33819  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33820  # is contrary to our usage.  Disable this feature.
33821  alias -g '${1+"$@"}'='"$@"'
33822  setopt NO_GLOB_SUBST
33823else
33824  case `(set -o) 2>/dev/null` in #(
33825  *posix*) :
33826    set -o posix ;; #(
33827  *) :
33828     ;;
33829esac
33830fi
33831
33832
33833as_nl='
33834'
33835export as_nl
33836# Printing a long string crashes Solaris 7 /usr/bin/printf.
33837as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33839as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33840# Prefer a ksh shell builtin over an external printf program on Solaris,
33841# but without wasting forks for bash or zsh.
33842if test -z "$BASH_VERSION$ZSH_VERSION" \
33843    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33844  as_echo='print -r --'
33845  as_echo_n='print -rn --'
33846elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33847  as_echo='printf %s\n'
33848  as_echo_n='printf %s'
33849else
33850  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33851    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33852    as_echo_n='/usr/ucb/echo -n'
33853  else
33854    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33855    as_echo_n_body='eval
33856      arg=$1;
33857      case $arg in #(
33858      *"$as_nl"*)
33859	expr "X$arg" : "X\\(.*\\)$as_nl";
33860	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33861      esac;
33862      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33863    '
33864    export as_echo_n_body
33865    as_echo_n='sh -c $as_echo_n_body as_echo'
33866  fi
33867  export as_echo_body
33868  as_echo='sh -c $as_echo_body as_echo'
33869fi
33870
33871# The user is always right.
33872if test "${PATH_SEPARATOR+set}" != set; then
33873  PATH_SEPARATOR=:
33874  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33875    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33876      PATH_SEPARATOR=';'
33877  }
33878fi
33879
33880
33881# IFS
33882# We need space, tab and new line, in precisely that order.  Quoting is
33883# there to prevent editors from complaining about space-tab.
33884# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33885# splitting by setting IFS to empty value.)
33886IFS=" ""	$as_nl"
33887
33888# Find who we are.  Look in the path if we contain no directory separator.
33889case $0 in #((
33890  *[\\/]* ) as_myself=$0 ;;
33891  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33892for as_dir in $PATH
33893do
33894  IFS=$as_save_IFS
33895  test -z "$as_dir" && as_dir=.
33896    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33897  done
33898IFS=$as_save_IFS
33899
33900     ;;
33901esac
33902# We did not find ourselves, most probably we were run as `sh COMMAND'
33903# in which case we are not to be found in the path.
33904if test "x$as_myself" = x; then
33905  as_myself=$0
33906fi
33907if test ! -f "$as_myself"; then
33908  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33909  exit 1
33910fi
33911
33912# Unset variables that we do not need and which cause bugs (e.g. in
33913# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33914# suppresses any "Segmentation fault" message there.  '((' could
33915# trigger a bug in pdksh 5.2.14.
33916for as_var in BASH_ENV ENV MAIL MAILPATH
33917do eval test x\${$as_var+set} = xset \
33918  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33919done
33920PS1='$ '
33921PS2='> '
33922PS4='+ '
33923
33924# NLS nuisances.
33925LC_ALL=C
33926export LC_ALL
33927LANGUAGE=C
33928export LANGUAGE
33929
33930# CDPATH.
33931(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33932
33933
33934# as_fn_error STATUS ERROR [LINENO LOG_FD]
33935# ----------------------------------------
33936# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33937# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33938# script with STATUS, using 1 if that was 0.
33939as_fn_error ()
33940{
33941  as_status=$1; test $as_status -eq 0 && as_status=1
33942  if test "$4"; then
33943    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33944    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33945  fi
33946  $as_echo "$as_me: error: $2" >&2
33947  as_fn_exit $as_status
33948} # as_fn_error
33949
33950
33951# as_fn_set_status STATUS
33952# -----------------------
33953# Set $? to STATUS, without forking.
33954as_fn_set_status ()
33955{
33956  return $1
33957} # as_fn_set_status
33958
33959# as_fn_exit STATUS
33960# -----------------
33961# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33962as_fn_exit ()
33963{
33964  set +e
33965  as_fn_set_status $1
33966  exit $1
33967} # as_fn_exit
33968
33969# as_fn_unset VAR
33970# ---------------
33971# Portably unset VAR.
33972as_fn_unset ()
33973{
33974  { eval $1=; unset $1;}
33975}
33976as_unset=as_fn_unset
33977# as_fn_append VAR VALUE
33978# ----------------------
33979# Append the text in VALUE to the end of the definition contained in VAR. Take
33980# advantage of any shell optimizations that allow amortized linear growth over
33981# repeated appends, instead of the typical quadratic growth present in naive
33982# implementations.
33983if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33984  eval 'as_fn_append ()
33985  {
33986    eval $1+=\$2
33987  }'
33988else
33989  as_fn_append ()
33990  {
33991    eval $1=\$$1\$2
33992  }
33993fi # as_fn_append
33994
33995# as_fn_arith ARG...
33996# ------------------
33997# Perform arithmetic evaluation on the ARGs, and store the result in the
33998# global $as_val. Take advantage of shells that can avoid forks. The arguments
33999# must be portable across $(()) and expr.
34000if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34001  eval 'as_fn_arith ()
34002  {
34003    as_val=$(( $* ))
34004  }'
34005else
34006  as_fn_arith ()
34007  {
34008    as_val=`expr "$@" || test $? -eq 1`
34009  }
34010fi # as_fn_arith
34011
34012
34013if expr a : '\(a\)' >/dev/null 2>&1 &&
34014   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34015  as_expr=expr
34016else
34017  as_expr=false
34018fi
34019
34020if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34021  as_basename=basename
34022else
34023  as_basename=false
34024fi
34025
34026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34027  as_dirname=dirname
34028else
34029  as_dirname=false
34030fi
34031
34032as_me=`$as_basename -- "$0" ||
34033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34034	 X"$0" : 'X\(//\)$' \| \
34035	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34036$as_echo X/"$0" |
34037    sed '/^.*\/\([^/][^/]*\)\/*$/{
34038	    s//\1/
34039	    q
34040	  }
34041	  /^X\/\(\/\/\)$/{
34042	    s//\1/
34043	    q
34044	  }
34045	  /^X\/\(\/\).*/{
34046	    s//\1/
34047	    q
34048	  }
34049	  s/.*/./; q'`
34050
34051# Avoid depending upon Character Ranges.
34052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34055as_cr_digits='0123456789'
34056as_cr_alnum=$as_cr_Letters$as_cr_digits
34057
34058ECHO_C= ECHO_N= ECHO_T=
34059case `echo -n x` in #(((((
34060-n*)
34061  case `echo 'xy\c'` in
34062  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34063  xy)  ECHO_C='\c';;
34064  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34065       ECHO_T='	';;
34066  esac;;
34067*)
34068  ECHO_N='-n';;
34069esac
34070
34071rm -f conf$$ conf$$.exe conf$$.file
34072if test -d conf$$.dir; then
34073  rm -f conf$$.dir/conf$$.file
34074else
34075  rm -f conf$$.dir
34076  mkdir conf$$.dir 2>/dev/null
34077fi
34078if (echo >conf$$.file) 2>/dev/null; then
34079  if ln -s conf$$.file conf$$ 2>/dev/null; then
34080    as_ln_s='ln -s'
34081    # ... but there are two gotchas:
34082    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34083    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34084    # In both cases, we have to default to `cp -p'.
34085    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34086      as_ln_s='cp -p'
34087  elif ln conf$$.file conf$$ 2>/dev/null; then
34088    as_ln_s=ln
34089  else
34090    as_ln_s='cp -p'
34091  fi
34092else
34093  as_ln_s='cp -p'
34094fi
34095rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34096rmdir conf$$.dir 2>/dev/null
34097
34098
34099# as_fn_mkdir_p
34100# -------------
34101# Create "$as_dir" as a directory, including parents if necessary.
34102as_fn_mkdir_p ()
34103{
34104
34105  case $as_dir in #(
34106  -*) as_dir=./$as_dir;;
34107  esac
34108  test -d "$as_dir" || eval $as_mkdir_p || {
34109    as_dirs=
34110    while :; do
34111      case $as_dir in #(
34112      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34113      *) as_qdir=$as_dir;;
34114      esac
34115      as_dirs="'$as_qdir' $as_dirs"
34116      as_dir=`$as_dirname -- "$as_dir" ||
34117$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34118	 X"$as_dir" : 'X\(//\)[^/]' \| \
34119	 X"$as_dir" : 'X\(//\)$' \| \
34120	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34121$as_echo X"$as_dir" |
34122    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34123	    s//\1/
34124	    q
34125	  }
34126	  /^X\(\/\/\)[^/].*/{
34127	    s//\1/
34128	    q
34129	  }
34130	  /^X\(\/\/\)$/{
34131	    s//\1/
34132	    q
34133	  }
34134	  /^X\(\/\).*/{
34135	    s//\1/
34136	    q
34137	  }
34138	  s/.*/./; q'`
34139      test -d "$as_dir" && break
34140    done
34141    test -z "$as_dirs" || eval "mkdir $as_dirs"
34142  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34143
34144
34145} # as_fn_mkdir_p
34146if mkdir -p . 2>/dev/null; then
34147  as_mkdir_p='mkdir -p "$as_dir"'
34148else
34149  test -d ./-p && rmdir ./-p
34150  as_mkdir_p=false
34151fi
34152
34153if test -x / >/dev/null 2>&1; then
34154  as_test_x='test -x'
34155else
34156  if ls -dL / >/dev/null 2>&1; then
34157    as_ls_L_option=L
34158  else
34159    as_ls_L_option=
34160  fi
34161  as_test_x='
34162    eval sh -c '\''
34163      if test -d "$1"; then
34164	test -d "$1/.";
34165      else
34166	case $1 in #(
34167	-*)set "./$1";;
34168	esac;
34169	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34170	???[sx]*):;;*)false;;esac;fi
34171    '\'' sh
34172  '
34173fi
34174as_executable_p=$as_test_x
34175
34176# Sed expression to map a string onto a valid CPP name.
34177as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34178
34179# Sed expression to map a string onto a valid variable name.
34180as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34181
34182
34183exec 6>&1
34184## ----------------------------------- ##
34185## Main body of $CONFIG_STATUS script. ##
34186## ----------------------------------- ##
34187_ASEOF
34188test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34189
34190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34191# Save the log message, to keep $0 and so on meaningful, and to
34192# report actual input values of CONFIG_FILES etc. instead of their
34193# values after options handling.
34194ac_log="
34195This file was extended by OpenJDK $as_me jdk8, which was
34196generated by GNU Autoconf 2.67.  Invocation command line was
34197
34198  CONFIG_FILES    = $CONFIG_FILES
34199  CONFIG_HEADERS  = $CONFIG_HEADERS
34200  CONFIG_LINKS    = $CONFIG_LINKS
34201  CONFIG_COMMANDS = $CONFIG_COMMANDS
34202  $ $0 $@
34203
34204on `(hostname || uname -n) 2>/dev/null | sed 1q`
34205"
34206
34207_ACEOF
34208
34209case $ac_config_files in *"
34210"*) set x $ac_config_files; shift; ac_config_files=$*;;
34211esac
34212
34213case $ac_config_headers in *"
34214"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34215esac
34216
34217
34218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34219# Files that config.status was made for.
34220config_files="$ac_config_files"
34221config_headers="$ac_config_headers"
34222
34223_ACEOF
34224
34225cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34226ac_cs_usage="\
34227\`$as_me' instantiates files and other configuration actions
34228from templates according to the current configuration.  Unless the files
34229and actions are specified as TAGs, all are instantiated by default.
34230
34231Usage: $0 [OPTION]... [TAG]...
34232
34233  -h, --help       print this help, then exit
34234  -V, --version    print version number and configuration settings, then exit
34235      --config     print configuration, then exit
34236  -q, --quiet, --silent
34237                   do not print progress messages
34238  -d, --debug      don't remove temporary files
34239      --recheck    update $as_me by reconfiguring in the same conditions
34240      --file=FILE[:TEMPLATE]
34241                   instantiate the configuration file FILE
34242      --header=FILE[:TEMPLATE]
34243                   instantiate the configuration header FILE
34244
34245Configuration files:
34246$config_files
34247
34248Configuration headers:
34249$config_headers
34250
34251Report bugs to <build-dev@openjdk.java.net>.
34252OpenJDK home page: <http://openjdk.java.net>."
34253
34254_ACEOF
34255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34256ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34257ac_cs_version="\\
34258OpenJDK config.status jdk8
34259configured by $0, generated by GNU Autoconf 2.67,
34260  with options \\"\$ac_cs_config\\"
34261
34262Copyright (C) 2010 Free Software Foundation, Inc.
34263This config.status script is free software; the Free Software Foundation
34264gives unlimited permission to copy, distribute and modify it."
34265
34266ac_pwd='$ac_pwd'
34267srcdir='$srcdir'
34268AWK='$AWK'
34269test -n "\$AWK" || AWK=awk
34270_ACEOF
34271
34272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34273# The default lists apply if the user does not specify any file.
34274ac_need_defaults=:
34275while test $# != 0
34276do
34277  case $1 in
34278  --*=?*)
34279    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34280    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34281    ac_shift=:
34282    ;;
34283  --*=)
34284    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34285    ac_optarg=
34286    ac_shift=:
34287    ;;
34288  *)
34289    ac_option=$1
34290    ac_optarg=$2
34291    ac_shift=shift
34292    ;;
34293  esac
34294
34295  case $ac_option in
34296  # Handling of the options.
34297  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34298    ac_cs_recheck=: ;;
34299  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34300    $as_echo "$ac_cs_version"; exit ;;
34301  --config | --confi | --conf | --con | --co | --c )
34302    $as_echo "$ac_cs_config"; exit ;;
34303  --debug | --debu | --deb | --de | --d | -d )
34304    debug=: ;;
34305  --file | --fil | --fi | --f )
34306    $ac_shift
34307    case $ac_optarg in
34308    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34309    '') as_fn_error $? "missing file argument" ;;
34310    esac
34311    as_fn_append CONFIG_FILES " '$ac_optarg'"
34312    ac_need_defaults=false;;
34313  --header | --heade | --head | --hea )
34314    $ac_shift
34315    case $ac_optarg in
34316    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34317    esac
34318    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34319    ac_need_defaults=false;;
34320  --he | --h)
34321    # Conflict between --help and --header
34322    as_fn_error $? "ambiguous option: \`$1'
34323Try \`$0 --help' for more information.";;
34324  --help | --hel | -h )
34325    $as_echo "$ac_cs_usage"; exit ;;
34326  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34327  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34328    ac_cs_silent=: ;;
34329
34330  # This is an error.
34331  -*) as_fn_error $? "unrecognized option: \`$1'
34332Try \`$0 --help' for more information." ;;
34333
34334  *) as_fn_append ac_config_targets " $1"
34335     ac_need_defaults=false ;;
34336
34337  esac
34338  shift
34339done
34340
34341ac_configure_extra_args=
34342
34343if $ac_cs_silent; then
34344  exec 6>/dev/null
34345  ac_configure_extra_args="$ac_configure_extra_args --silent"
34346fi
34347
34348_ACEOF
34349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34350if \$ac_cs_recheck; then
34351  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34352  shift
34353  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34354  CONFIG_SHELL='$SHELL'
34355  export CONFIG_SHELL
34356  exec "\$@"
34357fi
34358
34359_ACEOF
34360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34361exec 5>>config.log
34362{
34363  echo
34364  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34365## Running $as_me. ##
34366_ASBOX
34367  $as_echo "$ac_log"
34368} >&5
34369
34370_ACEOF
34371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34372_ACEOF
34373
34374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34375
34376# Handling of arguments.
34377for ac_config_target in $ac_config_targets
34378do
34379  case $ac_config_target in
34380    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34381    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34382    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34383    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34384    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34385    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34386    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34387
34388  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34389  esac
34390done
34391
34392
34393# If the user did not use the arguments to specify the items to instantiate,
34394# then the envvar interface is used.  Set only those that are not.
34395# We use the long form for the default assignment because of an extremely
34396# bizarre bug on SunOS 4.1.3.
34397if $ac_need_defaults; then
34398  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34399  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34400fi
34401
34402# Have a temporary directory for convenience.  Make it in the build tree
34403# simply because there is no reason against having it here, and in addition,
34404# creating and moving files from /tmp can sometimes cause problems.
34405# Hook for its removal unless debugging.
34406# Note that there is a small window in which the directory will not be cleaned:
34407# after its creation but before its name has been assigned to `$tmp'.
34408$debug ||
34409{
34410  tmp=
34411  trap 'exit_status=$?
34412  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34413' 0
34414  trap 'as_fn_exit 1' 1 2 13 15
34415}
34416# Create a (secure) tmp directory for tmp files.
34417
34418{
34419  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34420  test -n "$tmp" && test -d "$tmp"
34421}  ||
34422{
34423  tmp=./conf$$-$RANDOM
34424  (umask 077 && mkdir "$tmp")
34425} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34426
34427# Set up the scripts for CONFIG_FILES section.
34428# No need to generate them if there are no CONFIG_FILES.
34429# This happens for instance with `./config.status config.h'.
34430if test -n "$CONFIG_FILES"; then
34431
34432
34433ac_cr=`echo X | tr X '\015'`
34434# On cygwin, bash can eat \r inside `` if the user requested igncr.
34435# But we know of no other shell where ac_cr would be empty at this
34436# point, so we can use a bashism as a fallback.
34437if test "x$ac_cr" = x; then
34438  eval ac_cr=\$\'\\r\'
34439fi
34440ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34441if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34442  ac_cs_awk_cr='\\r'
34443else
34444  ac_cs_awk_cr=$ac_cr
34445fi
34446
34447echo 'BEGIN {' >"$tmp/subs1.awk" &&
34448_ACEOF
34449
34450
34451{
34452  echo "cat >conf$$subs.awk <<_ACEOF" &&
34453  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34454  echo "_ACEOF"
34455} >conf$$subs.sh ||
34456  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34457ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34458ac_delim='%!_!# '
34459for ac_last_try in false false false false false :; do
34460  . ./conf$$subs.sh ||
34461    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34462
34463  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34464  if test $ac_delim_n = $ac_delim_num; then
34465    break
34466  elif $ac_last_try; then
34467    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34468  else
34469    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34470  fi
34471done
34472rm -f conf$$subs.sh
34473
34474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34475cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34476_ACEOF
34477sed -n '
34478h
34479s/^/S["/; s/!.*/"]=/
34480p
34481g
34482s/^[^!]*!//
34483:repl
34484t repl
34485s/'"$ac_delim"'$//
34486t delim
34487:nl
34488h
34489s/\(.\{148\}\)..*/\1/
34490t more1
34491s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34492p
34493n
34494b repl
34495:more1
34496s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34497p
34498g
34499s/.\{148\}//
34500t nl
34501:delim
34502h
34503s/\(.\{148\}\)..*/\1/
34504t more2
34505s/["\\]/\\&/g; s/^/"/; s/$/"/
34506p
34507b
34508:more2
34509s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34510p
34511g
34512s/.\{148\}//
34513t delim
34514' <conf$$subs.awk | sed '
34515/^[^""]/{
34516  N
34517  s/\n//
34518}
34519' >>$CONFIG_STATUS || ac_write_fail=1
34520rm -f conf$$subs.awk
34521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34522_ACAWK
34523cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34524  for (key in S) S_is_set[key] = 1
34525  FS = ""
34526
34527}
34528{
34529  line = $ 0
34530  nfields = split(line, field, "@")
34531  substed = 0
34532  len = length(field[1])
34533  for (i = 2; i < nfields; i++) {
34534    key = field[i]
34535    keylen = length(key)
34536    if (S_is_set[key]) {
34537      value = S[key]
34538      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34539      len += length(value) + length(field[++i])
34540      substed = 1
34541    } else
34542      len += 1 + keylen
34543  }
34544
34545  print line
34546}
34547
34548_ACAWK
34549_ACEOF
34550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34551if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34552  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34553else
34554  cat
34555fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34556  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34557_ACEOF
34558
34559# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34560# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34561# trailing colons and then remove the whole line if VPATH becomes empty
34562# (actually we leave an empty line to preserve line numbers).
34563if test "x$srcdir" = x.; then
34564  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34565h
34566s///
34567s/^/:/
34568s/[	 ]*$/:/
34569s/:\$(srcdir):/:/g
34570s/:\${srcdir}:/:/g
34571s/:@srcdir@:/:/g
34572s/^:*//
34573s/:*$//
34574x
34575s/\(=[	 ]*\).*/\1/
34576G
34577s/\n//
34578s/^[^=]*=[	 ]*$//
34579}'
34580fi
34581
34582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34583fi # test -n "$CONFIG_FILES"
34584
34585# Set up the scripts for CONFIG_HEADERS section.
34586# No need to generate them if there are no CONFIG_HEADERS.
34587# This happens for instance with `./config.status Makefile'.
34588if test -n "$CONFIG_HEADERS"; then
34589cat >"$tmp/defines.awk" <<\_ACAWK ||
34590BEGIN {
34591_ACEOF
34592
34593# Transform confdefs.h into an awk script `defines.awk', embedded as
34594# here-document in config.status, that substitutes the proper values into
34595# config.h.in to produce config.h.
34596
34597# Create a delimiter string that does not exist in confdefs.h, to ease
34598# handling of long lines.
34599ac_delim='%!_!# '
34600for ac_last_try in false false :; do
34601  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34602  if test -z "$ac_t"; then
34603    break
34604  elif $ac_last_try; then
34605    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34606  else
34607    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34608  fi
34609done
34610
34611# For the awk script, D is an array of macro values keyed by name,
34612# likewise P contains macro parameters if any.  Preserve backslash
34613# newline sequences.
34614
34615ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34616sed -n '
34617s/.\{148\}/&'"$ac_delim"'/g
34618t rset
34619:rset
34620s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34621t def
34622d
34623:def
34624s/\\$//
34625t bsnl
34626s/["\\]/\\&/g
34627s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34628D["\1"]=" \3"/p
34629s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34630d
34631:bsnl
34632s/["\\]/\\&/g
34633s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34634D["\1"]=" \3\\\\\\n"\\/p
34635t cont
34636s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34637t cont
34638d
34639:cont
34640n
34641s/.\{148\}/&'"$ac_delim"'/g
34642t clear
34643:clear
34644s/\\$//
34645t bsnlc
34646s/["\\]/\\&/g; s/^/"/; s/$/"/p
34647d
34648:bsnlc
34649s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34650b cont
34651' <confdefs.h | sed '
34652s/'"$ac_delim"'/"\\\
34653"/g' >>$CONFIG_STATUS || ac_write_fail=1
34654
34655cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34656  for (key in D) D_is_set[key] = 1
34657  FS = ""
34658}
34659/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34660  line = \$ 0
34661  split(line, arg, " ")
34662  if (arg[1] == "#") {
34663    defundef = arg[2]
34664    mac1 = arg[3]
34665  } else {
34666    defundef = substr(arg[1], 2)
34667    mac1 = arg[2]
34668  }
34669  split(mac1, mac2, "(") #)
34670  macro = mac2[1]
34671  prefix = substr(line, 1, index(line, defundef) - 1)
34672  if (D_is_set[macro]) {
34673    # Preserve the white space surrounding the "#".
34674    print prefix "define", macro P[macro] D[macro]
34675    next
34676  } else {
34677    # Replace #undef with comments.  This is necessary, for example,
34678    # in the case of _POSIX_SOURCE, which is predefined and required
34679    # on some systems where configure will not decide to define it.
34680    if (defundef == "undef") {
34681      print "/*", prefix defundef, macro, "*/"
34682      next
34683    }
34684  }
34685}
34686{ print }
34687_ACAWK
34688_ACEOF
34689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34690  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34691fi # test -n "$CONFIG_HEADERS"
34692
34693
34694eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34695shift
34696for ac_tag
34697do
34698  case $ac_tag in
34699  :[FHLC]) ac_mode=$ac_tag; continue;;
34700  esac
34701  case $ac_mode$ac_tag in
34702  :[FHL]*:*);;
34703  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34704  :[FH]-) ac_tag=-:-;;
34705  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34706  esac
34707  ac_save_IFS=$IFS
34708  IFS=:
34709  set x $ac_tag
34710  IFS=$ac_save_IFS
34711  shift
34712  ac_file=$1
34713  shift
34714
34715  case $ac_mode in
34716  :L) ac_source=$1;;
34717  :[FH])
34718    ac_file_inputs=
34719    for ac_f
34720    do
34721      case $ac_f in
34722      -) ac_f="$tmp/stdin";;
34723      *) # Look for the file first in the build tree, then in the source tree
34724	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34725	 # because $ac_f cannot contain `:'.
34726	 test -f "$ac_f" ||
34727	   case $ac_f in
34728	   [\\/$]*) false;;
34729	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34730	   esac ||
34731	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34732      esac
34733      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34734      as_fn_append ac_file_inputs " '$ac_f'"
34735    done
34736
34737    # Let's still pretend it is `configure' which instantiates (i.e., don't
34738    # use $as_me), people would be surprised to read:
34739    #    /* config.h.  Generated by config.status.  */
34740    configure_input='Generated from '`
34741	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34742	`' by configure.'
34743    if test x"$ac_file" != x-; then
34744      configure_input="$ac_file.  $configure_input"
34745      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34746$as_echo "$as_me: creating $ac_file" >&6;}
34747    fi
34748    # Neutralize special characters interpreted by sed in replacement strings.
34749    case $configure_input in #(
34750    *\&* | *\|* | *\\* )
34751       ac_sed_conf_input=`$as_echo "$configure_input" |
34752       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34753    *) ac_sed_conf_input=$configure_input;;
34754    esac
34755
34756    case $ac_tag in
34757    *:-:* | *:-) cat >"$tmp/stdin" \
34758      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34759    esac
34760    ;;
34761  esac
34762
34763  ac_dir=`$as_dirname -- "$ac_file" ||
34764$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34765	 X"$ac_file" : 'X\(//\)[^/]' \| \
34766	 X"$ac_file" : 'X\(//\)$' \| \
34767	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34768$as_echo X"$ac_file" |
34769    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34770	    s//\1/
34771	    q
34772	  }
34773	  /^X\(\/\/\)[^/].*/{
34774	    s//\1/
34775	    q
34776	  }
34777	  /^X\(\/\/\)$/{
34778	    s//\1/
34779	    q
34780	  }
34781	  /^X\(\/\).*/{
34782	    s//\1/
34783	    q
34784	  }
34785	  s/.*/./; q'`
34786  as_dir="$ac_dir"; as_fn_mkdir_p
34787  ac_builddir=.
34788
34789case "$ac_dir" in
34790.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34791*)
34792  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34793  # A ".." for each directory in $ac_dir_suffix.
34794  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34795  case $ac_top_builddir_sub in
34796  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34797  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34798  esac ;;
34799esac
34800ac_abs_top_builddir=$ac_pwd
34801ac_abs_builddir=$ac_pwd$ac_dir_suffix
34802# for backward compatibility:
34803ac_top_builddir=$ac_top_build_prefix
34804
34805case $srcdir in
34806  .)  # We are building in place.
34807    ac_srcdir=.
34808    ac_top_srcdir=$ac_top_builddir_sub
34809    ac_abs_top_srcdir=$ac_pwd ;;
34810  [\\/]* | ?:[\\/]* )  # Absolute name.
34811    ac_srcdir=$srcdir$ac_dir_suffix;
34812    ac_top_srcdir=$srcdir
34813    ac_abs_top_srcdir=$srcdir ;;
34814  *) # Relative name.
34815    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34816    ac_top_srcdir=$ac_top_build_prefix$srcdir
34817    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34818esac
34819ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34820
34821
34822  case $ac_mode in
34823  :F)
34824  #
34825  # CONFIG_FILE
34826  #
34827
34828_ACEOF
34829
34830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34831# If the template does not know about datarootdir, expand it.
34832# FIXME: This hack should be removed a few years after 2.60.
34833ac_datarootdir_hack=; ac_datarootdir_seen=
34834ac_sed_dataroot='
34835/datarootdir/ {
34836  p
34837  q
34838}
34839/@datadir@/p
34840/@docdir@/p
34841/@infodir@/p
34842/@localedir@/p
34843/@mandir@/p'
34844case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34845*datarootdir*) ac_datarootdir_seen=yes;;
34846*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34847  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34848$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34849_ACEOF
34850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34851  ac_datarootdir_hack='
34852  s&@datadir@&$datadir&g
34853  s&@docdir@&$docdir&g
34854  s&@infodir@&$infodir&g
34855  s&@localedir@&$localedir&g
34856  s&@mandir@&$mandir&g
34857  s&\\\${datarootdir}&$datarootdir&g' ;;
34858esac
34859_ACEOF
34860
34861# Neutralize VPATH when `$srcdir' = `.'.
34862# Shell code in configure.ac might set extrasub.
34863# FIXME: do we really want to maintain this feature?
34864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34865ac_sed_extra="$ac_vpsub
34866$extrasub
34867_ACEOF
34868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34869:t
34870/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34871s|@configure_input@|$ac_sed_conf_input|;t t
34872s&@top_builddir@&$ac_top_builddir_sub&;t t
34873s&@top_build_prefix@&$ac_top_build_prefix&;t t
34874s&@srcdir@&$ac_srcdir&;t t
34875s&@abs_srcdir@&$ac_abs_srcdir&;t t
34876s&@top_srcdir@&$ac_top_srcdir&;t t
34877s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34878s&@builddir@&$ac_builddir&;t t
34879s&@abs_builddir@&$ac_abs_builddir&;t t
34880s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34881$ac_datarootdir_hack
34882"
34883eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34884  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34885
34886test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34887  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34888  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34889  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34890which seems to be undefined.  Please make sure it is defined" >&5
34891$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34892which seems to be undefined.  Please make sure it is defined" >&2;}
34893
34894  rm -f "$tmp/stdin"
34895  case $ac_file in
34896  -) cat "$tmp/out" && rm -f "$tmp/out";;
34897  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34898  esac \
34899  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34900 ;;
34901  :H)
34902  #
34903  # CONFIG_HEADER
34904  #
34905  if test x"$ac_file" != x-; then
34906    {
34907      $as_echo "/* $configure_input  */" \
34908      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34909    } >"$tmp/config.h" \
34910      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34911    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34912      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34913$as_echo "$as_me: $ac_file is unchanged" >&6;}
34914    else
34915      rm -f "$ac_file"
34916      mv "$tmp/config.h" "$ac_file" \
34917	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34918    fi
34919  else
34920    $as_echo "/* $configure_input  */" \
34921      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34922      || as_fn_error $? "could not create -" "$LINENO" 5
34923  fi
34924 ;;
34925
34926
34927  esac
34928
34929done # for ac_tag
34930
34931
34932as_fn_exit 0
34933_ACEOF
34934ac_clean_files=$ac_clean_files_save
34935
34936test $ac_write_fail = 0 ||
34937  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34938
34939
34940# configure is writing to config.log, and then calls config.status.
34941# config.status does its own redirection, appending to config.log.
34942# Unfortunately, on DOS this fails, as config.log is still kept open
34943# by configure, so config.status won't be able to write to it; its
34944# output is simply discarded.  So we exec the FD to /dev/null,
34945# effectively closing config.log, so it can be properly (re)opened and
34946# appended to by config.status.  When coming back to configure, we
34947# need to make the FD available again.
34948if test "$no_create" != yes; then
34949  ac_cs_success=:
34950  ac_config_status_args=
34951  test "$silent" = yes &&
34952    ac_config_status_args="$ac_config_status_args --quiet"
34953  exec 5>/dev/null
34954  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34955  exec 5>>config.log
34956  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34957  # would make configure fail if this is the last instruction.
34958  $ac_cs_success || as_fn_exit 1
34959fi
34960if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34961  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34962$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34963fi
34964
34965
34966# Make the compare script executable
34967$CHMOD +x $OUTPUT_ROOT/compare.sh
34968
34969# Finally output some useful information to the user
34970
34971# Finally output some useful information to the user
34972
34973if test "x$CCACHE_FOUND" != x; then
34974	if  test "x$HAS_GOOD_CCACHE" = x; then
34975		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34976		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34977	else
34978		CCACHE_STATUS="installed and in use"
34979	fi
34980else
34981	if test "x$GCC" = xyes; then
34982		CCACHE_STATUS="not installed (consider installing)"
34983		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34984	else
34985		CCACHE_STATUS="not available for your system"
34986	fi
34987fi
34988
34989printf "\n"
34990printf "====================================================\n"
34991printf "A new configuration has been successfully created in\n"
34992printf "$OUTPUT_ROOT\n"
34993if test "x$CONFIGURE_COMMAND_LINE" != x; then
34994	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34995else
34996	printf "using default settings.\n"
34997fi
34998
34999printf "\n"
35000printf "Configuration summary:\n"
35001printf "* Debug level:    $DEBUG_LEVEL\n"
35002printf "* JDK variant:    $JDK_VARIANT\n"
35003printf "* JVM variants:   $with_jvm_variants\n"
35004printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35005
35006printf "\n"
35007printf "Tools summary:\n"
35008if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35009  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35010fi
35011printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35012printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35013printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35014
35015printf "\n"
35016printf "Build performance summary:\n"
35017printf "* Cores to use:   $JOBS\n"
35018printf "* Memory limit:   $MEMORY_SIZE MB\n"
35019printf "* ccache status:  $CCACHE_STATUS\n"
35020printf "\n"
35021
35022if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35023	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35024	printf "$CCACHE_HELP_MSG\n"
35025
35026    # Print a helpful message on how to acquire the necessary build dependency.
35027    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35028    MISSING_DEPENDENCY=ccache
35029    PKGHANDLER_COMMAND=
35030
35031    case $PKGHANDLER in
35032	apt-get)
35033                apt_help     $MISSING_DEPENDENCY ;;
35034    yum)
35035                yum_help     $MISSING_DEPENDENCY ;;
35036	port)
35037                port_help    $MISSING_DEPENDENCY ;;
35038	pkgutil)
35039                pkgutil_help $MISSING_DEPENDENCY ;;
35040	pkgadd)
35041                pkgadd_help  $MISSING_DEPENDENCY ;;
35042    * )
35043      break ;;
35044    esac
35045
35046    if test "x$PKGHANDLER_COMMAND" != x; then
35047        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35048    fi
35049
35050	printf "$HELP_MSG\n"
35051	printf "\n"
35052fi
35053
35054if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35055	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35056	printf "will result in longer build times.\n"
35057	printf "\n"
35058fi
35059
35060if test "x$FOUND_ALT_VARIABLES" != "x"; then
35061	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35062	printf "These are not respected, and will be ignored. It is recommended\n"
35063	printf "that you clean your environment. The following variables are set:\n"
35064	printf "$FOUND_ALT_VARIABLES\n"
35065	printf "\n"
35066fi
35067
35068if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35069	printf "WARNING: Your build output directory is not on a local disk.\n"
35070	printf "This will severely degrade build performance!\n"
35071	printf "It is recommended that you create an output directory on a local disk,\n"
35072	printf "and run the configure script again from that directory.\n"
35073	printf "\n"
35074fi
35075
35076if test "x$IS_RECONFIGURE" = "xyes"; then
35077	printf "WARNING: The result of this configuration has overridden an older\n"
35078	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35079	printf "proper build. Failure to do so might result in strange build problems.\n"
35080	printf "\n"
35081fi
35082
35083