generated-configure.sh revision 752:78aaf5d3314d
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=1372413705
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    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23979    if test "x$JDK_UPDATE_VERSION" = x; then :
23980
23981        JDK_UPDATE_VERSION_NOTNULL=0
23982
23983fi
23984    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23985    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23986    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23987    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23988    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23989    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23990    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23991
23992    # lib.exe is used to create static libraries.
23993    # Extract the first word of "lib", so it can be a program name with args.
23994set dummy lib; ac_word=$2
23995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23996$as_echo_n "checking for $ac_word... " >&6; }
23997if test "${ac_cv_prog_WINAR+set}" = set; then :
23998  $as_echo_n "(cached) " >&6
23999else
24000  if test -n "$WINAR"; then
24001  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24002else
24003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24004for as_dir in $PATH
24005do
24006  IFS=$as_save_IFS
24007  test -z "$as_dir" && as_dir=.
24008    for ac_exec_ext in '' $ac_executable_extensions; do
24009  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24010    ac_cv_prog_WINAR="lib"
24011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24012    break 2
24013  fi
24014done
24015  done
24016IFS=$as_save_IFS
24017
24018fi
24019fi
24020WINAR=$ac_cv_prog_WINAR
24021if test -n "$WINAR"; then
24022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24023$as_echo "$WINAR" >&6; }
24024else
24025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24026$as_echo "no" >&6; }
24027fi
24028
24029
24030
24031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24032
24033  # First separate the path from the arguments. This will split at the first
24034  # space.
24035  complete="$WINAR"
24036  path="${complete%% *}"
24037  tmp="$complete EOL"
24038  arguments="${tmp#* }"
24039
24040  # Input might be given as Windows format, start by converting to
24041  # unix format.
24042  new_path=`$CYGPATH -u "$path"`
24043
24044  # Now try to locate executable using which
24045  new_path=`$WHICH "$new_path" 2> /dev/null`
24046  # bat and cmd files are not always considered executable in cygwin causing which
24047  # to not find them
24048  if test "x$new_path" = x \
24049           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24051    new_path=`$CYGPATH -u "$path"`
24052  fi
24053  if test "x$new_path" = x; then
24054    # Oops. Which didn't find the executable.
24055    # The splitting of arguments from the executable at a space might have been incorrect,
24056    # since paths with space are more likely in Windows. Give it another try with the whole
24057    # argument.
24058    path="$complete"
24059    arguments="EOL"
24060    new_path=`$CYGPATH -u "$path"`
24061    new_path=`$WHICH "$new_path" 2> /dev/null`
24062    # bat and cmd files are not always considered executable in cygwin causing which
24063    # to not find them
24064    if test "x$new_path" = x \
24065             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24067      new_path=`$CYGPATH -u "$path"`
24068    fi
24069    if test "x$new_path" = x; then
24070      # It's still not found. Now this is an unrecoverable error.
24071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24072$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24073      has_space=`$ECHO "$complete" | $GREP " "`
24074      if test "x$has_space" != x; then
24075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24077      fi
24078      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24079    fi
24080  fi
24081
24082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24085  # "foo.exe" is OK but "foo" is an error.
24086  #
24087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24088  # It is also a way to make sure we got the proper file name for the real test later on.
24089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24090  if test "x$test_shortpath" = x; then
24091    # Short path failed, file does not exist as specified.
24092    # Try adding .exe or .cmd
24093    if test -f "${new_path}.exe"; then
24094       input_to_shortpath="${new_path}.exe"
24095    elif test -f "${new_path}.cmd"; then
24096       input_to_shortpath="${new_path}.cmd"
24097    else
24098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24099$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24102      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24103    fi
24104  else
24105    input_to_shortpath="$new_path"
24106  fi
24107
24108  # Call helper function which possibly converts this using DOS-style short mode.
24109  # If so, the updated path is stored in $new_path.
24110  new_path="$input_to_shortpath"
24111
24112  input_path="$input_to_shortpath"
24113  # Check if we need to convert this using DOS-style short mode. If the path
24114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24115  # take no chances and rewrite it.
24116  # Note: m4 eats our [], so we need to use [ and ] instead.
24117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24118  if test "x$has_forbidden_chars" != x; then
24119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24123      # Going to short mode and back again did indeed matter. Since short mode is
24124      # case insensitive, let's make it lowercase to improve readability.
24125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24126      # Now convert it back to Unix-stile (cygpath)
24127      input_path=`$CYGPATH -u "$shortmode_path"`
24128      new_path="$input_path"
24129    fi
24130  fi
24131
24132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24133  if test "x$test_cygdrive_prefix" = x; then
24134    # As a simple fix, exclude /usr/bin since it's not a real path.
24135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24137      # a path prefixed by /cygdrive for fixpath to work.
24138      new_path="$CYGWIN_ROOT_PATH$input_path"
24139    fi
24140  fi
24141
24142  # remove trailing .exe if any
24143  new_path="${new_path/%.exe/}"
24144
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146
24147  # First separate the path from the arguments. This will split at the first
24148  # space.
24149  complete="$WINAR"
24150  path="${complete%% *}"
24151  tmp="$complete EOL"
24152  arguments="${tmp#* }"
24153
24154  # Input might be given as Windows format, start by converting to
24155  # unix format.
24156  new_path="$path"
24157
24158  windows_path="$new_path"
24159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24160    unix_path=`$CYGPATH -u "$windows_path"`
24161    new_path="$unix_path"
24162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24164    new_path="$unix_path"
24165  fi
24166
24167
24168  # Now try to locate executable using which
24169  new_path=`$WHICH "$new_path" 2> /dev/null`
24170
24171  if test "x$new_path" = x; then
24172    # Oops. Which didn't find the executable.
24173    # The splitting of arguments from the executable at a space might have been incorrect,
24174    # since paths with space are more likely in Windows. Give it another try with the whole
24175    # argument.
24176    path="$complete"
24177    arguments="EOL"
24178    new_path="$path"
24179
24180  windows_path="$new_path"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    new_path="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    new_path="$unix_path"
24187  fi
24188
24189
24190    new_path=`$WHICH "$new_path" 2> /dev/null`
24191
24192    if test "x$new_path" = x; then
24193      # It's still not found. Now this is an unrecoverable error.
24194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24195$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24196      has_space=`$ECHO "$complete" | $GREP " "`
24197      if test "x$has_space" != x; then
24198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24200      fi
24201      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24202    fi
24203  fi
24204
24205  # Now new_path has a complete unix path to the binary
24206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24207    # Keep paths in /bin as-is, but remove trailing .exe if any
24208    new_path="${new_path/%.exe/}"
24209    # Do not save /bin paths to all_fixpath_prefixes!
24210  else
24211    # Not in mixed or Windows style, start by that.
24212    new_path=`cmd //c echo $new_path`
24213
24214  input_path="$new_path"
24215  # Check if we need to convert this using DOS-style short mode. If the path
24216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24217  # take no chances and rewrite it.
24218  # Note: m4 eats our [], so we need to use [ and ] instead.
24219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24220  if test "x$has_forbidden_chars" != x; then
24221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24223  fi
24224
24225    # Output is in $new_path
24226
24227  windows_path="$new_path"
24228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24229    unix_path=`$CYGPATH -u "$windows_path"`
24230    new_path="$unix_path"
24231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24233    new_path="$unix_path"
24234  fi
24235
24236    # remove trailing .exe if any
24237    new_path="${new_path/%.exe/}"
24238
24239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24241  fi
24242
24243  else
24244    # We're on a posix platform. Hooray! :)
24245    # First separate the path from the arguments. This will split at the first
24246    # space.
24247    complete="$WINAR"
24248    path="${complete%% *}"
24249    tmp="$complete EOL"
24250    arguments="${tmp#* }"
24251
24252    # Cannot rely on the command "which" here since it doesn't always work.
24253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24254    if test -z "$is_absolute_path"; then
24255      # Path to executable is not absolute. Find it.
24256      IFS_save="$IFS"
24257      IFS=:
24258      for p in $PATH; do
24259        if test -f "$p/$path" && test -x "$p/$path"; then
24260          new_path="$p/$path"
24261          break
24262        fi
24263      done
24264      IFS="$IFS_save"
24265    else
24266      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24267$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24268      new_path="$path"
24269    fi
24270
24271    if test "x$new_path" = x; then
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24273$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24274        has_space=`$ECHO "$complete" | $GREP " "`
24275        if test "x$has_space" != x; then
24276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24278        fi
24279        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24280      fi
24281  fi
24282
24283      # Now join together the path and the arguments once again
24284      if test "x$arguments" != xEOL; then
24285        new_complete="$new_path ${arguments% *}"
24286      else
24287        new_complete="$new_path"
24288      fi
24289
24290  if test "x$complete" != "x$new_complete"; then
24291      WINAR="$new_complete"
24292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24293$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24294    fi
24295
24296    AR="$WINAR"
24297    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24298
24299    # Extract the first word of "dumpbin", so it can be a program name with args.
24300set dummy dumpbin; ac_word=$2
24301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24302$as_echo_n "checking for $ac_word... " >&6; }
24303if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24304  $as_echo_n "(cached) " >&6
24305else
24306  if test -n "$DUMPBIN"; then
24307  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24308else
24309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24310for as_dir in $PATH
24311do
24312  IFS=$as_save_IFS
24313  test -z "$as_dir" && as_dir=.
24314    for ac_exec_ext in '' $ac_executable_extensions; do
24315  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24316    ac_cv_prog_DUMPBIN="dumpbin"
24317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24318    break 2
24319  fi
24320done
24321  done
24322IFS=$as_save_IFS
24323
24324fi
24325fi
24326DUMPBIN=$ac_cv_prog_DUMPBIN
24327if test -n "$DUMPBIN"; then
24328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24329$as_echo "$DUMPBIN" >&6; }
24330else
24331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24332$as_echo "no" >&6; }
24333fi
24334
24335
24336
24337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24338
24339  # First separate the path from the arguments. This will split at the first
24340  # space.
24341  complete="$DUMPBIN"
24342  path="${complete%% *}"
24343  tmp="$complete EOL"
24344  arguments="${tmp#* }"
24345
24346  # Input might be given as Windows format, start by converting to
24347  # unix format.
24348  new_path=`$CYGPATH -u "$path"`
24349
24350  # Now try to locate executable using which
24351  new_path=`$WHICH "$new_path" 2> /dev/null`
24352  # bat and cmd files are not always considered executable in cygwin causing which
24353  # to not find them
24354  if test "x$new_path" = x \
24355           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24356           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24357    new_path=`$CYGPATH -u "$path"`
24358  fi
24359  if test "x$new_path" = x; then
24360    # Oops. Which didn't find the executable.
24361    # The splitting of arguments from the executable at a space might have been incorrect,
24362    # since paths with space are more likely in Windows. Give it another try with the whole
24363    # argument.
24364    path="$complete"
24365    arguments="EOL"
24366    new_path=`$CYGPATH -u "$path"`
24367    new_path=`$WHICH "$new_path" 2> /dev/null`
24368    # bat and cmd files are not always considered executable in cygwin causing which
24369    # to not find them
24370    if test "x$new_path" = x \
24371             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24372             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24373      new_path=`$CYGPATH -u "$path"`
24374    fi
24375    if test "x$new_path" = x; then
24376      # It's still not found. Now this is an unrecoverable error.
24377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24378$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24379      has_space=`$ECHO "$complete" | $GREP " "`
24380      if test "x$has_space" != x; then
24381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24383      fi
24384      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24385    fi
24386  fi
24387
24388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24391  # "foo.exe" is OK but "foo" is an error.
24392  #
24393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24394  # It is also a way to make sure we got the proper file name for the real test later on.
24395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24396  if test "x$test_shortpath" = x; then
24397    # Short path failed, file does not exist as specified.
24398    # Try adding .exe or .cmd
24399    if test -f "${new_path}.exe"; then
24400       input_to_shortpath="${new_path}.exe"
24401    elif test -f "${new_path}.cmd"; then
24402       input_to_shortpath="${new_path}.cmd"
24403    else
24404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24405$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24408      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24409    fi
24410  else
24411    input_to_shortpath="$new_path"
24412  fi
24413
24414  # Call helper function which possibly converts this using DOS-style short mode.
24415  # If so, the updated path is stored in $new_path.
24416  new_path="$input_to_shortpath"
24417
24418  input_path="$input_to_shortpath"
24419  # Check if we need to convert this using DOS-style short mode. If the path
24420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24421  # take no chances and rewrite it.
24422  # Note: m4 eats our [], so we need to use [ and ] instead.
24423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24424  if test "x$has_forbidden_chars" != x; then
24425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24429      # Going to short mode and back again did indeed matter. Since short mode is
24430      # case insensitive, let's make it lowercase to improve readability.
24431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24432      # Now convert it back to Unix-stile (cygpath)
24433      input_path=`$CYGPATH -u "$shortmode_path"`
24434      new_path="$input_path"
24435    fi
24436  fi
24437
24438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24439  if test "x$test_cygdrive_prefix" = x; then
24440    # As a simple fix, exclude /usr/bin since it's not a real path.
24441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24443      # a path prefixed by /cygdrive for fixpath to work.
24444      new_path="$CYGWIN_ROOT_PATH$input_path"
24445    fi
24446  fi
24447
24448  # remove trailing .exe if any
24449  new_path="${new_path/%.exe/}"
24450
24451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24452
24453  # First separate the path from the arguments. This will split at the first
24454  # space.
24455  complete="$DUMPBIN"
24456  path="${complete%% *}"
24457  tmp="$complete EOL"
24458  arguments="${tmp#* }"
24459
24460  # Input might be given as Windows format, start by converting to
24461  # unix format.
24462  new_path="$path"
24463
24464  windows_path="$new_path"
24465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24466    unix_path=`$CYGPATH -u "$windows_path"`
24467    new_path="$unix_path"
24468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24470    new_path="$unix_path"
24471  fi
24472
24473
24474  # Now try to locate executable using which
24475  new_path=`$WHICH "$new_path" 2> /dev/null`
24476
24477  if test "x$new_path" = x; then
24478    # Oops. Which didn't find the executable.
24479    # The splitting of arguments from the executable at a space might have been incorrect,
24480    # since paths with space are more likely in Windows. Give it another try with the whole
24481    # argument.
24482    path="$complete"
24483    arguments="EOL"
24484    new_path="$path"
24485
24486  windows_path="$new_path"
24487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24488    unix_path=`$CYGPATH -u "$windows_path"`
24489    new_path="$unix_path"
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24492    new_path="$unix_path"
24493  fi
24494
24495
24496    new_path=`$WHICH "$new_path" 2> /dev/null`
24497
24498    if test "x$new_path" = x; then
24499      # It's still not found. Now this is an unrecoverable error.
24500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24501$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24502      has_space=`$ECHO "$complete" | $GREP " "`
24503      if test "x$has_space" != x; then
24504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24506      fi
24507      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24508    fi
24509  fi
24510
24511  # Now new_path has a complete unix path to the binary
24512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24513    # Keep paths in /bin as-is, but remove trailing .exe if any
24514    new_path="${new_path/%.exe/}"
24515    # Do not save /bin paths to all_fixpath_prefixes!
24516  else
24517    # Not in mixed or Windows style, start by that.
24518    new_path=`cmd //c echo $new_path`
24519
24520  input_path="$new_path"
24521  # Check if we need to convert this using DOS-style short mode. If the path
24522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24523  # take no chances and rewrite it.
24524  # Note: m4 eats our [], so we need to use [ and ] instead.
24525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24526  if test "x$has_forbidden_chars" != x; then
24527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24529  fi
24530
24531    # Output is in $new_path
24532
24533  windows_path="$new_path"
24534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24535    unix_path=`$CYGPATH -u "$windows_path"`
24536    new_path="$unix_path"
24537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24539    new_path="$unix_path"
24540  fi
24541
24542    # remove trailing .exe if any
24543    new_path="${new_path/%.exe/}"
24544
24545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24547  fi
24548
24549  else
24550    # We're on a posix platform. Hooray! :)
24551    # First separate the path from the arguments. This will split at the first
24552    # space.
24553    complete="$DUMPBIN"
24554    path="${complete%% *}"
24555    tmp="$complete EOL"
24556    arguments="${tmp#* }"
24557
24558    # Cannot rely on the command "which" here since it doesn't always work.
24559    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24560    if test -z "$is_absolute_path"; then
24561      # Path to executable is not absolute. Find it.
24562      IFS_save="$IFS"
24563      IFS=:
24564      for p in $PATH; do
24565        if test -f "$p/$path" && test -x "$p/$path"; then
24566          new_path="$p/$path"
24567          break
24568        fi
24569      done
24570      IFS="$IFS_save"
24571    else
24572      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24573$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24574      new_path="$path"
24575    fi
24576
24577    if test "x$new_path" = x; then
24578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24579$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24580        has_space=`$ECHO "$complete" | $GREP " "`
24581        if test "x$has_space" != x; then
24582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24584        fi
24585        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24586      fi
24587  fi
24588
24589      # Now join together the path and the arguments once again
24590      if test "x$arguments" != xEOL; then
24591        new_complete="$new_path ${arguments% *}"
24592      else
24593        new_complete="$new_path"
24594      fi
24595
24596  if test "x$complete" != "x$new_complete"; then
24597      DUMPBIN="$new_complete"
24598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24599$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24600    fi
24601
24602
24603    COMPILER_TYPE=CL
24604    CCXXFLAGS="$CCXXFLAGS -nologo"
24605
24606fi
24607
24608
24609
24610ac_ext=c
24611ac_cpp='$CPP $CPPFLAGS'
24612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24614ac_compiler_gnu=$ac_cv_c_compiler_gnu
24615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24616$as_echo_n "checking how to run the C preprocessor... " >&6; }
24617# On Suns, sometimes $CPP names a directory.
24618if test -n "$CPP" && test -d "$CPP"; then
24619  CPP=
24620fi
24621if test -z "$CPP"; then
24622  if test "${ac_cv_prog_CPP+set}" = set; then :
24623  $as_echo_n "(cached) " >&6
24624else
24625      # Double quotes because CPP needs to be expanded
24626    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24627    do
24628      ac_preproc_ok=false
24629for ac_c_preproc_warn_flag in '' yes
24630do
24631  # Use a header file that comes with gcc, so configuring glibc
24632  # with a fresh cross-compiler works.
24633  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24634  # <limits.h> exists even on freestanding compilers.
24635  # On the NeXT, cc -E runs the code through the compiler's parser,
24636  # not just through cpp. "Syntax error" is here to catch this case.
24637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24638/* end confdefs.h.  */
24639#ifdef __STDC__
24640# include <limits.h>
24641#else
24642# include <assert.h>
24643#endif
24644		     Syntax error
24645_ACEOF
24646if ac_fn_c_try_cpp "$LINENO"; then :
24647
24648else
24649  # Broken: fails on valid input.
24650continue
24651fi
24652rm -f conftest.err conftest.i conftest.$ac_ext
24653
24654  # OK, works on sane cases.  Now check whether nonexistent headers
24655  # can be detected and how.
24656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24657/* end confdefs.h.  */
24658#include <ac_nonexistent.h>
24659_ACEOF
24660if ac_fn_c_try_cpp "$LINENO"; then :
24661  # Broken: success on invalid input.
24662continue
24663else
24664  # Passes both tests.
24665ac_preproc_ok=:
24666break
24667fi
24668rm -f conftest.err conftest.i conftest.$ac_ext
24669
24670done
24671# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24672rm -f conftest.i conftest.err conftest.$ac_ext
24673if $ac_preproc_ok; then :
24674  break
24675fi
24676
24677    done
24678    ac_cv_prog_CPP=$CPP
24679
24680fi
24681  CPP=$ac_cv_prog_CPP
24682else
24683  ac_cv_prog_CPP=$CPP
24684fi
24685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24686$as_echo "$CPP" >&6; }
24687ac_preproc_ok=false
24688for ac_c_preproc_warn_flag in '' yes
24689do
24690  # Use a header file that comes with gcc, so configuring glibc
24691  # with a fresh cross-compiler works.
24692  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24693  # <limits.h> exists even on freestanding compilers.
24694  # On the NeXT, cc -E runs the code through the compiler's parser,
24695  # not just through cpp. "Syntax error" is here to catch this case.
24696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24697/* end confdefs.h.  */
24698#ifdef __STDC__
24699# include <limits.h>
24700#else
24701# include <assert.h>
24702#endif
24703		     Syntax error
24704_ACEOF
24705if ac_fn_c_try_cpp "$LINENO"; then :
24706
24707else
24708  # Broken: fails on valid input.
24709continue
24710fi
24711rm -f conftest.err conftest.i conftest.$ac_ext
24712
24713  # OK, works on sane cases.  Now check whether nonexistent headers
24714  # can be detected and how.
24715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24716/* end confdefs.h.  */
24717#include <ac_nonexistent.h>
24718_ACEOF
24719if ac_fn_c_try_cpp "$LINENO"; then :
24720  # Broken: success on invalid input.
24721continue
24722else
24723  # Passes both tests.
24724ac_preproc_ok=:
24725break
24726fi
24727rm -f conftest.err conftest.i conftest.$ac_ext
24728
24729done
24730# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24731rm -f conftest.i conftest.err conftest.$ac_ext
24732if $ac_preproc_ok; then :
24733
24734else
24735  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24737as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24738See \`config.log' for more details" "$LINENO" 5 ; }
24739fi
24740
24741ac_ext=cpp
24742ac_cpp='$CXXCPP $CPPFLAGS'
24743ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24744ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24745ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24746
24747
24748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24749
24750  # First separate the path from the arguments. This will split at the first
24751  # space.
24752  complete="$CPP"
24753  path="${complete%% *}"
24754  tmp="$complete EOL"
24755  arguments="${tmp#* }"
24756
24757  # Input might be given as Windows format, start by converting to
24758  # unix format.
24759  new_path=`$CYGPATH -u "$path"`
24760
24761  # Now try to locate executable using which
24762  new_path=`$WHICH "$new_path" 2> /dev/null`
24763  # bat and cmd files are not always considered executable in cygwin causing which
24764  # to not find them
24765  if test "x$new_path" = x \
24766           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24767           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24768    new_path=`$CYGPATH -u "$path"`
24769  fi
24770  if test "x$new_path" = x; then
24771    # Oops. Which didn't find the executable.
24772    # The splitting of arguments from the executable at a space might have been incorrect,
24773    # since paths with space are more likely in Windows. Give it another try with the whole
24774    # argument.
24775    path="$complete"
24776    arguments="EOL"
24777    new_path=`$CYGPATH -u "$path"`
24778    new_path=`$WHICH "$new_path" 2> /dev/null`
24779    # bat and cmd files are not always considered executable in cygwin causing which
24780    # to not find them
24781    if test "x$new_path" = x \
24782             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24783             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24784      new_path=`$CYGPATH -u "$path"`
24785    fi
24786    if test "x$new_path" = x; then
24787      # It's still not found. Now this is an unrecoverable error.
24788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24789$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24790      has_space=`$ECHO "$complete" | $GREP " "`
24791      if test "x$has_space" != x; then
24792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24794      fi
24795      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24796    fi
24797  fi
24798
24799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24802  # "foo.exe" is OK but "foo" is an error.
24803  #
24804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24805  # It is also a way to make sure we got the proper file name for the real test later on.
24806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24807  if test "x$test_shortpath" = x; then
24808    # Short path failed, file does not exist as specified.
24809    # Try adding .exe or .cmd
24810    if test -f "${new_path}.exe"; then
24811       input_to_shortpath="${new_path}.exe"
24812    elif test -f "${new_path}.cmd"; then
24813       input_to_shortpath="${new_path}.cmd"
24814    else
24815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24816$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24819      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24820    fi
24821  else
24822    input_to_shortpath="$new_path"
24823  fi
24824
24825  # Call helper function which possibly converts this using DOS-style short mode.
24826  # If so, the updated path is stored in $new_path.
24827  new_path="$input_to_shortpath"
24828
24829  input_path="$input_to_shortpath"
24830  # Check if we need to convert this using DOS-style short mode. If the path
24831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24832  # take no chances and rewrite it.
24833  # Note: m4 eats our [], so we need to use [ and ] instead.
24834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24835  if test "x$has_forbidden_chars" != x; then
24836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24840      # Going to short mode and back again did indeed matter. Since short mode is
24841      # case insensitive, let's make it lowercase to improve readability.
24842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24843      # Now convert it back to Unix-stile (cygpath)
24844      input_path=`$CYGPATH -u "$shortmode_path"`
24845      new_path="$input_path"
24846    fi
24847  fi
24848
24849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24850  if test "x$test_cygdrive_prefix" = x; then
24851    # As a simple fix, exclude /usr/bin since it's not a real path.
24852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24854      # a path prefixed by /cygdrive for fixpath to work.
24855      new_path="$CYGWIN_ROOT_PATH$input_path"
24856    fi
24857  fi
24858
24859  # remove trailing .exe if any
24860  new_path="${new_path/%.exe/}"
24861
24862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24863
24864  # First separate the path from the arguments. This will split at the first
24865  # space.
24866  complete="$CPP"
24867  path="${complete%% *}"
24868  tmp="$complete EOL"
24869  arguments="${tmp#* }"
24870
24871  # Input might be given as Windows format, start by converting to
24872  # unix format.
24873  new_path="$path"
24874
24875  windows_path="$new_path"
24876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24877    unix_path=`$CYGPATH -u "$windows_path"`
24878    new_path="$unix_path"
24879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24881    new_path="$unix_path"
24882  fi
24883
24884
24885  # Now try to locate executable using which
24886  new_path=`$WHICH "$new_path" 2> /dev/null`
24887
24888  if test "x$new_path" = x; then
24889    # Oops. Which didn't find the executable.
24890    # The splitting of arguments from the executable at a space might have been incorrect,
24891    # since paths with space are more likely in Windows. Give it another try with the whole
24892    # argument.
24893    path="$complete"
24894    arguments="EOL"
24895    new_path="$path"
24896
24897  windows_path="$new_path"
24898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899    unix_path=`$CYGPATH -u "$windows_path"`
24900    new_path="$unix_path"
24901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24903    new_path="$unix_path"
24904  fi
24905
24906
24907    new_path=`$WHICH "$new_path" 2> /dev/null`
24908
24909    if test "x$new_path" = x; then
24910      # It's still not found. Now this is an unrecoverable error.
24911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24912$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24913      has_space=`$ECHO "$complete" | $GREP " "`
24914      if test "x$has_space" != x; then
24915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24917      fi
24918      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24919    fi
24920  fi
24921
24922  # Now new_path has a complete unix path to the binary
24923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24924    # Keep paths in /bin as-is, but remove trailing .exe if any
24925    new_path="${new_path/%.exe/}"
24926    # Do not save /bin paths to all_fixpath_prefixes!
24927  else
24928    # Not in mixed or Windows style, start by that.
24929    new_path=`cmd //c echo $new_path`
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940  fi
24941
24942    # Output is in $new_path
24943
24944  windows_path="$new_path"
24945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24946    unix_path=`$CYGPATH -u "$windows_path"`
24947    new_path="$unix_path"
24948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24950    new_path="$unix_path"
24951  fi
24952
24953    # remove trailing .exe if any
24954    new_path="${new_path/%.exe/}"
24955
24956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24958  fi
24959
24960  else
24961    # We're on a posix platform. Hooray! :)
24962    # First separate the path from the arguments. This will split at the first
24963    # space.
24964    complete="$CPP"
24965    path="${complete%% *}"
24966    tmp="$complete EOL"
24967    arguments="${tmp#* }"
24968
24969    # Cannot rely on the command "which" here since it doesn't always work.
24970    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24971    if test -z "$is_absolute_path"; then
24972      # Path to executable is not absolute. Find it.
24973      IFS_save="$IFS"
24974      IFS=:
24975      for p in $PATH; do
24976        if test -f "$p/$path" && test -x "$p/$path"; then
24977          new_path="$p/$path"
24978          break
24979        fi
24980      done
24981      IFS="$IFS_save"
24982    else
24983      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24984$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24985      new_path="$path"
24986    fi
24987
24988    if test "x$new_path" = x; then
24989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24990$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24991        has_space=`$ECHO "$complete" | $GREP " "`
24992        if test "x$has_space" != x; then
24993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24995        fi
24996        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24997      fi
24998  fi
24999
25000      # Now join together the path and the arguments once again
25001      if test "x$arguments" != xEOL; then
25002        new_complete="$new_path ${arguments% *}"
25003      else
25004        new_complete="$new_path"
25005      fi
25006
25007  if test "x$complete" != "x$new_complete"; then
25008      CPP="$new_complete"
25009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25010$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25011    fi
25012
25013
25014ac_ext=cpp
25015ac_cpp='$CXXCPP $CPPFLAGS'
25016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25020$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25021if test -z "$CXXCPP"; then
25022  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
25023  $as_echo_n "(cached) " >&6
25024else
25025      # Double quotes because CXXCPP needs to be expanded
25026    for CXXCPP in "$CXX -E" "/lib/cpp"
25027    do
25028      ac_preproc_ok=false
25029for ac_cxx_preproc_warn_flag in '' yes
25030do
25031  # Use a header file that comes with gcc, so configuring glibc
25032  # with a fresh cross-compiler works.
25033  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25034  # <limits.h> exists even on freestanding compilers.
25035  # On the NeXT, cc -E runs the code through the compiler's parser,
25036  # not just through cpp. "Syntax error" is here to catch this case.
25037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25038/* end confdefs.h.  */
25039#ifdef __STDC__
25040# include <limits.h>
25041#else
25042# include <assert.h>
25043#endif
25044		     Syntax error
25045_ACEOF
25046if ac_fn_cxx_try_cpp "$LINENO"; then :
25047
25048else
25049  # Broken: fails on valid input.
25050continue
25051fi
25052rm -f conftest.err conftest.i conftest.$ac_ext
25053
25054  # OK, works on sane cases.  Now check whether nonexistent headers
25055  # can be detected and how.
25056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25057/* end confdefs.h.  */
25058#include <ac_nonexistent.h>
25059_ACEOF
25060if ac_fn_cxx_try_cpp "$LINENO"; then :
25061  # Broken: success on invalid input.
25062continue
25063else
25064  # Passes both tests.
25065ac_preproc_ok=:
25066break
25067fi
25068rm -f conftest.err conftest.i conftest.$ac_ext
25069
25070done
25071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25072rm -f conftest.i conftest.err conftest.$ac_ext
25073if $ac_preproc_ok; then :
25074  break
25075fi
25076
25077    done
25078    ac_cv_prog_CXXCPP=$CXXCPP
25079
25080fi
25081  CXXCPP=$ac_cv_prog_CXXCPP
25082else
25083  ac_cv_prog_CXXCPP=$CXXCPP
25084fi
25085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25086$as_echo "$CXXCPP" >&6; }
25087ac_preproc_ok=false
25088for ac_cxx_preproc_warn_flag in '' yes
25089do
25090  # Use a header file that comes with gcc, so configuring glibc
25091  # with a fresh cross-compiler works.
25092  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25093  # <limits.h> exists even on freestanding compilers.
25094  # On the NeXT, cc -E runs the code through the compiler's parser,
25095  # not just through cpp. "Syntax error" is here to catch this case.
25096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25097/* end confdefs.h.  */
25098#ifdef __STDC__
25099# include <limits.h>
25100#else
25101# include <assert.h>
25102#endif
25103		     Syntax error
25104_ACEOF
25105if ac_fn_cxx_try_cpp "$LINENO"; then :
25106
25107else
25108  # Broken: fails on valid input.
25109continue
25110fi
25111rm -f conftest.err conftest.i conftest.$ac_ext
25112
25113  # OK, works on sane cases.  Now check whether nonexistent headers
25114  # can be detected and how.
25115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25116/* end confdefs.h.  */
25117#include <ac_nonexistent.h>
25118_ACEOF
25119if ac_fn_cxx_try_cpp "$LINENO"; then :
25120  # Broken: success on invalid input.
25121continue
25122else
25123  # Passes both tests.
25124ac_preproc_ok=:
25125break
25126fi
25127rm -f conftest.err conftest.i conftest.$ac_ext
25128
25129done
25130# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25131rm -f conftest.i conftest.err conftest.$ac_ext
25132if $ac_preproc_ok; then :
25133
25134else
25135  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25137as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25138See \`config.log' for more details" "$LINENO" 5 ; }
25139fi
25140
25141ac_ext=cpp
25142ac_cpp='$CXXCPP $CPPFLAGS'
25143ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25144ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25145ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25146
25147
25148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25149
25150  # First separate the path from the arguments. This will split at the first
25151  # space.
25152  complete="$CXXCPP"
25153  path="${complete%% *}"
25154  tmp="$complete EOL"
25155  arguments="${tmp#* }"
25156
25157  # Input might be given as Windows format, start by converting to
25158  # unix format.
25159  new_path=`$CYGPATH -u "$path"`
25160
25161  # Now try to locate executable using which
25162  new_path=`$WHICH "$new_path" 2> /dev/null`
25163  # bat and cmd files are not always considered executable in cygwin causing which
25164  # to not find them
25165  if test "x$new_path" = x \
25166           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25167           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25168    new_path=`$CYGPATH -u "$path"`
25169  fi
25170  if test "x$new_path" = x; then
25171    # Oops. Which didn't find the executable.
25172    # The splitting of arguments from the executable at a space might have been incorrect,
25173    # since paths with space are more likely in Windows. Give it another try with the whole
25174    # argument.
25175    path="$complete"
25176    arguments="EOL"
25177    new_path=`$CYGPATH -u "$path"`
25178    new_path=`$WHICH "$new_path" 2> /dev/null`
25179    # bat and cmd files are not always considered executable in cygwin causing which
25180    # to not find them
25181    if test "x$new_path" = x \
25182             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25183             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25184      new_path=`$CYGPATH -u "$path"`
25185    fi
25186    if test "x$new_path" = x; then
25187      # It's still not found. Now this is an unrecoverable error.
25188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25189$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25190      has_space=`$ECHO "$complete" | $GREP " "`
25191      if test "x$has_space" != x; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25194      fi
25195      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25196    fi
25197  fi
25198
25199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25202  # "foo.exe" is OK but "foo" is an error.
25203  #
25204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25205  # It is also a way to make sure we got the proper file name for the real test later on.
25206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25207  if test "x$test_shortpath" = x; then
25208    # Short path failed, file does not exist as specified.
25209    # Try adding .exe or .cmd
25210    if test -f "${new_path}.exe"; then
25211       input_to_shortpath="${new_path}.exe"
25212    elif test -f "${new_path}.cmd"; then
25213       input_to_shortpath="${new_path}.cmd"
25214    else
25215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25216$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25219      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25220    fi
25221  else
25222    input_to_shortpath="$new_path"
25223  fi
25224
25225  # Call helper function which possibly converts this using DOS-style short mode.
25226  # If so, the updated path is stored in $new_path.
25227  new_path="$input_to_shortpath"
25228
25229  input_path="$input_to_shortpath"
25230  # Check if we need to convert this using DOS-style short mode. If the path
25231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25232  # take no chances and rewrite it.
25233  # Note: m4 eats our [], so we need to use [ and ] instead.
25234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25235  if test "x$has_forbidden_chars" != x; then
25236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25240      # Going to short mode and back again did indeed matter. Since short mode is
25241      # case insensitive, let's make it lowercase to improve readability.
25242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25243      # Now convert it back to Unix-stile (cygpath)
25244      input_path=`$CYGPATH -u "$shortmode_path"`
25245      new_path="$input_path"
25246    fi
25247  fi
25248
25249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25250  if test "x$test_cygdrive_prefix" = x; then
25251    # As a simple fix, exclude /usr/bin since it's not a real path.
25252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25254      # a path prefixed by /cygdrive for fixpath to work.
25255      new_path="$CYGWIN_ROOT_PATH$input_path"
25256    fi
25257  fi
25258
25259  # remove trailing .exe if any
25260  new_path="${new_path/%.exe/}"
25261
25262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25263
25264  # First separate the path from the arguments. This will split at the first
25265  # space.
25266  complete="$CXXCPP"
25267  path="${complete%% *}"
25268  tmp="$complete EOL"
25269  arguments="${tmp#* }"
25270
25271  # Input might be given as Windows format, start by converting to
25272  # unix format.
25273  new_path="$path"
25274
25275  windows_path="$new_path"
25276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277    unix_path=`$CYGPATH -u "$windows_path"`
25278    new_path="$unix_path"
25279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25281    new_path="$unix_path"
25282  fi
25283
25284
25285  # Now try to locate executable using which
25286  new_path=`$WHICH "$new_path" 2> /dev/null`
25287
25288  if test "x$new_path" = x; then
25289    # Oops. Which didn't find the executable.
25290    # The splitting of arguments from the executable at a space might have been incorrect,
25291    # since paths with space are more likely in Windows. Give it another try with the whole
25292    # argument.
25293    path="$complete"
25294    arguments="EOL"
25295    new_path="$path"
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306
25307    new_path=`$WHICH "$new_path" 2> /dev/null`
25308
25309    if test "x$new_path" = x; then
25310      # It's still not found. Now this is an unrecoverable error.
25311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25312$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25313      has_space=`$ECHO "$complete" | $GREP " "`
25314      if test "x$has_space" != x; then
25315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25317      fi
25318      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25319    fi
25320  fi
25321
25322  # Now new_path has a complete unix path to the binary
25323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25324    # Keep paths in /bin as-is, but remove trailing .exe if any
25325    new_path="${new_path/%.exe/}"
25326    # Do not save /bin paths to all_fixpath_prefixes!
25327  else
25328    # Not in mixed or Windows style, start by that.
25329    new_path=`cmd //c echo $new_path`
25330
25331  input_path="$new_path"
25332  # Check if we need to convert this using DOS-style short mode. If the path
25333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25334  # take no chances and rewrite it.
25335  # Note: m4 eats our [], so we need to use [ and ] instead.
25336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25337  if test "x$has_forbidden_chars" != x; then
25338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25340  fi
25341
25342    # Output is in $new_path
25343
25344  windows_path="$new_path"
25345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25346    unix_path=`$CYGPATH -u "$windows_path"`
25347    new_path="$unix_path"
25348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25350    new_path="$unix_path"
25351  fi
25352
25353    # remove trailing .exe if any
25354    new_path="${new_path/%.exe/}"
25355
25356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25358  fi
25359
25360  else
25361    # We're on a posix platform. Hooray! :)
25362    # First separate the path from the arguments. This will split at the first
25363    # space.
25364    complete="$CXXCPP"
25365    path="${complete%% *}"
25366    tmp="$complete EOL"
25367    arguments="${tmp#* }"
25368
25369    # Cannot rely on the command "which" here since it doesn't always work.
25370    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25371    if test -z "$is_absolute_path"; then
25372      # Path to executable is not absolute. Find it.
25373      IFS_save="$IFS"
25374      IFS=:
25375      for p in $PATH; do
25376        if test -f "$p/$path" && test -x "$p/$path"; then
25377          new_path="$p/$path"
25378          break
25379        fi
25380      done
25381      IFS="$IFS_save"
25382    else
25383      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25384$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25385      new_path="$path"
25386    fi
25387
25388    if test "x$new_path" = x; then
25389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25390$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25391        has_space=`$ECHO "$complete" | $GREP " "`
25392        if test "x$has_space" != x; then
25393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25395        fi
25396        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25397      fi
25398  fi
25399
25400      # Now join together the path and the arguments once again
25401      if test "x$arguments" != xEOL; then
25402        new_complete="$new_path ${arguments% *}"
25403      else
25404        new_complete="$new_path"
25405      fi
25406
25407  if test "x$complete" != "x$new_complete"; then
25408      CXXCPP="$new_complete"
25409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25410$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25411    fi
25412
25413
25414if test "x$COMPILE_TYPE" != "xcross"; then
25415    # If we are not cross compiling, use the same compilers for
25416    # building the build platform executables. The cross-compilation
25417    # case needed to be done earlier, but this can only be done after
25418    # the native tools have been localized.
25419    BUILD_CC="$CC"
25420    BUILD_CXX="$CXX"
25421    BUILD_LD="$LD"
25422fi
25423
25424# for solaris we really need solaris tools, and not gnu equivalent
25425#   these seems to normally reside in /usr/ccs/bin so add that to path before
25426#   starting to probe
25427#
25428#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25429#         so that it can be overriden --with-tools-dir
25430if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25431    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25432fi
25433
25434# Find the right assembler.
25435if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25436    # Extract the first word of "as", so it can be a program name with args.
25437set dummy as; ac_word=$2
25438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25439$as_echo_n "checking for $ac_word... " >&6; }
25440if test "${ac_cv_path_AS+set}" = set; then :
25441  $as_echo_n "(cached) " >&6
25442else
25443  case $AS in
25444  [\\/]* | ?:[\\/]*)
25445  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25446  ;;
25447  *)
25448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25449for as_dir in $PATH
25450do
25451  IFS=$as_save_IFS
25452  test -z "$as_dir" && as_dir=.
25453    for ac_exec_ext in '' $ac_executable_extensions; do
25454  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25455    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25457    break 2
25458  fi
25459done
25460  done
25461IFS=$as_save_IFS
25462
25463  ;;
25464esac
25465fi
25466AS=$ac_cv_path_AS
25467if test -n "$AS"; then
25468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25469$as_echo "$AS" >&6; }
25470else
25471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25472$as_echo "no" >&6; }
25473fi
25474
25475
25476
25477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25478
25479  # First separate the path from the arguments. This will split at the first
25480  # space.
25481  complete="$AS"
25482  path="${complete%% *}"
25483  tmp="$complete EOL"
25484  arguments="${tmp#* }"
25485
25486  # Input might be given as Windows format, start by converting to
25487  # unix format.
25488  new_path=`$CYGPATH -u "$path"`
25489
25490  # Now try to locate executable using which
25491  new_path=`$WHICH "$new_path" 2> /dev/null`
25492  # bat and cmd files are not always considered executable in cygwin causing which
25493  # to not find them
25494  if test "x$new_path" = x \
25495           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25496           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25497    new_path=`$CYGPATH -u "$path"`
25498  fi
25499  if test "x$new_path" = x; then
25500    # Oops. Which didn't find the executable.
25501    # The splitting of arguments from the executable at a space might have been incorrect,
25502    # since paths with space are more likely in Windows. Give it another try with the whole
25503    # argument.
25504    path="$complete"
25505    arguments="EOL"
25506    new_path=`$CYGPATH -u "$path"`
25507    new_path=`$WHICH "$new_path" 2> /dev/null`
25508    # bat and cmd files are not always considered executable in cygwin causing which
25509    # to not find them
25510    if test "x$new_path" = x \
25511             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25512             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25513      new_path=`$CYGPATH -u "$path"`
25514    fi
25515    if test "x$new_path" = x; then
25516      # It's still not found. Now this is an unrecoverable error.
25517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25518$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25519      has_space=`$ECHO "$complete" | $GREP " "`
25520      if test "x$has_space" != x; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25523      fi
25524      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25525    fi
25526  fi
25527
25528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25531  # "foo.exe" is OK but "foo" is an error.
25532  #
25533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25534  # It is also a way to make sure we got the proper file name for the real test later on.
25535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25536  if test "x$test_shortpath" = x; then
25537    # Short path failed, file does not exist as specified.
25538    # Try adding .exe or .cmd
25539    if test -f "${new_path}.exe"; then
25540       input_to_shortpath="${new_path}.exe"
25541    elif test -f "${new_path}.cmd"; then
25542       input_to_shortpath="${new_path}.cmd"
25543    else
25544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25545$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25548      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25549    fi
25550  else
25551    input_to_shortpath="$new_path"
25552  fi
25553
25554  # Call helper function which possibly converts this using DOS-style short mode.
25555  # If so, the updated path is stored in $new_path.
25556  new_path="$input_to_shortpath"
25557
25558  input_path="$input_to_shortpath"
25559  # Check if we need to convert this using DOS-style short mode. If the path
25560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25561  # take no chances and rewrite it.
25562  # Note: m4 eats our [], so we need to use [ and ] instead.
25563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25564  if test "x$has_forbidden_chars" != x; then
25565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25569      # Going to short mode and back again did indeed matter. Since short mode is
25570      # case insensitive, let's make it lowercase to improve readability.
25571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25572      # Now convert it back to Unix-stile (cygpath)
25573      input_path=`$CYGPATH -u "$shortmode_path"`
25574      new_path="$input_path"
25575    fi
25576  fi
25577
25578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25579  if test "x$test_cygdrive_prefix" = x; then
25580    # As a simple fix, exclude /usr/bin since it's not a real path.
25581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25583      # a path prefixed by /cygdrive for fixpath to work.
25584      new_path="$CYGWIN_ROOT_PATH$input_path"
25585    fi
25586  fi
25587
25588  # remove trailing .exe if any
25589  new_path="${new_path/%.exe/}"
25590
25591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25592
25593  # First separate the path from the arguments. This will split at the first
25594  # space.
25595  complete="$AS"
25596  path="${complete%% *}"
25597  tmp="$complete EOL"
25598  arguments="${tmp#* }"
25599
25600  # Input might be given as Windows format, start by converting to
25601  # unix format.
25602  new_path="$path"
25603
25604  windows_path="$new_path"
25605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25606    unix_path=`$CYGPATH -u "$windows_path"`
25607    new_path="$unix_path"
25608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25610    new_path="$unix_path"
25611  fi
25612
25613
25614  # Now try to locate executable using which
25615  new_path=`$WHICH "$new_path" 2> /dev/null`
25616
25617  if test "x$new_path" = x; then
25618    # Oops. Which didn't find the executable.
25619    # The splitting of arguments from the executable at a space might have been incorrect,
25620    # since paths with space are more likely in Windows. Give it another try with the whole
25621    # argument.
25622    path="$complete"
25623    arguments="EOL"
25624    new_path="$path"
25625
25626  windows_path="$new_path"
25627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628    unix_path=`$CYGPATH -u "$windows_path"`
25629    new_path="$unix_path"
25630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25632    new_path="$unix_path"
25633  fi
25634
25635
25636    new_path=`$WHICH "$new_path" 2> /dev/null`
25637
25638    if test "x$new_path" = x; then
25639      # It's still not found. Now this is an unrecoverable error.
25640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25641$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25642      has_space=`$ECHO "$complete" | $GREP " "`
25643      if test "x$has_space" != x; then
25644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25646      fi
25647      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25648    fi
25649  fi
25650
25651  # Now new_path has a complete unix path to the binary
25652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25653    # Keep paths in /bin as-is, but remove trailing .exe if any
25654    new_path="${new_path/%.exe/}"
25655    # Do not save /bin paths to all_fixpath_prefixes!
25656  else
25657    # Not in mixed or Windows style, start by that.
25658    new_path=`cmd //c echo $new_path`
25659
25660  input_path="$new_path"
25661  # Check if we need to convert this using DOS-style short mode. If the path
25662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25663  # take no chances and rewrite it.
25664  # Note: m4 eats our [], so we need to use [ and ] instead.
25665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25666  if test "x$has_forbidden_chars" != x; then
25667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25669  fi
25670
25671    # Output is in $new_path
25672
25673  windows_path="$new_path"
25674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25675    unix_path=`$CYGPATH -u "$windows_path"`
25676    new_path="$unix_path"
25677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25679    new_path="$unix_path"
25680  fi
25681
25682    # remove trailing .exe if any
25683    new_path="${new_path/%.exe/}"
25684
25685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25687  fi
25688
25689  else
25690    # We're on a posix platform. Hooray! :)
25691    # First separate the path from the arguments. This will split at the first
25692    # space.
25693    complete="$AS"
25694    path="${complete%% *}"
25695    tmp="$complete EOL"
25696    arguments="${tmp#* }"
25697
25698    # Cannot rely on the command "which" here since it doesn't always work.
25699    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25700    if test -z "$is_absolute_path"; then
25701      # Path to executable is not absolute. Find it.
25702      IFS_save="$IFS"
25703      IFS=:
25704      for p in $PATH; do
25705        if test -f "$p/$path" && test -x "$p/$path"; then
25706          new_path="$p/$path"
25707          break
25708        fi
25709      done
25710      IFS="$IFS_save"
25711    else
25712      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25713$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25714      new_path="$path"
25715    fi
25716
25717    if test "x$new_path" = x; then
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25719$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25720        has_space=`$ECHO "$complete" | $GREP " "`
25721        if test "x$has_space" != x; then
25722          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25724        fi
25725        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25726      fi
25727  fi
25728
25729      # Now join together the path and the arguments once again
25730      if test "x$arguments" != xEOL; then
25731        new_complete="$new_path ${arguments% *}"
25732      else
25733        new_complete="$new_path"
25734      fi
25735
25736  if test "x$complete" != "x$new_complete"; then
25737      AS="$new_complete"
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25739$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25740    fi
25741
25742else
25743    AS="$CC -c"
25744fi
25745
25746
25747if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25748    # Extract the first word of "nm", so it can be a program name with args.
25749set dummy nm; ac_word=$2
25750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25751$as_echo_n "checking for $ac_word... " >&6; }
25752if test "${ac_cv_path_NM+set}" = set; then :
25753  $as_echo_n "(cached) " >&6
25754else
25755  case $NM in
25756  [\\/]* | ?:[\\/]*)
25757  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25758  ;;
25759  *)
25760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25761for as_dir in $PATH
25762do
25763  IFS=$as_save_IFS
25764  test -z "$as_dir" && as_dir=.
25765    for ac_exec_ext in '' $ac_executable_extensions; do
25766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25767    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25769    break 2
25770  fi
25771done
25772  done
25773IFS=$as_save_IFS
25774
25775  ;;
25776esac
25777fi
25778NM=$ac_cv_path_NM
25779if test -n "$NM"; then
25780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25781$as_echo "$NM" >&6; }
25782else
25783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25784$as_echo "no" >&6; }
25785fi
25786
25787
25788
25789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790
25791  # First separate the path from the arguments. This will split at the first
25792  # space.
25793  complete="$NM"
25794  path="${complete%% *}"
25795  tmp="$complete EOL"
25796  arguments="${tmp#* }"
25797
25798  # Input might be given as Windows format, start by converting to
25799  # unix format.
25800  new_path=`$CYGPATH -u "$path"`
25801
25802  # Now try to locate executable using which
25803  new_path=`$WHICH "$new_path" 2> /dev/null`
25804  # bat and cmd files are not always considered executable in cygwin causing which
25805  # to not find them
25806  if test "x$new_path" = x \
25807           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25808           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25809    new_path=`$CYGPATH -u "$path"`
25810  fi
25811  if test "x$new_path" = x; then
25812    # Oops. Which didn't find the executable.
25813    # The splitting of arguments from the executable at a space might have been incorrect,
25814    # since paths with space are more likely in Windows. Give it another try with the whole
25815    # argument.
25816    path="$complete"
25817    arguments="EOL"
25818    new_path=`$CYGPATH -u "$path"`
25819    new_path=`$WHICH "$new_path" 2> /dev/null`
25820    # bat and cmd files are not always considered executable in cygwin causing which
25821    # to not find them
25822    if test "x$new_path" = x \
25823             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25824             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25825      new_path=`$CYGPATH -u "$path"`
25826    fi
25827    if test "x$new_path" = x; then
25828      # It's still not found. Now this is an unrecoverable error.
25829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25830$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25831      has_space=`$ECHO "$complete" | $GREP " "`
25832      if test "x$has_space" != x; then
25833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25835      fi
25836      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25837    fi
25838  fi
25839
25840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25843  # "foo.exe" is OK but "foo" is an error.
25844  #
25845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25846  # It is also a way to make sure we got the proper file name for the real test later on.
25847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25848  if test "x$test_shortpath" = x; then
25849    # Short path failed, file does not exist as specified.
25850    # Try adding .exe or .cmd
25851    if test -f "${new_path}.exe"; then
25852       input_to_shortpath="${new_path}.exe"
25853    elif test -f "${new_path}.cmd"; then
25854       input_to_shortpath="${new_path}.cmd"
25855    else
25856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25857$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25860      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25861    fi
25862  else
25863    input_to_shortpath="$new_path"
25864  fi
25865
25866  # Call helper function which possibly converts this using DOS-style short mode.
25867  # If so, the updated path is stored in $new_path.
25868  new_path="$input_to_shortpath"
25869
25870  input_path="$input_to_shortpath"
25871  # Check if we need to convert this using DOS-style short mode. If the path
25872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25873  # take no chances and rewrite it.
25874  # Note: m4 eats our [], so we need to use [ and ] instead.
25875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25876  if test "x$has_forbidden_chars" != x; then
25877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25881      # Going to short mode and back again did indeed matter. Since short mode is
25882      # case insensitive, let's make it lowercase to improve readability.
25883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25884      # Now convert it back to Unix-stile (cygpath)
25885      input_path=`$CYGPATH -u "$shortmode_path"`
25886      new_path="$input_path"
25887    fi
25888  fi
25889
25890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25891  if test "x$test_cygdrive_prefix" = x; then
25892    # As a simple fix, exclude /usr/bin since it's not a real path.
25893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25895      # a path prefixed by /cygdrive for fixpath to work.
25896      new_path="$CYGWIN_ROOT_PATH$input_path"
25897    fi
25898  fi
25899
25900  # remove trailing .exe if any
25901  new_path="${new_path/%.exe/}"
25902
25903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904
25905  # First separate the path from the arguments. This will split at the first
25906  # space.
25907  complete="$NM"
25908  path="${complete%% *}"
25909  tmp="$complete EOL"
25910  arguments="${tmp#* }"
25911
25912  # Input might be given as Windows format, start by converting to
25913  # unix format.
25914  new_path="$path"
25915
25916  windows_path="$new_path"
25917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25918    unix_path=`$CYGPATH -u "$windows_path"`
25919    new_path="$unix_path"
25920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25922    new_path="$unix_path"
25923  fi
25924
25925
25926  # Now try to locate executable using which
25927  new_path=`$WHICH "$new_path" 2> /dev/null`
25928
25929  if test "x$new_path" = x; then
25930    # Oops. Which didn't find the executable.
25931    # The splitting of arguments from the executable at a space might have been incorrect,
25932    # since paths with space are more likely in Windows. Give it another try with the whole
25933    # argument.
25934    path="$complete"
25935    arguments="EOL"
25936    new_path="$path"
25937
25938  windows_path="$new_path"
25939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25940    unix_path=`$CYGPATH -u "$windows_path"`
25941    new_path="$unix_path"
25942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25944    new_path="$unix_path"
25945  fi
25946
25947
25948    new_path=`$WHICH "$new_path" 2> /dev/null`
25949
25950    if test "x$new_path" = x; then
25951      # It's still not found. Now this is an unrecoverable error.
25952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25953$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25954      has_space=`$ECHO "$complete" | $GREP " "`
25955      if test "x$has_space" != x; then
25956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25958      fi
25959      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25960    fi
25961  fi
25962
25963  # Now new_path has a complete unix path to the binary
25964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25965    # Keep paths in /bin as-is, but remove trailing .exe if any
25966    new_path="${new_path/%.exe/}"
25967    # Do not save /bin paths to all_fixpath_prefixes!
25968  else
25969    # Not in mixed or Windows style, start by that.
25970    new_path=`cmd //c echo $new_path`
25971
25972  input_path="$new_path"
25973  # Check if we need to convert this using DOS-style short mode. If the path
25974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25975  # take no chances and rewrite it.
25976  # Note: m4 eats our [], so we need to use [ and ] instead.
25977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25978  if test "x$has_forbidden_chars" != x; then
25979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25981  fi
25982
25983    # Output is in $new_path
25984
25985  windows_path="$new_path"
25986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25987    unix_path=`$CYGPATH -u "$windows_path"`
25988    new_path="$unix_path"
25989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25991    new_path="$unix_path"
25992  fi
25993
25994    # remove trailing .exe if any
25995    new_path="${new_path/%.exe/}"
25996
25997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25999  fi
26000
26001  else
26002    # We're on a posix platform. Hooray! :)
26003    # First separate the path from the arguments. This will split at the first
26004    # space.
26005    complete="$NM"
26006    path="${complete%% *}"
26007    tmp="$complete EOL"
26008    arguments="${tmp#* }"
26009
26010    # Cannot rely on the command "which" here since it doesn't always work.
26011    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26012    if test -z "$is_absolute_path"; then
26013      # Path to executable is not absolute. Find it.
26014      IFS_save="$IFS"
26015      IFS=:
26016      for p in $PATH; do
26017        if test -f "$p/$path" && test -x "$p/$path"; then
26018          new_path="$p/$path"
26019          break
26020        fi
26021      done
26022      IFS="$IFS_save"
26023    else
26024      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26025$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26026      new_path="$path"
26027    fi
26028
26029    if test "x$new_path" = x; then
26030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26032        has_space=`$ECHO "$complete" | $GREP " "`
26033        if test "x$has_space" != x; then
26034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26036        fi
26037        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26038      fi
26039  fi
26040
26041      # Now join together the path and the arguments once again
26042      if test "x$arguments" != xEOL; then
26043        new_complete="$new_path ${arguments% *}"
26044      else
26045        new_complete="$new_path"
26046      fi
26047
26048  if test "x$complete" != "x$new_complete"; then
26049      NM="$new_complete"
26050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26051$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26052    fi
26053
26054    # Extract the first word of "gnm", so it can be a program name with args.
26055set dummy gnm; ac_word=$2
26056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26057$as_echo_n "checking for $ac_word... " >&6; }
26058if test "${ac_cv_path_GNM+set}" = set; then :
26059  $as_echo_n "(cached) " >&6
26060else
26061  case $GNM in
26062  [\\/]* | ?:[\\/]*)
26063  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26064  ;;
26065  *)
26066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26067for as_dir in $PATH
26068do
26069  IFS=$as_save_IFS
26070  test -z "$as_dir" && as_dir=.
26071    for ac_exec_ext in '' $ac_executable_extensions; do
26072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26073    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26075    break 2
26076  fi
26077done
26078  done
26079IFS=$as_save_IFS
26080
26081  ;;
26082esac
26083fi
26084GNM=$ac_cv_path_GNM
26085if test -n "$GNM"; then
26086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26087$as_echo "$GNM" >&6; }
26088else
26089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26090$as_echo "no" >&6; }
26091fi
26092
26093
26094
26095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26096
26097  # First separate the path from the arguments. This will split at the first
26098  # space.
26099  complete="$GNM"
26100  path="${complete%% *}"
26101  tmp="$complete EOL"
26102  arguments="${tmp#* }"
26103
26104  # Input might be given as Windows format, start by converting to
26105  # unix format.
26106  new_path=`$CYGPATH -u "$path"`
26107
26108  # Now try to locate executable using which
26109  new_path=`$WHICH "$new_path" 2> /dev/null`
26110  # bat and cmd files are not always considered executable in cygwin causing which
26111  # to not find them
26112  if test "x$new_path" = x \
26113           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26114           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26115    new_path=`$CYGPATH -u "$path"`
26116  fi
26117  if test "x$new_path" = x; then
26118    # Oops. Which didn't find the executable.
26119    # The splitting of arguments from the executable at a space might have been incorrect,
26120    # since paths with space are more likely in Windows. Give it another try with the whole
26121    # argument.
26122    path="$complete"
26123    arguments="EOL"
26124    new_path=`$CYGPATH -u "$path"`
26125    new_path=`$WHICH "$new_path" 2> /dev/null`
26126    # bat and cmd files are not always considered executable in cygwin causing which
26127    # to not find them
26128    if test "x$new_path" = x \
26129             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26130             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26131      new_path=`$CYGPATH -u "$path"`
26132    fi
26133    if test "x$new_path" = x; then
26134      # It's still not found. Now this is an unrecoverable error.
26135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26136$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26137      has_space=`$ECHO "$complete" | $GREP " "`
26138      if test "x$has_space" != x; then
26139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26141      fi
26142      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26143    fi
26144  fi
26145
26146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26149  # "foo.exe" is OK but "foo" is an error.
26150  #
26151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26152  # It is also a way to make sure we got the proper file name for the real test later on.
26153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26154  if test "x$test_shortpath" = x; then
26155    # Short path failed, file does not exist as specified.
26156    # Try adding .exe or .cmd
26157    if test -f "${new_path}.exe"; then
26158       input_to_shortpath="${new_path}.exe"
26159    elif test -f "${new_path}.cmd"; then
26160       input_to_shortpath="${new_path}.cmd"
26161    else
26162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26163$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26164      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26165$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26166      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26167    fi
26168  else
26169    input_to_shortpath="$new_path"
26170  fi
26171
26172  # Call helper function which possibly converts this using DOS-style short mode.
26173  # If so, the updated path is stored in $new_path.
26174  new_path="$input_to_shortpath"
26175
26176  input_path="$input_to_shortpath"
26177  # Check if we need to convert this using DOS-style short mode. If the path
26178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26179  # take no chances and rewrite it.
26180  # Note: m4 eats our [], so we need to use [ and ] instead.
26181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26182  if test "x$has_forbidden_chars" != x; then
26183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26187      # Going to short mode and back again did indeed matter. Since short mode is
26188      # case insensitive, let's make it lowercase to improve readability.
26189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190      # Now convert it back to Unix-stile (cygpath)
26191      input_path=`$CYGPATH -u "$shortmode_path"`
26192      new_path="$input_path"
26193    fi
26194  fi
26195
26196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26197  if test "x$test_cygdrive_prefix" = x; then
26198    # As a simple fix, exclude /usr/bin since it's not a real path.
26199    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26201      # a path prefixed by /cygdrive for fixpath to work.
26202      new_path="$CYGWIN_ROOT_PATH$input_path"
26203    fi
26204  fi
26205
26206  # remove trailing .exe if any
26207  new_path="${new_path/%.exe/}"
26208
26209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26210
26211  # First separate the path from the arguments. This will split at the first
26212  # space.
26213  complete="$GNM"
26214  path="${complete%% *}"
26215  tmp="$complete EOL"
26216  arguments="${tmp#* }"
26217
26218  # Input might be given as Windows format, start by converting to
26219  # unix format.
26220  new_path="$path"
26221
26222  windows_path="$new_path"
26223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26224    unix_path=`$CYGPATH -u "$windows_path"`
26225    new_path="$unix_path"
26226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26228    new_path="$unix_path"
26229  fi
26230
26231
26232  # Now try to locate executable using which
26233  new_path=`$WHICH "$new_path" 2> /dev/null`
26234
26235  if test "x$new_path" = x; then
26236    # Oops. Which didn't find the executable.
26237    # The splitting of arguments from the executable at a space might have been incorrect,
26238    # since paths with space are more likely in Windows. Give it another try with the whole
26239    # argument.
26240    path="$complete"
26241    arguments="EOL"
26242    new_path="$path"
26243
26244  windows_path="$new_path"
26245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26246    unix_path=`$CYGPATH -u "$windows_path"`
26247    new_path="$unix_path"
26248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26250    new_path="$unix_path"
26251  fi
26252
26253
26254    new_path=`$WHICH "$new_path" 2> /dev/null`
26255
26256    if test "x$new_path" = x; then
26257      # It's still not found. Now this is an unrecoverable error.
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26259$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26260      has_space=`$ECHO "$complete" | $GREP " "`
26261      if test "x$has_space" != x; then
26262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26264      fi
26265      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26266    fi
26267  fi
26268
26269  # Now new_path has a complete unix path to the binary
26270  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26271    # Keep paths in /bin as-is, but remove trailing .exe if any
26272    new_path="${new_path/%.exe/}"
26273    # Do not save /bin paths to all_fixpath_prefixes!
26274  else
26275    # Not in mixed or Windows style, start by that.
26276    new_path=`cmd //c echo $new_path`
26277
26278  input_path="$new_path"
26279  # Check if we need to convert this using DOS-style short mode. If the path
26280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26281  # take no chances and rewrite it.
26282  # Note: m4 eats our [], so we need to use [ and ] instead.
26283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26284  if test "x$has_forbidden_chars" != x; then
26285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26287  fi
26288
26289    # Output is in $new_path
26290
26291  windows_path="$new_path"
26292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26293    unix_path=`$CYGPATH -u "$windows_path"`
26294    new_path="$unix_path"
26295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26297    new_path="$unix_path"
26298  fi
26299
26300    # remove trailing .exe if any
26301    new_path="${new_path/%.exe/}"
26302
26303    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26304    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26305  fi
26306
26307  else
26308    # We're on a posix platform. Hooray! :)
26309    # First separate the path from the arguments. This will split at the first
26310    # space.
26311    complete="$GNM"
26312    path="${complete%% *}"
26313    tmp="$complete EOL"
26314    arguments="${tmp#* }"
26315
26316    # Cannot rely on the command "which" here since it doesn't always work.
26317    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26318    if test -z "$is_absolute_path"; then
26319      # Path to executable is not absolute. Find it.
26320      IFS_save="$IFS"
26321      IFS=:
26322      for p in $PATH; do
26323        if test -f "$p/$path" && test -x "$p/$path"; then
26324          new_path="$p/$path"
26325          break
26326        fi
26327      done
26328      IFS="$IFS_save"
26329    else
26330      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26331$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26332      new_path="$path"
26333    fi
26334
26335    if test "x$new_path" = x; then
26336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26337$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26338        has_space=`$ECHO "$complete" | $GREP " "`
26339        if test "x$has_space" != x; then
26340          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26341$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26342        fi
26343        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26344      fi
26345  fi
26346
26347      # Now join together the path and the arguments once again
26348      if test "x$arguments" != xEOL; then
26349        new_complete="$new_path ${arguments% *}"
26350      else
26351        new_complete="$new_path"
26352      fi
26353
26354  if test "x$complete" != "x$new_complete"; then
26355      GNM="$new_complete"
26356      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26357$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26358    fi
26359
26360    # Extract the first word of "strip", so it can be a program name with args.
26361set dummy strip; ac_word=$2
26362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26363$as_echo_n "checking for $ac_word... " >&6; }
26364if test "${ac_cv_path_STRIP+set}" = set; then :
26365  $as_echo_n "(cached) " >&6
26366else
26367  case $STRIP in
26368  [\\/]* | ?:[\\/]*)
26369  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26370  ;;
26371  *)
26372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26373for as_dir in $PATH
26374do
26375  IFS=$as_save_IFS
26376  test -z "$as_dir" && as_dir=.
26377    for ac_exec_ext in '' $ac_executable_extensions; do
26378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26379    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26381    break 2
26382  fi
26383done
26384  done
26385IFS=$as_save_IFS
26386
26387  ;;
26388esac
26389fi
26390STRIP=$ac_cv_path_STRIP
26391if test -n "$STRIP"; then
26392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26393$as_echo "$STRIP" >&6; }
26394else
26395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26396$as_echo "no" >&6; }
26397fi
26398
26399
26400
26401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26402
26403  # First separate the path from the arguments. This will split at the first
26404  # space.
26405  complete="$STRIP"
26406  path="${complete%% *}"
26407  tmp="$complete EOL"
26408  arguments="${tmp#* }"
26409
26410  # Input might be given as Windows format, start by converting to
26411  # unix format.
26412  new_path=`$CYGPATH -u "$path"`
26413
26414  # Now try to locate executable using which
26415  new_path=`$WHICH "$new_path" 2> /dev/null`
26416  # bat and cmd files are not always considered executable in cygwin causing which
26417  # to not find them
26418  if test "x$new_path" = x \
26419           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26420           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26421    new_path=`$CYGPATH -u "$path"`
26422  fi
26423  if test "x$new_path" = x; then
26424    # Oops. Which didn't find the executable.
26425    # The splitting of arguments from the executable at a space might have been incorrect,
26426    # since paths with space are more likely in Windows. Give it another try with the whole
26427    # argument.
26428    path="$complete"
26429    arguments="EOL"
26430    new_path=`$CYGPATH -u "$path"`
26431    new_path=`$WHICH "$new_path" 2> /dev/null`
26432    # bat and cmd files are not always considered executable in cygwin causing which
26433    # to not find them
26434    if test "x$new_path" = x \
26435             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26436             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26437      new_path=`$CYGPATH -u "$path"`
26438    fi
26439    if test "x$new_path" = x; then
26440      # It's still not found. Now this is an unrecoverable error.
26441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26442$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26443      has_space=`$ECHO "$complete" | $GREP " "`
26444      if test "x$has_space" != x; then
26445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26447      fi
26448      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26449    fi
26450  fi
26451
26452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26455  # "foo.exe" is OK but "foo" is an error.
26456  #
26457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26458  # It is also a way to make sure we got the proper file name for the real test later on.
26459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26460  if test "x$test_shortpath" = x; then
26461    # Short path failed, file does not exist as specified.
26462    # Try adding .exe or .cmd
26463    if test -f "${new_path}.exe"; then
26464       input_to_shortpath="${new_path}.exe"
26465    elif test -f "${new_path}.cmd"; then
26466       input_to_shortpath="${new_path}.cmd"
26467    else
26468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26469$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26472      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26473    fi
26474  else
26475    input_to_shortpath="$new_path"
26476  fi
26477
26478  # Call helper function which possibly converts this using DOS-style short mode.
26479  # If so, the updated path is stored in $new_path.
26480  new_path="$input_to_shortpath"
26481
26482  input_path="$input_to_shortpath"
26483  # Check if we need to convert this using DOS-style short mode. If the path
26484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26485  # take no chances and rewrite it.
26486  # Note: m4 eats our [], so we need to use [ and ] instead.
26487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26488  if test "x$has_forbidden_chars" != x; then
26489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26493      # Going to short mode and back again did indeed matter. Since short mode is
26494      # case insensitive, let's make it lowercase to improve readability.
26495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26496      # Now convert it back to Unix-stile (cygpath)
26497      input_path=`$CYGPATH -u "$shortmode_path"`
26498      new_path="$input_path"
26499    fi
26500  fi
26501
26502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26503  if test "x$test_cygdrive_prefix" = x; then
26504    # As a simple fix, exclude /usr/bin since it's not a real path.
26505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26507      # a path prefixed by /cygdrive for fixpath to work.
26508      new_path="$CYGWIN_ROOT_PATH$input_path"
26509    fi
26510  fi
26511
26512  # remove trailing .exe if any
26513  new_path="${new_path/%.exe/}"
26514
26515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26516
26517  # First separate the path from the arguments. This will split at the first
26518  # space.
26519  complete="$STRIP"
26520  path="${complete%% *}"
26521  tmp="$complete EOL"
26522  arguments="${tmp#* }"
26523
26524  # Input might be given as Windows format, start by converting to
26525  # unix format.
26526  new_path="$path"
26527
26528  windows_path="$new_path"
26529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26530    unix_path=`$CYGPATH -u "$windows_path"`
26531    new_path="$unix_path"
26532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26534    new_path="$unix_path"
26535  fi
26536
26537
26538  # Now try to locate executable using which
26539  new_path=`$WHICH "$new_path" 2> /dev/null`
26540
26541  if test "x$new_path" = x; then
26542    # Oops. Which didn't find the executable.
26543    # The splitting of arguments from the executable at a space might have been incorrect,
26544    # since paths with space are more likely in Windows. Give it another try with the whole
26545    # argument.
26546    path="$complete"
26547    arguments="EOL"
26548    new_path="$path"
26549
26550  windows_path="$new_path"
26551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552    unix_path=`$CYGPATH -u "$windows_path"`
26553    new_path="$unix_path"
26554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26556    new_path="$unix_path"
26557  fi
26558
26559
26560    new_path=`$WHICH "$new_path" 2> /dev/null`
26561
26562    if test "x$new_path" = x; then
26563      # It's still not found. Now this is an unrecoverable error.
26564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26565$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26566      has_space=`$ECHO "$complete" | $GREP " "`
26567      if test "x$has_space" != x; then
26568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26570      fi
26571      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26572    fi
26573  fi
26574
26575  # Now new_path has a complete unix path to the binary
26576  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26577    # Keep paths in /bin as-is, but remove trailing .exe if any
26578    new_path="${new_path/%.exe/}"
26579    # Do not save /bin paths to all_fixpath_prefixes!
26580  else
26581    # Not in mixed or Windows style, start by that.
26582    new_path=`cmd //c echo $new_path`
26583
26584  input_path="$new_path"
26585  # Check if we need to convert this using DOS-style short mode. If the path
26586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26587  # take no chances and rewrite it.
26588  # Note: m4 eats our [], so we need to use [ and ] instead.
26589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26590  if test "x$has_forbidden_chars" != x; then
26591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26593  fi
26594
26595    # Output is in $new_path
26596
26597  windows_path="$new_path"
26598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26599    unix_path=`$CYGPATH -u "$windows_path"`
26600    new_path="$unix_path"
26601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26603    new_path="$unix_path"
26604  fi
26605
26606    # remove trailing .exe if any
26607    new_path="${new_path/%.exe/}"
26608
26609    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26610    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26611  fi
26612
26613  else
26614    # We're on a posix platform. Hooray! :)
26615    # First separate the path from the arguments. This will split at the first
26616    # space.
26617    complete="$STRIP"
26618    path="${complete%% *}"
26619    tmp="$complete EOL"
26620    arguments="${tmp#* }"
26621
26622    # Cannot rely on the command "which" here since it doesn't always work.
26623    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26624    if test -z "$is_absolute_path"; then
26625      # Path to executable is not absolute. Find it.
26626      IFS_save="$IFS"
26627      IFS=:
26628      for p in $PATH; do
26629        if test -f "$p/$path" && test -x "$p/$path"; then
26630          new_path="$p/$path"
26631          break
26632        fi
26633      done
26634      IFS="$IFS_save"
26635    else
26636      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26637$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26638      new_path="$path"
26639    fi
26640
26641    if test "x$new_path" = x; then
26642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26643$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26644        has_space=`$ECHO "$complete" | $GREP " "`
26645        if test "x$has_space" != x; then
26646          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26647$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26648        fi
26649        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26650      fi
26651  fi
26652
26653      # Now join together the path and the arguments once again
26654      if test "x$arguments" != xEOL; then
26655        new_complete="$new_path ${arguments% *}"
26656      else
26657        new_complete="$new_path"
26658      fi
26659
26660  if test "x$complete" != "x$new_complete"; then
26661      STRIP="$new_complete"
26662      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26663$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26664    fi
26665
26666    # Extract the first word of "mcs", so it can be a program name with args.
26667set dummy mcs; ac_word=$2
26668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26669$as_echo_n "checking for $ac_word... " >&6; }
26670if test "${ac_cv_path_MCS+set}" = set; then :
26671  $as_echo_n "(cached) " >&6
26672else
26673  case $MCS in
26674  [\\/]* | ?:[\\/]*)
26675  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26676  ;;
26677  *)
26678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26679for as_dir in $PATH
26680do
26681  IFS=$as_save_IFS
26682  test -z "$as_dir" && as_dir=.
26683    for ac_exec_ext in '' $ac_executable_extensions; do
26684  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26685    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26687    break 2
26688  fi
26689done
26690  done
26691IFS=$as_save_IFS
26692
26693  ;;
26694esac
26695fi
26696MCS=$ac_cv_path_MCS
26697if test -n "$MCS"; then
26698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26699$as_echo "$MCS" >&6; }
26700else
26701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26702$as_echo "no" >&6; }
26703fi
26704
26705
26706
26707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26708
26709  # First separate the path from the arguments. This will split at the first
26710  # space.
26711  complete="$MCS"
26712  path="${complete%% *}"
26713  tmp="$complete EOL"
26714  arguments="${tmp#* }"
26715
26716  # Input might be given as Windows format, start by converting to
26717  # unix format.
26718  new_path=`$CYGPATH -u "$path"`
26719
26720  # Now try to locate executable using which
26721  new_path=`$WHICH "$new_path" 2> /dev/null`
26722  # bat and cmd files are not always considered executable in cygwin causing which
26723  # to not find them
26724  if test "x$new_path" = x \
26725           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26726           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26727    new_path=`$CYGPATH -u "$path"`
26728  fi
26729  if test "x$new_path" = x; then
26730    # Oops. Which didn't find the executable.
26731    # The splitting of arguments from the executable at a space might have been incorrect,
26732    # since paths with space are more likely in Windows. Give it another try with the whole
26733    # argument.
26734    path="$complete"
26735    arguments="EOL"
26736    new_path=`$CYGPATH -u "$path"`
26737    new_path=`$WHICH "$new_path" 2> /dev/null`
26738    # bat and cmd files are not always considered executable in cygwin causing which
26739    # to not find them
26740    if test "x$new_path" = x \
26741             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26742             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26743      new_path=`$CYGPATH -u "$path"`
26744    fi
26745    if test "x$new_path" = x; then
26746      # It's still not found. Now this is an unrecoverable error.
26747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26748$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26749      has_space=`$ECHO "$complete" | $GREP " "`
26750      if test "x$has_space" != x; then
26751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26753      fi
26754      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26755    fi
26756  fi
26757
26758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26761  # "foo.exe" is OK but "foo" is an error.
26762  #
26763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26764  # It is also a way to make sure we got the proper file name for the real test later on.
26765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26766  if test "x$test_shortpath" = x; then
26767    # Short path failed, file does not exist as specified.
26768    # Try adding .exe or .cmd
26769    if test -f "${new_path}.exe"; then
26770       input_to_shortpath="${new_path}.exe"
26771    elif test -f "${new_path}.cmd"; then
26772       input_to_shortpath="${new_path}.cmd"
26773    else
26774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26775$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26778      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26779    fi
26780  else
26781    input_to_shortpath="$new_path"
26782  fi
26783
26784  # Call helper function which possibly converts this using DOS-style short mode.
26785  # If so, the updated path is stored in $new_path.
26786  new_path="$input_to_shortpath"
26787
26788  input_path="$input_to_shortpath"
26789  # Check if we need to convert this using DOS-style short mode. If the path
26790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26791  # take no chances and rewrite it.
26792  # Note: m4 eats our [], so we need to use [ and ] instead.
26793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26794  if test "x$has_forbidden_chars" != x; then
26795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26799      # Going to short mode and back again did indeed matter. Since short mode is
26800      # case insensitive, let's make it lowercase to improve readability.
26801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26802      # Now convert it back to Unix-stile (cygpath)
26803      input_path=`$CYGPATH -u "$shortmode_path"`
26804      new_path="$input_path"
26805    fi
26806  fi
26807
26808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26809  if test "x$test_cygdrive_prefix" = x; then
26810    # As a simple fix, exclude /usr/bin since it's not a real path.
26811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26813      # a path prefixed by /cygdrive for fixpath to work.
26814      new_path="$CYGWIN_ROOT_PATH$input_path"
26815    fi
26816  fi
26817
26818  # remove trailing .exe if any
26819  new_path="${new_path/%.exe/}"
26820
26821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822
26823  # First separate the path from the arguments. This will split at the first
26824  # space.
26825  complete="$MCS"
26826  path="${complete%% *}"
26827  tmp="$complete EOL"
26828  arguments="${tmp#* }"
26829
26830  # Input might be given as Windows format, start by converting to
26831  # unix format.
26832  new_path="$path"
26833
26834  windows_path="$new_path"
26835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26836    unix_path=`$CYGPATH -u "$windows_path"`
26837    new_path="$unix_path"
26838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26840    new_path="$unix_path"
26841  fi
26842
26843
26844  # Now try to locate executable using which
26845  new_path=`$WHICH "$new_path" 2> /dev/null`
26846
26847  if test "x$new_path" = x; then
26848    # Oops. Which didn't find the executable.
26849    # The splitting of arguments from the executable at a space might have been incorrect,
26850    # since paths with space are more likely in Windows. Give it another try with the whole
26851    # argument.
26852    path="$complete"
26853    arguments="EOL"
26854    new_path="$path"
26855
26856  windows_path="$new_path"
26857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26858    unix_path=`$CYGPATH -u "$windows_path"`
26859    new_path="$unix_path"
26860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26862    new_path="$unix_path"
26863  fi
26864
26865
26866    new_path=`$WHICH "$new_path" 2> /dev/null`
26867
26868    if test "x$new_path" = x; then
26869      # It's still not found. Now this is an unrecoverable error.
26870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26871$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26872      has_space=`$ECHO "$complete" | $GREP " "`
26873      if test "x$has_space" != x; then
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26876      fi
26877      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26878    fi
26879  fi
26880
26881  # Now new_path has a complete unix path to the binary
26882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26883    # Keep paths in /bin as-is, but remove trailing .exe if any
26884    new_path="${new_path/%.exe/}"
26885    # Do not save /bin paths to all_fixpath_prefixes!
26886  else
26887    # Not in mixed or Windows style, start by that.
26888    new_path=`cmd //c echo $new_path`
26889
26890  input_path="$new_path"
26891  # Check if we need to convert this using DOS-style short mode. If the path
26892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26893  # take no chances and rewrite it.
26894  # Note: m4 eats our [], so we need to use [ and ] instead.
26895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26896  if test "x$has_forbidden_chars" != x; then
26897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26899  fi
26900
26901    # Output is in $new_path
26902
26903  windows_path="$new_path"
26904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905    unix_path=`$CYGPATH -u "$windows_path"`
26906    new_path="$unix_path"
26907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26909    new_path="$unix_path"
26910  fi
26911
26912    # remove trailing .exe if any
26913    new_path="${new_path/%.exe/}"
26914
26915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26917  fi
26918
26919  else
26920    # We're on a posix platform. Hooray! :)
26921    # First separate the path from the arguments. This will split at the first
26922    # space.
26923    complete="$MCS"
26924    path="${complete%% *}"
26925    tmp="$complete EOL"
26926    arguments="${tmp#* }"
26927
26928    # Cannot rely on the command "which" here since it doesn't always work.
26929    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26930    if test -z "$is_absolute_path"; then
26931      # Path to executable is not absolute. Find it.
26932      IFS_save="$IFS"
26933      IFS=:
26934      for p in $PATH; do
26935        if test -f "$p/$path" && test -x "$p/$path"; then
26936          new_path="$p/$path"
26937          break
26938        fi
26939      done
26940      IFS="$IFS_save"
26941    else
26942      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26943$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26944      new_path="$path"
26945    fi
26946
26947    if test "x$new_path" = x; then
26948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26949$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26950        has_space=`$ECHO "$complete" | $GREP " "`
26951        if test "x$has_space" != x; then
26952          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26954        fi
26955        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26956      fi
26957  fi
26958
26959      # Now join together the path and the arguments once again
26960      if test "x$arguments" != xEOL; then
26961        new_complete="$new_path ${arguments% *}"
26962      else
26963        new_complete="$new_path"
26964      fi
26965
26966  if test "x$complete" != "x$new_complete"; then
26967      MCS="$new_complete"
26968      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26969$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26970    fi
26971
26972elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26973    if test -n "$ac_tool_prefix"; then
26974  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26975set dummy ${ac_tool_prefix}nm; ac_word=$2
26976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26977$as_echo_n "checking for $ac_word... " >&6; }
26978if test "${ac_cv_prog_NM+set}" = set; then :
26979  $as_echo_n "(cached) " >&6
26980else
26981  if test -n "$NM"; then
26982  ac_cv_prog_NM="$NM" # Let the user override the test.
26983else
26984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26985for as_dir in $PATH
26986do
26987  IFS=$as_save_IFS
26988  test -z "$as_dir" && as_dir=.
26989    for ac_exec_ext in '' $ac_executable_extensions; do
26990  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26991    ac_cv_prog_NM="${ac_tool_prefix}nm"
26992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26993    break 2
26994  fi
26995done
26996  done
26997IFS=$as_save_IFS
26998
26999fi
27000fi
27001NM=$ac_cv_prog_NM
27002if test -n "$NM"; then
27003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27004$as_echo "$NM" >&6; }
27005else
27006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27007$as_echo "no" >&6; }
27008fi
27009
27010
27011fi
27012if test -z "$ac_cv_prog_NM"; then
27013  ac_ct_NM=$NM
27014  # Extract the first word of "nm", so it can be a program name with args.
27015set dummy nm; ac_word=$2
27016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27017$as_echo_n "checking for $ac_word... " >&6; }
27018if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
27019  $as_echo_n "(cached) " >&6
27020else
27021  if test -n "$ac_ct_NM"; then
27022  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27023else
27024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27025for as_dir in $PATH
27026do
27027  IFS=$as_save_IFS
27028  test -z "$as_dir" && as_dir=.
27029    for ac_exec_ext in '' $ac_executable_extensions; do
27030  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27031    ac_cv_prog_ac_ct_NM="nm"
27032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27033    break 2
27034  fi
27035done
27036  done
27037IFS=$as_save_IFS
27038
27039fi
27040fi
27041ac_ct_NM=$ac_cv_prog_ac_ct_NM
27042if test -n "$ac_ct_NM"; then
27043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27044$as_echo "$ac_ct_NM" >&6; }
27045else
27046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27047$as_echo "no" >&6; }
27048fi
27049
27050  if test "x$ac_ct_NM" = x; then
27051    NM=""
27052  else
27053    case $cross_compiling:$ac_tool_warned in
27054yes:)
27055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27057ac_tool_warned=yes ;;
27058esac
27059    NM=$ac_ct_NM
27060  fi
27061else
27062  NM="$ac_cv_prog_NM"
27063fi
27064
27065
27066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27067
27068  # First separate the path from the arguments. This will split at the first
27069  # space.
27070  complete="$NM"
27071  path="${complete%% *}"
27072  tmp="$complete EOL"
27073  arguments="${tmp#* }"
27074
27075  # Input might be given as Windows format, start by converting to
27076  # unix format.
27077  new_path=`$CYGPATH -u "$path"`
27078
27079  # Now try to locate executable using which
27080  new_path=`$WHICH "$new_path" 2> /dev/null`
27081  # bat and cmd files are not always considered executable in cygwin causing which
27082  # to not find them
27083  if test "x$new_path" = x \
27084           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27085           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27086    new_path=`$CYGPATH -u "$path"`
27087  fi
27088  if test "x$new_path" = x; then
27089    # Oops. Which didn't find the executable.
27090    # The splitting of arguments from the executable at a space might have been incorrect,
27091    # since paths with space are more likely in Windows. Give it another try with the whole
27092    # argument.
27093    path="$complete"
27094    arguments="EOL"
27095    new_path=`$CYGPATH -u "$path"`
27096    new_path=`$WHICH "$new_path" 2> /dev/null`
27097    # bat and cmd files are not always considered executable in cygwin causing which
27098    # to not find them
27099    if test "x$new_path" = x \
27100             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27101             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27102      new_path=`$CYGPATH -u "$path"`
27103    fi
27104    if test "x$new_path" = x; then
27105      # It's still not found. Now this is an unrecoverable error.
27106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27107$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27108      has_space=`$ECHO "$complete" | $GREP " "`
27109      if test "x$has_space" != x; then
27110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27112      fi
27113      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27114    fi
27115  fi
27116
27117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27120  # "foo.exe" is OK but "foo" is an error.
27121  #
27122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27123  # It is also a way to make sure we got the proper file name for the real test later on.
27124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27125  if test "x$test_shortpath" = x; then
27126    # Short path failed, file does not exist as specified.
27127    # Try adding .exe or .cmd
27128    if test -f "${new_path}.exe"; then
27129       input_to_shortpath="${new_path}.exe"
27130    elif test -f "${new_path}.cmd"; then
27131       input_to_shortpath="${new_path}.cmd"
27132    else
27133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27134$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27137      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27138    fi
27139  else
27140    input_to_shortpath="$new_path"
27141  fi
27142
27143  # Call helper function which possibly converts this using DOS-style short mode.
27144  # If so, the updated path is stored in $new_path.
27145  new_path="$input_to_shortpath"
27146
27147  input_path="$input_to_shortpath"
27148  # Check if we need to convert this using DOS-style short mode. If the path
27149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27150  # take no chances and rewrite it.
27151  # Note: m4 eats our [], so we need to use [ and ] instead.
27152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27153  if test "x$has_forbidden_chars" != x; then
27154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27158      # Going to short mode and back again did indeed matter. Since short mode is
27159      # case insensitive, let's make it lowercase to improve readability.
27160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27161      # Now convert it back to Unix-stile (cygpath)
27162      input_path=`$CYGPATH -u "$shortmode_path"`
27163      new_path="$input_path"
27164    fi
27165  fi
27166
27167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27168  if test "x$test_cygdrive_prefix" = x; then
27169    # As a simple fix, exclude /usr/bin since it's not a real path.
27170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27172      # a path prefixed by /cygdrive for fixpath to work.
27173      new_path="$CYGWIN_ROOT_PATH$input_path"
27174    fi
27175  fi
27176
27177  # remove trailing .exe if any
27178  new_path="${new_path/%.exe/}"
27179
27180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27181
27182  # First separate the path from the arguments. This will split at the first
27183  # space.
27184  complete="$NM"
27185  path="${complete%% *}"
27186  tmp="$complete EOL"
27187  arguments="${tmp#* }"
27188
27189  # Input might be given as Windows format, start by converting to
27190  # unix format.
27191  new_path="$path"
27192
27193  windows_path="$new_path"
27194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27195    unix_path=`$CYGPATH -u "$windows_path"`
27196    new_path="$unix_path"
27197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27199    new_path="$unix_path"
27200  fi
27201
27202
27203  # Now try to locate executable using which
27204  new_path=`$WHICH "$new_path" 2> /dev/null`
27205
27206  if test "x$new_path" = x; then
27207    # Oops. Which didn't find the executable.
27208    # The splitting of arguments from the executable at a space might have been incorrect,
27209    # since paths with space are more likely in Windows. Give it another try with the whole
27210    # argument.
27211    path="$complete"
27212    arguments="EOL"
27213    new_path="$path"
27214
27215  windows_path="$new_path"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    unix_path=`$CYGPATH -u "$windows_path"`
27218    new_path="$unix_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27221    new_path="$unix_path"
27222  fi
27223
27224
27225    new_path=`$WHICH "$new_path" 2> /dev/null`
27226
27227    if test "x$new_path" = x; then
27228      # It's still not found. Now this is an unrecoverable error.
27229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27230$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27231      has_space=`$ECHO "$complete" | $GREP " "`
27232      if test "x$has_space" != x; then
27233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27235      fi
27236      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27237    fi
27238  fi
27239
27240  # Now new_path has a complete unix path to the binary
27241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27242    # Keep paths in /bin as-is, but remove trailing .exe if any
27243    new_path="${new_path/%.exe/}"
27244    # Do not save /bin paths to all_fixpath_prefixes!
27245  else
27246    # Not in mixed or Windows style, start by that.
27247    new_path=`cmd //c echo $new_path`
27248
27249  input_path="$new_path"
27250  # Check if we need to convert this using DOS-style short mode. If the path
27251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27252  # take no chances and rewrite it.
27253  # Note: m4 eats our [], so we need to use [ and ] instead.
27254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27255  if test "x$has_forbidden_chars" != x; then
27256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27258  fi
27259
27260    # Output is in $new_path
27261
27262  windows_path="$new_path"
27263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27264    unix_path=`$CYGPATH -u "$windows_path"`
27265    new_path="$unix_path"
27266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27268    new_path="$unix_path"
27269  fi
27270
27271    # remove trailing .exe if any
27272    new_path="${new_path/%.exe/}"
27273
27274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27276  fi
27277
27278  else
27279    # We're on a posix platform. Hooray! :)
27280    # First separate the path from the arguments. This will split at the first
27281    # space.
27282    complete="$NM"
27283    path="${complete%% *}"
27284    tmp="$complete EOL"
27285    arguments="${tmp#* }"
27286
27287    # Cannot rely on the command "which" here since it doesn't always work.
27288    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27289    if test -z "$is_absolute_path"; then
27290      # Path to executable is not absolute. Find it.
27291      IFS_save="$IFS"
27292      IFS=:
27293      for p in $PATH; do
27294        if test -f "$p/$path" && test -x "$p/$path"; then
27295          new_path="$p/$path"
27296          break
27297        fi
27298      done
27299      IFS="$IFS_save"
27300    else
27301      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27302$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27303      new_path="$path"
27304    fi
27305
27306    if test "x$new_path" = x; then
27307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27308$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27309        has_space=`$ECHO "$complete" | $GREP " "`
27310        if test "x$has_space" != x; then
27311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27313        fi
27314        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27315      fi
27316  fi
27317
27318      # Now join together the path and the arguments once again
27319      if test "x$arguments" != xEOL; then
27320        new_complete="$new_path ${arguments% *}"
27321      else
27322        new_complete="$new_path"
27323      fi
27324
27325  if test "x$complete" != "x$new_complete"; then
27326      NM="$new_complete"
27327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27328$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27329    fi
27330
27331    GNM="$NM"
27332
27333    if test -n "$ac_tool_prefix"; then
27334  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27335set dummy ${ac_tool_prefix}strip; ac_word=$2
27336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27337$as_echo_n "checking for $ac_word... " >&6; }
27338if test "${ac_cv_prog_STRIP+set}" = set; then :
27339  $as_echo_n "(cached) " >&6
27340else
27341  if test -n "$STRIP"; then
27342  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27343else
27344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27345for as_dir in $PATH
27346do
27347  IFS=$as_save_IFS
27348  test -z "$as_dir" && as_dir=.
27349    for ac_exec_ext in '' $ac_executable_extensions; do
27350  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27351    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27353    break 2
27354  fi
27355done
27356  done
27357IFS=$as_save_IFS
27358
27359fi
27360fi
27361STRIP=$ac_cv_prog_STRIP
27362if test -n "$STRIP"; then
27363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27364$as_echo "$STRIP" >&6; }
27365else
27366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27367$as_echo "no" >&6; }
27368fi
27369
27370
27371fi
27372if test -z "$ac_cv_prog_STRIP"; then
27373  ac_ct_STRIP=$STRIP
27374  # Extract the first word of "strip", so it can be a program name with args.
27375set dummy strip; ac_word=$2
27376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27377$as_echo_n "checking for $ac_word... " >&6; }
27378if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27379  $as_echo_n "(cached) " >&6
27380else
27381  if test -n "$ac_ct_STRIP"; then
27382  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27383else
27384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27385for as_dir in $PATH
27386do
27387  IFS=$as_save_IFS
27388  test -z "$as_dir" && as_dir=.
27389    for ac_exec_ext in '' $ac_executable_extensions; do
27390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27391    ac_cv_prog_ac_ct_STRIP="strip"
27392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27393    break 2
27394  fi
27395done
27396  done
27397IFS=$as_save_IFS
27398
27399fi
27400fi
27401ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27402if test -n "$ac_ct_STRIP"; then
27403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27404$as_echo "$ac_ct_STRIP" >&6; }
27405else
27406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27407$as_echo "no" >&6; }
27408fi
27409
27410  if test "x$ac_ct_STRIP" = x; then
27411    STRIP=""
27412  else
27413    case $cross_compiling:$ac_tool_warned in
27414yes:)
27415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27417ac_tool_warned=yes ;;
27418esac
27419    STRIP=$ac_ct_STRIP
27420  fi
27421else
27422  STRIP="$ac_cv_prog_STRIP"
27423fi
27424
27425
27426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27427
27428  # First separate the path from the arguments. This will split at the first
27429  # space.
27430  complete="$STRIP"
27431  path="${complete%% *}"
27432  tmp="$complete EOL"
27433  arguments="${tmp#* }"
27434
27435  # Input might be given as Windows format, start by converting to
27436  # unix format.
27437  new_path=`$CYGPATH -u "$path"`
27438
27439  # Now try to locate executable using which
27440  new_path=`$WHICH "$new_path" 2> /dev/null`
27441  # bat and cmd files are not always considered executable in cygwin causing which
27442  # to not find them
27443  if test "x$new_path" = x \
27444           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27445           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27446    new_path=`$CYGPATH -u "$path"`
27447  fi
27448  if test "x$new_path" = x; then
27449    # Oops. Which didn't find the executable.
27450    # The splitting of arguments from the executable at a space might have been incorrect,
27451    # since paths with space are more likely in Windows. Give it another try with the whole
27452    # argument.
27453    path="$complete"
27454    arguments="EOL"
27455    new_path=`$CYGPATH -u "$path"`
27456    new_path=`$WHICH "$new_path" 2> /dev/null`
27457    # bat and cmd files are not always considered executable in cygwin causing which
27458    # to not find them
27459    if test "x$new_path" = x \
27460             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27461             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27462      new_path=`$CYGPATH -u "$path"`
27463    fi
27464    if test "x$new_path" = x; then
27465      # It's still not found. Now this is an unrecoverable error.
27466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27467$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27468      has_space=`$ECHO "$complete" | $GREP " "`
27469      if test "x$has_space" != x; then
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27472      fi
27473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27474    fi
27475  fi
27476
27477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27480  # "foo.exe" is OK but "foo" is an error.
27481  #
27482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27483  # It is also a way to make sure we got the proper file name for the real test later on.
27484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27485  if test "x$test_shortpath" = x; then
27486    # Short path failed, file does not exist as specified.
27487    # Try adding .exe or .cmd
27488    if test -f "${new_path}.exe"; then
27489       input_to_shortpath="${new_path}.exe"
27490    elif test -f "${new_path}.cmd"; then
27491       input_to_shortpath="${new_path}.cmd"
27492    else
27493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27494$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27495      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27496$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27497      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27498    fi
27499  else
27500    input_to_shortpath="$new_path"
27501  fi
27502
27503  # Call helper function which possibly converts this using DOS-style short mode.
27504  # If so, the updated path is stored in $new_path.
27505  new_path="$input_to_shortpath"
27506
27507  input_path="$input_to_shortpath"
27508  # Check if we need to convert this using DOS-style short mode. If the path
27509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27510  # take no chances and rewrite it.
27511  # Note: m4 eats our [], so we need to use [ and ] instead.
27512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27513  if test "x$has_forbidden_chars" != x; then
27514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27518      # Going to short mode and back again did indeed matter. Since short mode is
27519      # case insensitive, let's make it lowercase to improve readability.
27520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27521      # Now convert it back to Unix-stile (cygpath)
27522      input_path=`$CYGPATH -u "$shortmode_path"`
27523      new_path="$input_path"
27524    fi
27525  fi
27526
27527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27528  if test "x$test_cygdrive_prefix" = x; then
27529    # As a simple fix, exclude /usr/bin since it's not a real path.
27530    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27532      # a path prefixed by /cygdrive for fixpath to work.
27533      new_path="$CYGWIN_ROOT_PATH$input_path"
27534    fi
27535  fi
27536
27537  # remove trailing .exe if any
27538  new_path="${new_path/%.exe/}"
27539
27540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27541
27542  # First separate the path from the arguments. This will split at the first
27543  # space.
27544  complete="$STRIP"
27545  path="${complete%% *}"
27546  tmp="$complete EOL"
27547  arguments="${tmp#* }"
27548
27549  # Input might be given as Windows format, start by converting to
27550  # unix format.
27551  new_path="$path"
27552
27553  windows_path="$new_path"
27554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27555    unix_path=`$CYGPATH -u "$windows_path"`
27556    new_path="$unix_path"
27557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27559    new_path="$unix_path"
27560  fi
27561
27562
27563  # Now try to locate executable using which
27564  new_path=`$WHICH "$new_path" 2> /dev/null`
27565
27566  if test "x$new_path" = x; then
27567    # Oops. Which didn't find the executable.
27568    # The splitting of arguments from the executable at a space might have been incorrect,
27569    # since paths with space are more likely in Windows. Give it another try with the whole
27570    # argument.
27571    path="$complete"
27572    arguments="EOL"
27573    new_path="$path"
27574
27575  windows_path="$new_path"
27576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27577    unix_path=`$CYGPATH -u "$windows_path"`
27578    new_path="$unix_path"
27579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27581    new_path="$unix_path"
27582  fi
27583
27584
27585    new_path=`$WHICH "$new_path" 2> /dev/null`
27586
27587    if test "x$new_path" = x; then
27588      # It's still not found. Now this is an unrecoverable error.
27589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27590$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27591      has_space=`$ECHO "$complete" | $GREP " "`
27592      if test "x$has_space" != x; then
27593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27595      fi
27596      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27597    fi
27598  fi
27599
27600  # Now new_path has a complete unix path to the binary
27601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27602    # Keep paths in /bin as-is, but remove trailing .exe if any
27603    new_path="${new_path/%.exe/}"
27604    # Do not save /bin paths to all_fixpath_prefixes!
27605  else
27606    # Not in mixed or Windows style, start by that.
27607    new_path=`cmd //c echo $new_path`
27608
27609  input_path="$new_path"
27610  # Check if we need to convert this using DOS-style short mode. If the path
27611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27612  # take no chances and rewrite it.
27613  # Note: m4 eats our [], so we need to use [ and ] instead.
27614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27615  if test "x$has_forbidden_chars" != x; then
27616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27618  fi
27619
27620    # Output is in $new_path
27621
27622  windows_path="$new_path"
27623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27624    unix_path=`$CYGPATH -u "$windows_path"`
27625    new_path="$unix_path"
27626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27628    new_path="$unix_path"
27629  fi
27630
27631    # remove trailing .exe if any
27632    new_path="${new_path/%.exe/}"
27633
27634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27636  fi
27637
27638  else
27639    # We're on a posix platform. Hooray! :)
27640    # First separate the path from the arguments. This will split at the first
27641    # space.
27642    complete="$STRIP"
27643    path="${complete%% *}"
27644    tmp="$complete EOL"
27645    arguments="${tmp#* }"
27646
27647    # Cannot rely on the command "which" here since it doesn't always work.
27648    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27649    if test -z "$is_absolute_path"; then
27650      # Path to executable is not absolute. Find it.
27651      IFS_save="$IFS"
27652      IFS=:
27653      for p in $PATH; do
27654        if test -f "$p/$path" && test -x "$p/$path"; then
27655          new_path="$p/$path"
27656          break
27657        fi
27658      done
27659      IFS="$IFS_save"
27660    else
27661      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27662$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27663      new_path="$path"
27664    fi
27665
27666    if test "x$new_path" = x; then
27667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27668$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27669        has_space=`$ECHO "$complete" | $GREP " "`
27670        if test "x$has_space" != x; then
27671          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27673        fi
27674        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27675      fi
27676  fi
27677
27678      # Now join together the path and the arguments once again
27679      if test "x$arguments" != xEOL; then
27680        new_complete="$new_path ${arguments% *}"
27681      else
27682        new_complete="$new_path"
27683      fi
27684
27685  if test "x$complete" != "x$new_complete"; then
27686      STRIP="$new_complete"
27687      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27688$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27689    fi
27690
27691fi
27692
27693# objcopy is used for moving debug symbols to separate files when
27694# full debug symbols are enabled.
27695if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27696    if test -n "$ac_tool_prefix"; then
27697  for ac_prog in gobjcopy objcopy
27698  do
27699    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27702$as_echo_n "checking for $ac_word... " >&6; }
27703if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27704  $as_echo_n "(cached) " >&6
27705else
27706  if test -n "$OBJCOPY"; then
27707  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27708else
27709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27710for as_dir in $PATH
27711do
27712  IFS=$as_save_IFS
27713  test -z "$as_dir" && as_dir=.
27714    for ac_exec_ext in '' $ac_executable_extensions; do
27715  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27716    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27718    break 2
27719  fi
27720done
27721  done
27722IFS=$as_save_IFS
27723
27724fi
27725fi
27726OBJCOPY=$ac_cv_prog_OBJCOPY
27727if test -n "$OBJCOPY"; then
27728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27729$as_echo "$OBJCOPY" >&6; }
27730else
27731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27732$as_echo "no" >&6; }
27733fi
27734
27735
27736    test -n "$OBJCOPY" && break
27737  done
27738fi
27739if test -z "$OBJCOPY"; then
27740  ac_ct_OBJCOPY=$OBJCOPY
27741  for ac_prog in gobjcopy objcopy
27742do
27743  # Extract the first word of "$ac_prog", so it can be a program name with args.
27744set dummy $ac_prog; ac_word=$2
27745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27746$as_echo_n "checking for $ac_word... " >&6; }
27747if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27748  $as_echo_n "(cached) " >&6
27749else
27750  if test -n "$ac_ct_OBJCOPY"; then
27751  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27752else
27753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27754for as_dir in $PATH
27755do
27756  IFS=$as_save_IFS
27757  test -z "$as_dir" && as_dir=.
27758    for ac_exec_ext in '' $ac_executable_extensions; do
27759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27760    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27762    break 2
27763  fi
27764done
27765  done
27766IFS=$as_save_IFS
27767
27768fi
27769fi
27770ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27771if test -n "$ac_ct_OBJCOPY"; then
27772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27773$as_echo "$ac_ct_OBJCOPY" >&6; }
27774else
27775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27776$as_echo "no" >&6; }
27777fi
27778
27779
27780  test -n "$ac_ct_OBJCOPY" && break
27781done
27782
27783  if test "x$ac_ct_OBJCOPY" = x; then
27784    OBJCOPY=""
27785  else
27786    case $cross_compiling:$ac_tool_warned in
27787yes:)
27788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27790ac_tool_warned=yes ;;
27791esac
27792    OBJCOPY=$ac_ct_OBJCOPY
27793  fi
27794fi
27795
27796    # Only call fixup if objcopy was found.
27797    if test -n "$OBJCOPY"; then
27798
27799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27800
27801  # First separate the path from the arguments. This will split at the first
27802  # space.
27803  complete="$OBJCOPY"
27804  path="${complete%% *}"
27805  tmp="$complete EOL"
27806  arguments="${tmp#* }"
27807
27808  # Input might be given as Windows format, start by converting to
27809  # unix format.
27810  new_path=`$CYGPATH -u "$path"`
27811
27812  # Now try to locate executable using which
27813  new_path=`$WHICH "$new_path" 2> /dev/null`
27814  # bat and cmd files are not always considered executable in cygwin causing which
27815  # to not find them
27816  if test "x$new_path" = x \
27817           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27818           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27819    new_path=`$CYGPATH -u "$path"`
27820  fi
27821  if test "x$new_path" = x; then
27822    # Oops. Which didn't find the executable.
27823    # The splitting of arguments from the executable at a space might have been incorrect,
27824    # since paths with space are more likely in Windows. Give it another try with the whole
27825    # argument.
27826    path="$complete"
27827    arguments="EOL"
27828    new_path=`$CYGPATH -u "$path"`
27829    new_path=`$WHICH "$new_path" 2> /dev/null`
27830    # bat and cmd files are not always considered executable in cygwin causing which
27831    # to not find them
27832    if test "x$new_path" = x \
27833             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27834             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27835      new_path=`$CYGPATH -u "$path"`
27836    fi
27837    if test "x$new_path" = x; then
27838      # It's still not found. Now this is an unrecoverable error.
27839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27840$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27841      has_space=`$ECHO "$complete" | $GREP " "`
27842      if test "x$has_space" != x; then
27843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27845      fi
27846      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27847    fi
27848  fi
27849
27850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27853  # "foo.exe" is OK but "foo" is an error.
27854  #
27855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27856  # It is also a way to make sure we got the proper file name for the real test later on.
27857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27858  if test "x$test_shortpath" = x; then
27859    # Short path failed, file does not exist as specified.
27860    # Try adding .exe or .cmd
27861    if test -f "${new_path}.exe"; then
27862       input_to_shortpath="${new_path}.exe"
27863    elif test -f "${new_path}.cmd"; then
27864       input_to_shortpath="${new_path}.cmd"
27865    else
27866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27867$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27870      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27871    fi
27872  else
27873    input_to_shortpath="$new_path"
27874  fi
27875
27876  # Call helper function which possibly converts this using DOS-style short mode.
27877  # If so, the updated path is stored in $new_path.
27878  new_path="$input_to_shortpath"
27879
27880  input_path="$input_to_shortpath"
27881  # Check if we need to convert this using DOS-style short mode. If the path
27882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27883  # take no chances and rewrite it.
27884  # Note: m4 eats our [], so we need to use [ and ] instead.
27885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27886  if test "x$has_forbidden_chars" != x; then
27887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27891      # Going to short mode and back again did indeed matter. Since short mode is
27892      # case insensitive, let's make it lowercase to improve readability.
27893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27894      # Now convert it back to Unix-stile (cygpath)
27895      input_path=`$CYGPATH -u "$shortmode_path"`
27896      new_path="$input_path"
27897    fi
27898  fi
27899
27900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27901  if test "x$test_cygdrive_prefix" = x; then
27902    # As a simple fix, exclude /usr/bin since it's not a real path.
27903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27905      # a path prefixed by /cygdrive for fixpath to work.
27906      new_path="$CYGWIN_ROOT_PATH$input_path"
27907    fi
27908  fi
27909
27910  # remove trailing .exe if any
27911  new_path="${new_path/%.exe/}"
27912
27913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914
27915  # First separate the path from the arguments. This will split at the first
27916  # space.
27917  complete="$OBJCOPY"
27918  path="${complete%% *}"
27919  tmp="$complete EOL"
27920  arguments="${tmp#* }"
27921
27922  # Input might be given as Windows format, start by converting to
27923  # unix format.
27924  new_path="$path"
27925
27926  windows_path="$new_path"
27927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928    unix_path=`$CYGPATH -u "$windows_path"`
27929    new_path="$unix_path"
27930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27932    new_path="$unix_path"
27933  fi
27934
27935
27936  # Now try to locate executable using which
27937  new_path=`$WHICH "$new_path" 2> /dev/null`
27938
27939  if test "x$new_path" = x; then
27940    # Oops. Which didn't find the executable.
27941    # The splitting of arguments from the executable at a space might have been incorrect,
27942    # since paths with space are more likely in Windows. Give it another try with the whole
27943    # argument.
27944    path="$complete"
27945    arguments="EOL"
27946    new_path="$path"
27947
27948  windows_path="$new_path"
27949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27950    unix_path=`$CYGPATH -u "$windows_path"`
27951    new_path="$unix_path"
27952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27954    new_path="$unix_path"
27955  fi
27956
27957
27958    new_path=`$WHICH "$new_path" 2> /dev/null`
27959
27960    if test "x$new_path" = x; then
27961      # It's still not found. Now this is an unrecoverable error.
27962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27963$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27964      has_space=`$ECHO "$complete" | $GREP " "`
27965      if test "x$has_space" != x; then
27966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27968      fi
27969      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27970    fi
27971  fi
27972
27973  # Now new_path has a complete unix path to the binary
27974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27975    # Keep paths in /bin as-is, but remove trailing .exe if any
27976    new_path="${new_path/%.exe/}"
27977    # Do not save /bin paths to all_fixpath_prefixes!
27978  else
27979    # Not in mixed or Windows style, start by that.
27980    new_path=`cmd //c echo $new_path`
27981
27982  input_path="$new_path"
27983  # Check if we need to convert this using DOS-style short mode. If the path
27984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27985  # take no chances and rewrite it.
27986  # Note: m4 eats our [], so we need to use [ and ] instead.
27987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27988  if test "x$has_forbidden_chars" != x; then
27989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27991  fi
27992
27993    # Output is in $new_path
27994
27995  windows_path="$new_path"
27996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27997    unix_path=`$CYGPATH -u "$windows_path"`
27998    new_path="$unix_path"
27999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28001    new_path="$unix_path"
28002  fi
28003
28004    # remove trailing .exe if any
28005    new_path="${new_path/%.exe/}"
28006
28007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28009  fi
28010
28011  else
28012    # We're on a posix platform. Hooray! :)
28013    # First separate the path from the arguments. This will split at the first
28014    # space.
28015    complete="$OBJCOPY"
28016    path="${complete%% *}"
28017    tmp="$complete EOL"
28018    arguments="${tmp#* }"
28019
28020    # Cannot rely on the command "which" here since it doesn't always work.
28021    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28022    if test -z "$is_absolute_path"; then
28023      # Path to executable is not absolute. Find it.
28024      IFS_save="$IFS"
28025      IFS=:
28026      for p in $PATH; do
28027        if test -f "$p/$path" && test -x "$p/$path"; then
28028          new_path="$p/$path"
28029          break
28030        fi
28031      done
28032      IFS="$IFS_save"
28033    else
28034      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28035$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28036      new_path="$path"
28037    fi
28038
28039    if test "x$new_path" = x; then
28040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28041$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28042        has_space=`$ECHO "$complete" | $GREP " "`
28043        if test "x$has_space" != x; then
28044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28046        fi
28047        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28048      fi
28049  fi
28050
28051      # Now join together the path and the arguments once again
28052      if test "x$arguments" != xEOL; then
28053        new_complete="$new_path ${arguments% *}"
28054      else
28055        new_complete="$new_path"
28056      fi
28057
28058  if test "x$complete" != "x$new_complete"; then
28059      OBJCOPY="$new_complete"
28060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28061$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28062    fi
28063
28064    fi
28065fi
28066
28067if test -n "$ac_tool_prefix"; then
28068  for ac_prog in gobjdump objdump
28069  do
28070    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28073$as_echo_n "checking for $ac_word... " >&6; }
28074if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
28075  $as_echo_n "(cached) " >&6
28076else
28077  if test -n "$OBJDUMP"; then
28078  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28079else
28080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28081for as_dir in $PATH
28082do
28083  IFS=$as_save_IFS
28084  test -z "$as_dir" && as_dir=.
28085    for ac_exec_ext in '' $ac_executable_extensions; do
28086  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28087    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28089    break 2
28090  fi
28091done
28092  done
28093IFS=$as_save_IFS
28094
28095fi
28096fi
28097OBJDUMP=$ac_cv_prog_OBJDUMP
28098if test -n "$OBJDUMP"; then
28099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28100$as_echo "$OBJDUMP" >&6; }
28101else
28102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28103$as_echo "no" >&6; }
28104fi
28105
28106
28107    test -n "$OBJDUMP" && break
28108  done
28109fi
28110if test -z "$OBJDUMP"; then
28111  ac_ct_OBJDUMP=$OBJDUMP
28112  for ac_prog in gobjdump objdump
28113do
28114  # Extract the first word of "$ac_prog", so it can be a program name with args.
28115set dummy $ac_prog; ac_word=$2
28116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28117$as_echo_n "checking for $ac_word... " >&6; }
28118if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
28119  $as_echo_n "(cached) " >&6
28120else
28121  if test -n "$ac_ct_OBJDUMP"; then
28122  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28123else
28124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28125for as_dir in $PATH
28126do
28127  IFS=$as_save_IFS
28128  test -z "$as_dir" && as_dir=.
28129    for ac_exec_ext in '' $ac_executable_extensions; do
28130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28131    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28133    break 2
28134  fi
28135done
28136  done
28137IFS=$as_save_IFS
28138
28139fi
28140fi
28141ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28142if test -n "$ac_ct_OBJDUMP"; then
28143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28144$as_echo "$ac_ct_OBJDUMP" >&6; }
28145else
28146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28147$as_echo "no" >&6; }
28148fi
28149
28150
28151  test -n "$ac_ct_OBJDUMP" && break
28152done
28153
28154  if test "x$ac_ct_OBJDUMP" = x; then
28155    OBJDUMP=""
28156  else
28157    case $cross_compiling:$ac_tool_warned in
28158yes:)
28159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28161ac_tool_warned=yes ;;
28162esac
28163    OBJDUMP=$ac_ct_OBJDUMP
28164  fi
28165fi
28166
28167if test "x$OBJDUMP" != x; then
28168  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28169
28170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28171
28172  # First separate the path from the arguments. This will split at the first
28173  # space.
28174  complete="$OBJDUMP"
28175  path="${complete%% *}"
28176  tmp="$complete EOL"
28177  arguments="${tmp#* }"
28178
28179  # Input might be given as Windows format, start by converting to
28180  # unix format.
28181  new_path=`$CYGPATH -u "$path"`
28182
28183  # Now try to locate executable using which
28184  new_path=`$WHICH "$new_path" 2> /dev/null`
28185  # bat and cmd files are not always considered executable in cygwin causing which
28186  # to not find them
28187  if test "x$new_path" = x \
28188           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28189           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28190    new_path=`$CYGPATH -u "$path"`
28191  fi
28192  if test "x$new_path" = x; then
28193    # Oops. Which didn't find the executable.
28194    # The splitting of arguments from the executable at a space might have been incorrect,
28195    # since paths with space are more likely in Windows. Give it another try with the whole
28196    # argument.
28197    path="$complete"
28198    arguments="EOL"
28199    new_path=`$CYGPATH -u "$path"`
28200    new_path=`$WHICH "$new_path" 2> /dev/null`
28201    # bat and cmd files are not always considered executable in cygwin causing which
28202    # to not find them
28203    if test "x$new_path" = x \
28204             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28205             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28206      new_path=`$CYGPATH -u "$path"`
28207    fi
28208    if test "x$new_path" = x; then
28209      # It's still not found. Now this is an unrecoverable error.
28210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28211$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28212      has_space=`$ECHO "$complete" | $GREP " "`
28213      if test "x$has_space" != x; then
28214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28216      fi
28217      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28218    fi
28219  fi
28220
28221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28224  # "foo.exe" is OK but "foo" is an error.
28225  #
28226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28227  # It is also a way to make sure we got the proper file name for the real test later on.
28228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28229  if test "x$test_shortpath" = x; then
28230    # Short path failed, file does not exist as specified.
28231    # Try adding .exe or .cmd
28232    if test -f "${new_path}.exe"; then
28233       input_to_shortpath="${new_path}.exe"
28234    elif test -f "${new_path}.cmd"; then
28235       input_to_shortpath="${new_path}.cmd"
28236    else
28237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28238$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28241      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28242    fi
28243  else
28244    input_to_shortpath="$new_path"
28245  fi
28246
28247  # Call helper function which possibly converts this using DOS-style short mode.
28248  # If so, the updated path is stored in $new_path.
28249  new_path="$input_to_shortpath"
28250
28251  input_path="$input_to_shortpath"
28252  # Check if we need to convert this using DOS-style short mode. If the path
28253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28254  # take no chances and rewrite it.
28255  # Note: m4 eats our [], so we need to use [ and ] instead.
28256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28257  if test "x$has_forbidden_chars" != x; then
28258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28262      # Going to short mode and back again did indeed matter. Since short mode is
28263      # case insensitive, let's make it lowercase to improve readability.
28264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28265      # Now convert it back to Unix-stile (cygpath)
28266      input_path=`$CYGPATH -u "$shortmode_path"`
28267      new_path="$input_path"
28268    fi
28269  fi
28270
28271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28272  if test "x$test_cygdrive_prefix" = x; then
28273    # As a simple fix, exclude /usr/bin since it's not a real path.
28274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28276      # a path prefixed by /cygdrive for fixpath to work.
28277      new_path="$CYGWIN_ROOT_PATH$input_path"
28278    fi
28279  fi
28280
28281  # remove trailing .exe if any
28282  new_path="${new_path/%.exe/}"
28283
28284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28285
28286  # First separate the path from the arguments. This will split at the first
28287  # space.
28288  complete="$OBJDUMP"
28289  path="${complete%% *}"
28290  tmp="$complete EOL"
28291  arguments="${tmp#* }"
28292
28293  # Input might be given as Windows format, start by converting to
28294  # unix format.
28295  new_path="$path"
28296
28297  windows_path="$new_path"
28298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28299    unix_path=`$CYGPATH -u "$windows_path"`
28300    new_path="$unix_path"
28301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28303    new_path="$unix_path"
28304  fi
28305
28306
28307  # Now try to locate executable using which
28308  new_path=`$WHICH "$new_path" 2> /dev/null`
28309
28310  if test "x$new_path" = x; then
28311    # Oops. Which didn't find the executable.
28312    # The splitting of arguments from the executable at a space might have been incorrect,
28313    # since paths with space are more likely in Windows. Give it another try with the whole
28314    # argument.
28315    path="$complete"
28316    arguments="EOL"
28317    new_path="$path"
28318
28319  windows_path="$new_path"
28320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321    unix_path=`$CYGPATH -u "$windows_path"`
28322    new_path="$unix_path"
28323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28325    new_path="$unix_path"
28326  fi
28327
28328
28329    new_path=`$WHICH "$new_path" 2> /dev/null`
28330
28331    if test "x$new_path" = x; then
28332      # It's still not found. Now this is an unrecoverable error.
28333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28334$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28335      has_space=`$ECHO "$complete" | $GREP " "`
28336      if test "x$has_space" != x; then
28337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28339      fi
28340      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28341    fi
28342  fi
28343
28344  # Now new_path has a complete unix path to the binary
28345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28346    # Keep paths in /bin as-is, but remove trailing .exe if any
28347    new_path="${new_path/%.exe/}"
28348    # Do not save /bin paths to all_fixpath_prefixes!
28349  else
28350    # Not in mixed or Windows style, start by that.
28351    new_path=`cmd //c echo $new_path`
28352
28353  input_path="$new_path"
28354  # Check if we need to convert this using DOS-style short mode. If the path
28355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28356  # take no chances and rewrite it.
28357  # Note: m4 eats our [], so we need to use [ and ] instead.
28358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28359  if test "x$has_forbidden_chars" != x; then
28360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28362  fi
28363
28364    # Output is in $new_path
28365
28366  windows_path="$new_path"
28367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28368    unix_path=`$CYGPATH -u "$windows_path"`
28369    new_path="$unix_path"
28370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28372    new_path="$unix_path"
28373  fi
28374
28375    # remove trailing .exe if any
28376    new_path="${new_path/%.exe/}"
28377
28378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28380  fi
28381
28382  else
28383    # We're on a posix platform. Hooray! :)
28384    # First separate the path from the arguments. This will split at the first
28385    # space.
28386    complete="$OBJDUMP"
28387    path="${complete%% *}"
28388    tmp="$complete EOL"
28389    arguments="${tmp#* }"
28390
28391    # Cannot rely on the command "which" here since it doesn't always work.
28392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28393    if test -z "$is_absolute_path"; then
28394      # Path to executable is not absolute. Find it.
28395      IFS_save="$IFS"
28396      IFS=:
28397      for p in $PATH; do
28398        if test -f "$p/$path" && test -x "$p/$path"; then
28399          new_path="$p/$path"
28400          break
28401        fi
28402      done
28403      IFS="$IFS_save"
28404    else
28405      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28406$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28407      new_path="$path"
28408    fi
28409
28410    if test "x$new_path" = x; then
28411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28412$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28413        has_space=`$ECHO "$complete" | $GREP " "`
28414        if test "x$has_space" != x; then
28415          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28417        fi
28418        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28419      fi
28420  fi
28421
28422      # Now join together the path and the arguments once again
28423      if test "x$arguments" != xEOL; then
28424        new_complete="$new_path ${arguments% *}"
28425      else
28426        new_complete="$new_path"
28427      fi
28428
28429  if test "x$complete" != "x$new_complete"; then
28430      OBJDUMP="$new_complete"
28431      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28432$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28433    fi
28434
28435fi
28436
28437if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28438   # Extract the first word of "lipo", so it can be a program name with args.
28439set dummy lipo; ac_word=$2
28440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28441$as_echo_n "checking for $ac_word... " >&6; }
28442if test "${ac_cv_path_LIPO+set}" = set; then :
28443  $as_echo_n "(cached) " >&6
28444else
28445  case $LIPO in
28446  [\\/]* | ?:[\\/]*)
28447  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28448  ;;
28449  *)
28450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28451for as_dir in $PATH
28452do
28453  IFS=$as_save_IFS
28454  test -z "$as_dir" && as_dir=.
28455    for ac_exec_ext in '' $ac_executable_extensions; do
28456  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28457    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28459    break 2
28460  fi
28461done
28462  done
28463IFS=$as_save_IFS
28464
28465  ;;
28466esac
28467fi
28468LIPO=$ac_cv_path_LIPO
28469if test -n "$LIPO"; then
28470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28471$as_echo "$LIPO" >&6; }
28472else
28473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28474$as_echo "no" >&6; }
28475fi
28476
28477
28478
28479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28480
28481  # First separate the path from the arguments. This will split at the first
28482  # space.
28483  complete="$LIPO"
28484  path="${complete%% *}"
28485  tmp="$complete EOL"
28486  arguments="${tmp#* }"
28487
28488  # Input might be given as Windows format, start by converting to
28489  # unix format.
28490  new_path=`$CYGPATH -u "$path"`
28491
28492  # Now try to locate executable using which
28493  new_path=`$WHICH "$new_path" 2> /dev/null`
28494  # bat and cmd files are not always considered executable in cygwin causing which
28495  # to not find them
28496  if test "x$new_path" = x \
28497           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28498           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28499    new_path=`$CYGPATH -u "$path"`
28500  fi
28501  if test "x$new_path" = x; then
28502    # Oops. Which didn't find the executable.
28503    # The splitting of arguments from the executable at a space might have been incorrect,
28504    # since paths with space are more likely in Windows. Give it another try with the whole
28505    # argument.
28506    path="$complete"
28507    arguments="EOL"
28508    new_path=`$CYGPATH -u "$path"`
28509    new_path=`$WHICH "$new_path" 2> /dev/null`
28510    # bat and cmd files are not always considered executable in cygwin causing which
28511    # to not find them
28512    if test "x$new_path" = x \
28513             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28514             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28515      new_path=`$CYGPATH -u "$path"`
28516    fi
28517    if test "x$new_path" = x; then
28518      # It's still not found. Now this is an unrecoverable error.
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28520$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28521      has_space=`$ECHO "$complete" | $GREP " "`
28522      if test "x$has_space" != x; then
28523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28525      fi
28526      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28527    fi
28528  fi
28529
28530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28533  # "foo.exe" is OK but "foo" is an error.
28534  #
28535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28536  # It is also a way to make sure we got the proper file name for the real test later on.
28537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28538  if test "x$test_shortpath" = x; then
28539    # Short path failed, file does not exist as specified.
28540    # Try adding .exe or .cmd
28541    if test -f "${new_path}.exe"; then
28542       input_to_shortpath="${new_path}.exe"
28543    elif test -f "${new_path}.cmd"; then
28544       input_to_shortpath="${new_path}.cmd"
28545    else
28546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28547$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28550      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28551    fi
28552  else
28553    input_to_shortpath="$new_path"
28554  fi
28555
28556  # Call helper function which possibly converts this using DOS-style short mode.
28557  # If so, the updated path is stored in $new_path.
28558  new_path="$input_to_shortpath"
28559
28560  input_path="$input_to_shortpath"
28561  # Check if we need to convert this using DOS-style short mode. If the path
28562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28563  # take no chances and rewrite it.
28564  # Note: m4 eats our [], so we need to use [ and ] instead.
28565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28566  if test "x$has_forbidden_chars" != x; then
28567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28571      # Going to short mode and back again did indeed matter. Since short mode is
28572      # case insensitive, let's make it lowercase to improve readability.
28573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28574      # Now convert it back to Unix-stile (cygpath)
28575      input_path=`$CYGPATH -u "$shortmode_path"`
28576      new_path="$input_path"
28577    fi
28578  fi
28579
28580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28581  if test "x$test_cygdrive_prefix" = x; then
28582    # As a simple fix, exclude /usr/bin since it's not a real path.
28583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28585      # a path prefixed by /cygdrive for fixpath to work.
28586      new_path="$CYGWIN_ROOT_PATH$input_path"
28587    fi
28588  fi
28589
28590  # remove trailing .exe if any
28591  new_path="${new_path/%.exe/}"
28592
28593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28594
28595  # First separate the path from the arguments. This will split at the first
28596  # space.
28597  complete="$LIPO"
28598  path="${complete%% *}"
28599  tmp="$complete EOL"
28600  arguments="${tmp#* }"
28601
28602  # Input might be given as Windows format, start by converting to
28603  # unix format.
28604  new_path="$path"
28605
28606  windows_path="$new_path"
28607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28608    unix_path=`$CYGPATH -u "$windows_path"`
28609    new_path="$unix_path"
28610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28612    new_path="$unix_path"
28613  fi
28614
28615
28616  # Now try to locate executable using which
28617  new_path=`$WHICH "$new_path" 2> /dev/null`
28618
28619  if test "x$new_path" = x; then
28620    # Oops. Which didn't find the executable.
28621    # The splitting of arguments from the executable at a space might have been incorrect,
28622    # since paths with space are more likely in Windows. Give it another try with the whole
28623    # argument.
28624    path="$complete"
28625    arguments="EOL"
28626    new_path="$path"
28627
28628  windows_path="$new_path"
28629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28630    unix_path=`$CYGPATH -u "$windows_path"`
28631    new_path="$unix_path"
28632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28634    new_path="$unix_path"
28635  fi
28636
28637
28638    new_path=`$WHICH "$new_path" 2> /dev/null`
28639
28640    if test "x$new_path" = x; then
28641      # It's still not found. Now this is an unrecoverable error.
28642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28643$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28644      has_space=`$ECHO "$complete" | $GREP " "`
28645      if test "x$has_space" != x; then
28646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28648      fi
28649      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28650    fi
28651  fi
28652
28653  # Now new_path has a complete unix path to the binary
28654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28655    # Keep paths in /bin as-is, but remove trailing .exe if any
28656    new_path="${new_path/%.exe/}"
28657    # Do not save /bin paths to all_fixpath_prefixes!
28658  else
28659    # Not in mixed or Windows style, start by that.
28660    new_path=`cmd //c echo $new_path`
28661
28662  input_path="$new_path"
28663  # Check if we need to convert this using DOS-style short mode. If the path
28664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28665  # take no chances and rewrite it.
28666  # Note: m4 eats our [], so we need to use [ and ] instead.
28667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28668  if test "x$has_forbidden_chars" != x; then
28669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28671  fi
28672
28673    # Output is in $new_path
28674
28675  windows_path="$new_path"
28676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28677    unix_path=`$CYGPATH -u "$windows_path"`
28678    new_path="$unix_path"
28679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28681    new_path="$unix_path"
28682  fi
28683
28684    # remove trailing .exe if any
28685    new_path="${new_path/%.exe/}"
28686
28687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28689  fi
28690
28691  else
28692    # We're on a posix platform. Hooray! :)
28693    # First separate the path from the arguments. This will split at the first
28694    # space.
28695    complete="$LIPO"
28696    path="${complete%% *}"
28697    tmp="$complete EOL"
28698    arguments="${tmp#* }"
28699
28700    # Cannot rely on the command "which" here since it doesn't always work.
28701    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28702    if test -z "$is_absolute_path"; then
28703      # Path to executable is not absolute. Find it.
28704      IFS_save="$IFS"
28705      IFS=:
28706      for p in $PATH; do
28707        if test -f "$p/$path" && test -x "$p/$path"; then
28708          new_path="$p/$path"
28709          break
28710        fi
28711      done
28712      IFS="$IFS_save"
28713    else
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28715$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28716      new_path="$path"
28717    fi
28718
28719    if test "x$new_path" = x; then
28720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28721$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28722        has_space=`$ECHO "$complete" | $GREP " "`
28723        if test "x$has_space" != x; then
28724          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28725$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28726        fi
28727        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28728      fi
28729  fi
28730
28731      # Now join together the path and the arguments once again
28732      if test "x$arguments" != xEOL; then
28733        new_complete="$new_path ${arguments% *}"
28734      else
28735        new_complete="$new_path"
28736      fi
28737
28738  if test "x$complete" != "x$new_complete"; then
28739      LIPO="$new_complete"
28740      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28741$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28742    fi
28743
28744fi
28745
28746
28747
28748# Restore old path without tools dir
28749PATH="$OLD_PATH"
28750
28751
28752# FIXME: Currently we must test this after paths but before flags. Fix!
28753
28754# And we can test some aspects on the target using configure macros.
28755
28756
28757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28758$as_echo_n "checking for ANSI C header files... " >&6; }
28759if test "${ac_cv_header_stdc+set}" = set; then :
28760  $as_echo_n "(cached) " >&6
28761else
28762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28763/* end confdefs.h.  */
28764#include <stdlib.h>
28765#include <stdarg.h>
28766#include <string.h>
28767#include <float.h>
28768
28769int
28770main ()
28771{
28772
28773  ;
28774  return 0;
28775}
28776_ACEOF
28777if ac_fn_cxx_try_compile "$LINENO"; then :
28778  ac_cv_header_stdc=yes
28779else
28780  ac_cv_header_stdc=no
28781fi
28782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28783
28784if test $ac_cv_header_stdc = yes; then
28785  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28787/* end confdefs.h.  */
28788#include <string.h>
28789
28790_ACEOF
28791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28792  $EGREP "memchr" >/dev/null 2>&1; then :
28793
28794else
28795  ac_cv_header_stdc=no
28796fi
28797rm -f conftest*
28798
28799fi
28800
28801if test $ac_cv_header_stdc = yes; then
28802  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28804/* end confdefs.h.  */
28805#include <stdlib.h>
28806
28807_ACEOF
28808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28809  $EGREP "free" >/dev/null 2>&1; then :
28810
28811else
28812  ac_cv_header_stdc=no
28813fi
28814rm -f conftest*
28815
28816fi
28817
28818if test $ac_cv_header_stdc = yes; then
28819  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28820  if test "$cross_compiling" = yes; then :
28821  :
28822else
28823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28824/* end confdefs.h.  */
28825#include <ctype.h>
28826#include <stdlib.h>
28827#if ((' ' & 0x0FF) == 0x020)
28828# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28829# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28830#else
28831# define ISLOWER(c) \
28832		   (('a' <= (c) && (c) <= 'i') \
28833		     || ('j' <= (c) && (c) <= 'r') \
28834		     || ('s' <= (c) && (c) <= 'z'))
28835# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28836#endif
28837
28838#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28839int
28840main ()
28841{
28842  int i;
28843  for (i = 0; i < 256; i++)
28844    if (XOR (islower (i), ISLOWER (i))
28845	|| toupper (i) != TOUPPER (i))
28846      return 2;
28847  return 0;
28848}
28849_ACEOF
28850if ac_fn_cxx_try_run "$LINENO"; then :
28851
28852else
28853  ac_cv_header_stdc=no
28854fi
28855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28856  conftest.$ac_objext conftest.beam conftest.$ac_ext
28857fi
28858
28859fi
28860fi
28861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28862$as_echo "$ac_cv_header_stdc" >&6; }
28863if test $ac_cv_header_stdc = yes; then
28864
28865$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28866
28867fi
28868
28869# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28870for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28871		  inttypes.h stdint.h unistd.h
28872do :
28873  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28874ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28875"
28876if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28877  cat >>confdefs.h <<_ACEOF
28878#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28879_ACEOF
28880
28881fi
28882
28883done
28884
28885
28886
28887###############################################################################
28888#
28889# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28890# (The JVM can use 32 or 64 bit Java pointers but that decision
28891# is made at runtime.)
28892#
28893
28894if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28895  # Always specify -m flags on Solaris
28896
28897  # keep track of c/cxx flags that we added outselves...
28898  #   to prevent emitting warning...
28899  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28900  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28901  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28902
28903  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28904  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28905  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28906
28907  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28908  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28909  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28910
28911elif test "x$COMPILE_TYPE" = xreduced; then
28912  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28913    # Specify -m if running reduced on other Posix platforms
28914
28915  # keep track of c/cxx flags that we added outselves...
28916  #   to prevent emitting warning...
28917  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28918  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28919  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28920
28921  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28922  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28923  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28924
28925  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28926  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28927  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28928
28929  fi
28930fi
28931
28932# Make compilation sanity check
28933for ac_header in stdio.h
28934do :
28935  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28936if test "x$ac_cv_header_stdio_h" = x""yes; then :
28937  cat >>confdefs.h <<_ACEOF
28938#define HAVE_STDIO_H 1
28939_ACEOF
28940
28941else
28942
28943  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28944$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28945  if test "x$COMPILE_TYPE" = xreduced; then
28946    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28947$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28948  elif test "x$COMPILE_TYPE" = xcross; then
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28950$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28951  fi
28952  as_fn_error $? "Cannot continue." "$LINENO" 5
28953
28954fi
28955
28956done
28957
28958
28959# The cast to long int works around a bug in the HP C Compiler
28960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28962# This bug is HP SR number 8606223364.
28963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28964$as_echo_n "checking size of int *... " >&6; }
28965if test "${ac_cv_sizeof_int_p+set}" = set; then :
28966  $as_echo_n "(cached) " >&6
28967else
28968  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28969
28970else
28971  if test "$ac_cv_type_int_p" = yes; then
28972     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28974as_fn_error 77 "cannot compute sizeof (int *)
28975See \`config.log' for more details" "$LINENO" 5 ; }
28976   else
28977     ac_cv_sizeof_int_p=0
28978   fi
28979fi
28980
28981fi
28982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28983$as_echo "$ac_cv_sizeof_int_p" >&6; }
28984
28985
28986
28987cat >>confdefs.h <<_ACEOF
28988#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28989_ACEOF
28990
28991
28992
28993if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28994  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28995  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28996fi
28997
28998if test "x$SIZEOF_INT_P" = x; then
28999    # The test failed, lets stick to the assumed value.
29000    { $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
29001$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29002else
29003    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
29004
29005    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29006        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
29007    fi
29008fi
29009
29010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29011$as_echo_n "checking for target address size... " >&6; }
29012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29013$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29014
29015
29016###############################################################################
29017#
29018# Is the target little of big endian?
29019#
29020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29021$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29022if test "${ac_cv_c_bigendian+set}" = set; then :
29023  $as_echo_n "(cached) " >&6
29024else
29025  ac_cv_c_bigendian=unknown
29026    # See if we're dealing with a universal compiler.
29027    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29028/* end confdefs.h.  */
29029#ifndef __APPLE_CC__
29030	       not a universal capable compiler
29031	     #endif
29032	     typedef int dummy;
29033
29034_ACEOF
29035if ac_fn_cxx_try_compile "$LINENO"; then :
29036
29037	# Check for potential -arch flags.  It is not universal unless
29038	# there are at least two -arch flags with different values.
29039	ac_arch=
29040	ac_prev=
29041	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29042	 if test -n "$ac_prev"; then
29043	   case $ac_word in
29044	     i?86 | x86_64 | ppc | ppc64)
29045	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29046		 ac_arch=$ac_word
29047	       else
29048		 ac_cv_c_bigendian=universal
29049		 break
29050	       fi
29051	       ;;
29052	   esac
29053	   ac_prev=
29054	 elif test "x$ac_word" = "x-arch"; then
29055	   ac_prev=arch
29056	 fi
29057       done
29058fi
29059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29060    if test $ac_cv_c_bigendian = unknown; then
29061      # See if sys/param.h defines the BYTE_ORDER macro.
29062      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29063/* end confdefs.h.  */
29064#include <sys/types.h>
29065	     #include <sys/param.h>
29066
29067int
29068main ()
29069{
29070#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29071		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29072		     && LITTLE_ENDIAN)
29073	      bogus endian macros
29074	     #endif
29075
29076  ;
29077  return 0;
29078}
29079_ACEOF
29080if ac_fn_cxx_try_compile "$LINENO"; then :
29081  # It does; now see whether it defined to BIG_ENDIAN or not.
29082	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29083/* end confdefs.h.  */
29084#include <sys/types.h>
29085		#include <sys/param.h>
29086
29087int
29088main ()
29089{
29090#if BYTE_ORDER != BIG_ENDIAN
29091		 not big endian
29092		#endif
29093
29094  ;
29095  return 0;
29096}
29097_ACEOF
29098if ac_fn_cxx_try_compile "$LINENO"; then :
29099  ac_cv_c_bigendian=yes
29100else
29101  ac_cv_c_bigendian=no
29102fi
29103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29104fi
29105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29106    fi
29107    if test $ac_cv_c_bigendian = unknown; then
29108      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29109      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29110/* end confdefs.h.  */
29111#include <limits.h>
29112
29113int
29114main ()
29115{
29116#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29117	      bogus endian macros
29118	     #endif
29119
29120  ;
29121  return 0;
29122}
29123_ACEOF
29124if ac_fn_cxx_try_compile "$LINENO"; then :
29125  # It does; now see whether it defined to _BIG_ENDIAN or not.
29126	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128#include <limits.h>
29129
29130int
29131main ()
29132{
29133#ifndef _BIG_ENDIAN
29134		 not big endian
29135		#endif
29136
29137  ;
29138  return 0;
29139}
29140_ACEOF
29141if ac_fn_cxx_try_compile "$LINENO"; then :
29142  ac_cv_c_bigendian=yes
29143else
29144  ac_cv_c_bigendian=no
29145fi
29146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29147fi
29148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29149    fi
29150    if test $ac_cv_c_bigendian = unknown; then
29151      # Compile a test program.
29152      if test "$cross_compiling" = yes; then :
29153  # Try to guess by grepping values from an object file.
29154	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29155/* end confdefs.h.  */
29156short int ascii_mm[] =
29157		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29158		short int ascii_ii[] =
29159		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29160		int use_ascii (int i) {
29161		  return ascii_mm[i] + ascii_ii[i];
29162		}
29163		short int ebcdic_ii[] =
29164		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29165		short int ebcdic_mm[] =
29166		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29167		int use_ebcdic (int i) {
29168		  return ebcdic_mm[i] + ebcdic_ii[i];
29169		}
29170		extern int foo;
29171
29172int
29173main ()
29174{
29175return use_ascii (foo) == use_ebcdic (foo);
29176  ;
29177  return 0;
29178}
29179_ACEOF
29180if ac_fn_cxx_try_compile "$LINENO"; then :
29181  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29182	      ac_cv_c_bigendian=yes
29183	    fi
29184	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29185	      if test "$ac_cv_c_bigendian" = unknown; then
29186		ac_cv_c_bigendian=no
29187	      else
29188		# finding both strings is unlikely to happen, but who knows?
29189		ac_cv_c_bigendian=unknown
29190	      fi
29191	    fi
29192fi
29193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29194else
29195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29196/* end confdefs.h.  */
29197$ac_includes_default
29198int
29199main ()
29200{
29201
29202	     /* Are we little or big endian?  From Harbison&Steele.  */
29203	     union
29204	     {
29205	       long int l;
29206	       char c[sizeof (long int)];
29207	     } u;
29208	     u.l = 1;
29209	     return u.c[sizeof (long int) - 1] == 1;
29210
29211  ;
29212  return 0;
29213}
29214_ACEOF
29215if ac_fn_cxx_try_run "$LINENO"; then :
29216  ac_cv_c_bigendian=no
29217else
29218  ac_cv_c_bigendian=yes
29219fi
29220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29221  conftest.$ac_objext conftest.beam conftest.$ac_ext
29222fi
29223
29224    fi
29225fi
29226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29227$as_echo "$ac_cv_c_bigendian" >&6; }
29228 case $ac_cv_c_bigendian in #(
29229   yes)
29230     ENDIAN="big";; #(
29231   no)
29232     ENDIAN="little" ;; #(
29233   universal)
29234     ENDIAN="universal_endianness"
29235     ;; #(
29236   *)
29237     ENDIAN="unknown" ;;
29238 esac
29239
29240
29241if test "x$ENDIAN" = xuniversal_endianness; then
29242    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29243fi
29244if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29245    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
29246fi
29247
29248
29249# Configure flags for the tools
29250
29251
29252###############################################################################
29253#
29254# How to compile shared libraries.
29255#
29256
29257if test "x$GCC" = xyes; then
29258    COMPILER_NAME=gcc
29259    PICFLAG="-fPIC"
29260    LIBRARY_PREFIX=lib
29261    SHARED_LIBRARY='lib$1.so'
29262    STATIC_LIBRARY='lib$1.a'
29263    SHARED_LIBRARY_FLAGS="-shared"
29264    SHARED_LIBRARY_SUFFIX='.so'
29265    STATIC_LIBRARY_SUFFIX='.a'
29266    OBJ_SUFFIX='.o'
29267    EXE_SUFFIX=''
29268    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29269    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29270    C_FLAG_REORDER=''
29271    CXX_FLAG_REORDER=''
29272    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29273    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29274    LD="$CC"
29275    LDEXE="$CC"
29276    LDCXX="$CXX"
29277    LDEXECXX="$CXX"
29278    POST_STRIP_CMD="$STRIP -g"
29279
29280    # Linking is different on MacOSX
29281    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29282        # Might change in the future to clang.
29283        COMPILER_NAME=gcc
29284        SHARED_LIBRARY='lib$1.dylib'
29285        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29286        SHARED_LIBRARY_SUFFIX='.dylib'
29287        EXE_SUFFIX=''
29288        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29289        SET_SHARED_LIBRARY_MAPFILE=''
29290        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29291        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29292        POST_STRIP_CMD="$STRIP -S"
29293    fi
29294else
29295    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29296        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29297        COMPILER_NAME=ossc
29298        PICFLAG="-KPIC"
29299        LIBRARY_PREFIX=lib
29300        SHARED_LIBRARY='lib$1.so'
29301        STATIC_LIBRARY='lib$1.a'
29302        SHARED_LIBRARY_FLAGS="-G"
29303        SHARED_LIBRARY_SUFFIX='.so'
29304        STATIC_LIBRARY_SUFFIX='.a'
29305        OBJ_SUFFIX='.o'
29306        EXE_SUFFIX=''
29307        SET_SHARED_LIBRARY_NAME=''
29308        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29309	C_FLAG_REORDER='-xF'
29310	CXX_FLAG_REORDER='-xF'
29311        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29312        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29313        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29314        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29315        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29316        POST_STRIP_CMD="$STRIP -x"
29317        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29318    fi
29319    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29320        # If it is not gcc, then assume it is the MS Visual Studio compiler
29321        COMPILER_NAME=cl
29322        PICFLAG=""
29323        LIBRARY_PREFIX=
29324        SHARED_LIBRARY='$1.dll'
29325        STATIC_LIBRARY='$1.lib'
29326        SHARED_LIBRARY_FLAGS="-LD"
29327        SHARED_LIBRARY_SUFFIX='.dll'
29328        STATIC_LIBRARY_SUFFIX='.lib'
29329        OBJ_SUFFIX='.obj'
29330        EXE_SUFFIX='.exe'
29331        SET_SHARED_LIBRARY_NAME=''
29332        SET_SHARED_LIBRARY_MAPFILE=''
29333        SET_SHARED_LIBRARY_ORIGIN=''
29334        SET_EXECUTABLE_ORIGIN=''
29335    fi
29336fi
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356# The (cross) compiler is now configured, we can now test capabilities
29357# of the target platform.
29358
29359
29360
29361###############################################################################
29362#
29363# Setup the opt flags for different compilers
29364# and different operating systems.
29365#
29366
29367#
29368# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29369#
29370if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29371    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29372    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29373    CFLAGS="$CFLAGS -mstackrealign"
29374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29375$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29376    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29377/* end confdefs.h.  */
29378int main() { return 0; }
29379_ACEOF
29380if ac_fn_cxx_try_link "$LINENO"; then :
29381
29382		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29383$as_echo "yes" >&6; }
29384
29385else
29386
29387		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29388$as_echo "no" >&6; }
29389	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29390
29391fi
29392rm -f core conftest.err conftest.$ac_objext \
29393    conftest$ac_exeext conftest.$ac_ext
29394fi
29395
29396C_FLAG_DEPS="-MMD -MF"
29397CXX_FLAG_DEPS="-MMD -MF"
29398
29399case $COMPILER_TYPE in
29400  CC )
29401    case $COMPILER_NAME in
29402      gcc )
29403      	case $OPENJDK_TARGET_OS in
29404	  macosx )
29405	    # On MacOSX we optimize for size, something
29406	    # we should do for all platforms?
29407	    C_O_FLAG_HI="-Os"
29408	    C_O_FLAG_NORM="-Os"
29409	    C_O_FLAG_NONE=""
29410	    ;;
29411	  *)
29412	    C_O_FLAG_HI="-O3"
29413	    C_O_FLAG_NORM="-O2"
29414	    C_O_FLAG_NONE="-O0"
29415	    ;;
29416	esac
29417        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29418        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29419        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29420        CFLAGS_DEBUG_SYMBOLS="-g"
29421        CXXFLAGS_DEBUG_SYMBOLS="-g"
29422        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29423            CFLAGS_DEBUG_SYMBOLS="-g1"
29424            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29425        fi
29426        ;;
29427      ossc )
29428        #
29429        # Forte has different names for this with their C++ compiler...
29430        #
29431        C_FLAG_DEPS="-xMMD -xMF"
29432        CXX_FLAG_DEPS="-xMMD -xMF"
29433
29434        # Extra options used with HIGHEST
29435        #
29436        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29437        #          done with care, there are some assumptions below that need to
29438        #          be understood about the use of pointers, and IEEE behavior.
29439        #
29440        # Use non-standard floating point mode (not IEEE 754)
29441        CC_HIGHEST="$CC_HIGHEST -fns"
29442        # Do some simplification of floating point arithmetic (not IEEE 754)
29443        CC_HIGHEST="$CC_HIGHEST -fsimple"
29444        # Use single precision floating point with 'float'
29445        CC_HIGHEST="$CC_HIGHEST -fsingle"
29446        # Assume memory references via basic pointer types do not alias
29447        #   (Source with excessing pointer casting and data access with mixed
29448        #    pointer types are not recommended)
29449        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29450        # Use intrinsic or inline versions for math/std functions
29451        #   (If you expect perfect errno behavior, do not use this)
29452        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29453        # Loop data dependency optimizations (need -xO3 or higher)
29454        CC_HIGHEST="$CC_HIGHEST -xdepend"
29455        # Pointer parameters to functions do not overlap
29456        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29457        #    If you pass in multiple pointers to the same data, do not use this)
29458        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29459        # Inline some library routines
29460        #   (If you expect perfect errno behavior, do not use this)
29461        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29462        # Use optimized math routines
29463        #   (If you expect perfect errno behavior, do not use this)
29464        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29465        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29466
29467        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29468          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29469          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29470        fi
29471
29472        case $OPENJDK_TARGET_CPU_ARCH in
29473          x86)
29474            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29475            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29476            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29477            C_O_FLAG_NONE="-xregs=no%frameptr"
29478            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29479            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29480            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29481            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29482            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29483               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29484               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29485            fi
29486            ;;
29487          sparc)
29488            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29489            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29490            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29491            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29492            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29493            C_O_FLAG_NONE=""
29494            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29495            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29496            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29497            CXX_O_FLAG_NONE=""
29498            ;;
29499        esac
29500
29501    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29502    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29503    esac
29504    ;;
29505  CL )
29506    C_O_FLAG_HIGHEST="-O2"
29507    C_O_FLAG_HI="-O1"
29508    C_O_FLAG_NORM="-O1"
29509    C_O_FLAG_NONE="-Od"
29510    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29511    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29512    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29513    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29514    ;;
29515esac
29516
29517if test -z "$C_O_FLAG_HIGHEST"; then
29518   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29519fi
29520
29521if test -z "$CXX_O_FLAG_HIGHEST"; then
29522   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29523fi
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29539   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29540$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29541fi
29542
29543if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29544   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29545$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29546fi
29547
29548if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29550$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29551fi
29552
29553
29554# Check whether --with-extra-cflags was given.
29555if test "${with_extra_cflags+set}" = set; then :
29556  withval=$with_extra_cflags;
29557fi
29558
29559
29560
29561# Check whether --with-extra-cxxflags was given.
29562if test "${with_extra_cxxflags+set}" = set; then :
29563  withval=$with_extra_cxxflags;
29564fi
29565
29566
29567
29568# Check whether --with-extra-ldflags was given.
29569if test "${with_extra_ldflags+set}" = set; then :
29570  withval=$with_extra_ldflags;
29571fi
29572
29573
29574CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29575CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29576LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29577
29578# Hotspot needs these set in their legacy form
29579LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29580LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29581LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29582
29583
29584
29585
29586
29587###############################################################################
29588#
29589# Now setup the CFLAGS and LDFLAGS for the JDK build.
29590# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29591#
29592case $COMPILER_NAME in
29593      gcc )
29594      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29595                          -pipe \
29596                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29597	  case $OPENJDK_TARGET_CPU_ARCH in
29598	  arm )
29599            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29600	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29601	  ;;
29602	  ppc )
29603            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29604	  ;;
29605	  * )
29606	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29607	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29608          ;;
29609	  esac
29610          ;;
29611      ossc )
29612          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29613          case $OPENJDK_TARGET_CPU_ARCH in
29614          x86 )
29615            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29616       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29617          ;;
29618          esac
29619
29620      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29621      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29622
29623          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29624          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29625          ;;
29626      cl )
29627          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29628               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29629	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29630	       -DWIN32 -DIAL"
29631          case $OPENJDK_TARGET_CPU in
29632              x86 )
29633                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29634                  ;;
29635              x86_64 )
29636                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29637                  ;;
29638          esac
29639          ;;
29640esac
29641
29642###############################################################################
29643
29644# Adjust flags according to debug level.
29645case $DEBUG_LEVEL in
29646      fastdebug )
29647              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29648              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29649	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29650	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29651	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29652	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29653              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29654              ;;
29655      slowdebug )
29656              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29657              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29658	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29659	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29660	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29661	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29662              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29663              ;;
29664esac
29665
29666CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29667
29668# The package path is used only on macosx?
29669PACKAGE_PATH=/opt/local
29670
29671
29672if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29673    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29674    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29675    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29676    #   Note: -Dmacro         is the same as    #define macro 1
29677    #         -Dmacro=	    is the same as    #define macro
29678    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29679        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29680    else
29681        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29682    fi
29683else
29684    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29685fi
29686if test "x$OPENJDK_TARGET_OS" = xlinux; then
29687    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29688fi
29689if test "x$OPENJDK_TARGET_OS" = xwindows; then
29690    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29691fi
29692if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29693    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29694fi
29695if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29696    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29697    # Setting these parameters makes it an error to link to macosx APIs that are
29698    # newer than the given OS version and makes the linked binaries compatible even
29699    # if built on a newer version of the OS.
29700    # The expected format is X.Y.Z
29701    MACOSX_VERSION_MIN=10.7.0
29702
29703    # The macro takes the version with no dots, ex: 1070
29704    # Let the flags variables get resolved in make for easier override on make
29705    # command line.
29706    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29707    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29708fi
29709if test "x$OPENJDK_TARGET_OS" = xbsd; then
29710    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29711fi
29712if test "x$DEBUG_LEVEL" = xrelease; then
29713    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29714    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29715        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29716    fi
29717else
29718    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29719fi
29720
29721CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29722CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29723
29724CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29725        -I${JDK_OUTPUTDIR}/include \
29726        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29727        -I${JDK_TOPDIR}/src/share/javavm/export \
29728        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29729        -I${JDK_TOPDIR}/src/share/native/common \
29730        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29731
29732# The shared libraries are compiled using the picflag.
29733CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29734CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29735
29736# Executable flags
29737CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29738CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29739
29740# Now this is odd. The JDK native libraries have to link against libjvm.so
29741# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29742# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29743# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29744# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29745# libraries will link to whatever is in memory. Yuck.
29746#
29747# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29748if test "x$COMPILER_NAME" = xcl; then
29749    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29750    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29751        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29752    fi
29753    # TODO: make -debug optional "--disable-full-debug-symbols"
29754    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29755    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29756    LDFLAGS_JDKLIB_SUFFIX=""
29757    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29758        LDFLAGS_STACK_SIZE=1048576
29759    else
29760        LDFLAGS_STACK_SIZE=327680
29761    fi
29762    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29763else
29764    if test "x$COMPILER_NAME" = xgcc; then
29765        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29766        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29767        if test -n "$HAS_GNU_HASH"; then
29768            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29769        fi
29770        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29771          # And since we now know that the linker is gnu, then add -z defs, to forbid
29772          # undefined symbols in object files.
29773          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29774          if test "x$DEBUG_LEVEL" = "xrelease"; then
29775              # When building release libraries, tell the linker optimize them.
29776              # Should this be supplied to the OSS linker as well?
29777              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29778          fi
29779        fi
29780    fi
29781    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29782                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29783
29784    # On some platforms (mac) the linker warns about non existing -L dirs.
29785    # Add server first if available. Linking aginst client does not always produce the same results.
29786    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29787    # Default to server for other variants.
29788    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29789        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29790    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29791        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29792    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29793        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29794    else
29795        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29796    fi
29797
29798    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29799    if test "x$COMPILER_NAME" = xossc; then
29800        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29801    fi
29802
29803    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29804    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29805        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29806    fi
29807fi
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823  # Some Zero and Shark settings.
29824  # ZERO_ARCHFLAG tells the compiler which mode to build for
29825  case "${OPENJDK_TARGET_CPU}" in
29826    s390)
29827      ZERO_ARCHFLAG="-m31"
29828      ;;
29829    *)
29830      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29831  esac
29832
29833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29834$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29835  supports=yes
29836
29837  saved_cflags="$CFLAGS"
29838  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29839  ac_ext=c
29840ac_cpp='$CPP $CPPFLAGS'
29841ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29842ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29843ac_compiler_gnu=$ac_cv_c_compiler_gnu
29844
29845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29846/* end confdefs.h.  */
29847
29848    int i;
29849
29850_ACEOF
29851if ac_fn_c_try_compile "$LINENO"; then :
29852
29853else
29854  supports=no
29855fi
29856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29857  ac_ext=cpp
29858ac_cpp='$CXXCPP $CPPFLAGS'
29859ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29860ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29861ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29862
29863  CFLAGS="$saved_cflags"
29864
29865  saved_cxxflags="$CXXFLAGS"
29866  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29867  ac_ext=cpp
29868ac_cpp='$CXXCPP $CPPFLAGS'
29869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29872
29873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29874/* end confdefs.h.  */
29875
29876    int i;
29877
29878_ACEOF
29879if ac_fn_cxx_try_compile "$LINENO"; then :
29880
29881else
29882  supports=no
29883fi
29884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29885  ac_ext=cpp
29886ac_cpp='$CXXCPP $CPPFLAGS'
29887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29890
29891  CXXFLAGS="$saved_cxxflags"
29892
29893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29894$as_echo "$supports" >&6; }
29895  if test "x$supports" = "xyes" ; then
29896    :
29897  else
29898    ZERO_ARCHFLAG=""
29899  fi
29900
29901
29902
29903  # Check that the compiler supports -mX flags
29904  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29905
29906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29907$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29908  supports=yes
29909
29910  saved_cflags="$CFLAGS"
29911  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29912  ac_ext=c
29913ac_cpp='$CPP $CPPFLAGS'
29914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29916ac_compiler_gnu=$ac_cv_c_compiler_gnu
29917
29918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29919/* end confdefs.h.  */
29920
29921    int i;
29922
29923_ACEOF
29924if ac_fn_c_try_compile "$LINENO"; then :
29925
29926else
29927  supports=no
29928fi
29929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29930  ac_ext=cpp
29931ac_cpp='$CXXCPP $CPPFLAGS'
29932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29935
29936  CFLAGS="$saved_cflags"
29937
29938  saved_cxxflags="$CXXFLAGS"
29939  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29940  ac_ext=cpp
29941ac_cpp='$CXXCPP $CPPFLAGS'
29942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29945
29946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29947/* end confdefs.h.  */
29948
29949    int i;
29950
29951_ACEOF
29952if ac_fn_cxx_try_compile "$LINENO"; then :
29953
29954else
29955  supports=no
29956fi
29957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29958  ac_ext=cpp
29959ac_cpp='$CXXCPP $CPPFLAGS'
29960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29963
29964  CXXFLAGS="$saved_cxxflags"
29965
29966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29967$as_echo "$supports" >&6; }
29968  if test "x$supports" = "xyes" ; then
29969    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29970  else
29971    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29972  fi
29973
29974
29975
29976
29977# Setup debug symbols (need objcopy from the toolchain for that)
29978
29979#
29980# ENABLE_DEBUG_SYMBOLS
29981# This must be done after the toolchain is setup, since we're looking at objcopy.
29982#
29983# Check whether --enable-debug-symbols was given.
29984if test "${enable_debug_symbols+set}" = set; then :
29985  enableval=$enable_debug_symbols;
29986fi
29987
29988
29989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29990$as_echo_n "checking if we should generate debug symbols... " >&6; }
29991
29992if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29993   # explicit enabling of enable-debug-symbols and can't find objcopy
29994   #   this is an error
29995   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29996fi
29997
29998if test "x$enable_debug_symbols" = "xyes"; then
29999  ENABLE_DEBUG_SYMBOLS=true
30000elif test "x$enable_debug_symbols" = "xno"; then
30001  ENABLE_DEBUG_SYMBOLS=false
30002else
30003  # default on macosx is false
30004  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30005    ENABLE_DEBUG_SYMBOLS=false
30006  # Default is on if objcopy is found, otherwise off
30007  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
30008    ENABLE_DEBUG_SYMBOLS=true
30009  else
30010    ENABLE_DEBUG_SYMBOLS=false
30011  fi
30012fi
30013
30014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30015$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30016
30017#
30018# ZIP_DEBUGINFO_FILES
30019#
30020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30021$as_echo_n "checking if we should zip debug-info files... " >&6; }
30022# Check whether --enable-zip-debug-info was given.
30023if test "${enable_zip_debug_info+set}" = set; then :
30024  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30025else
30026  enable_zip_debug_info="yes"
30027fi
30028
30029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30030$as_echo "${enable_zip_debug_info}" >&6; }
30031
30032if test "x${enable_zip_debug_info}" = "xno"; then
30033   ZIP_DEBUGINFO_FILES=false
30034else
30035   ZIP_DEBUGINFO_FILES=true
30036fi
30037
30038
30039
30040
30041
30042
30043
30044###############################################################################
30045#
30046# Check dependencies for external and internal libraries.
30047#
30048###############################################################################
30049
30050
30051
30052###############################################################################
30053#
30054# OS specific settings that we never will need to probe.
30055#
30056if test "x$OPENJDK_TARGET_OS" = xlinux; then
30057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30058$as_echo_n "checking what is not needed on Linux?... " >&6; }
30059    PULSE_NOT_NEEDED=yes
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30061$as_echo "pulse" >&6; }
30062fi
30063
30064if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30066$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30067    ALSA_NOT_NEEDED=yes
30068    PULSE_NOT_NEEDED=yes
30069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30070$as_echo "alsa pulse" >&6; }
30071fi
30072
30073if test "x$OPENJDK_TARGET_OS" = xwindows; then
30074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30075$as_echo_n "checking what is not needed on Windows?... " >&6; }
30076    CUPS_NOT_NEEDED=yes
30077    ALSA_NOT_NEEDED=yes
30078    PULSE_NOT_NEEDED=yes
30079    X11_NOT_NEEDED=yes
30080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30081$as_echo "alsa cups pulse x11" >&6; }
30082fi
30083
30084if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30086$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30087    ALSA_NOT_NEEDED=yes
30088    PULSE_NOT_NEEDED=yes
30089    X11_NOT_NEEDED=yes
30090    FREETYPE2_NOT_NEEDED=yes
30091    # If the java runtime framework is disabled, then we need X11.
30092    # This will be adjusted below.
30093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30094$as_echo "alsa pulse x11" >&6; }
30095fi
30096
30097if test "x$OPENJDK_TARGET_OS" = xbsd; then
30098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30099$as_echo_n "checking what is not needed on bsd?... " >&6; }
30100    ALSA_NOT_NEEDED=yes
30101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30102$as_echo "alsa" >&6; }
30103fi
30104
30105if test "x$OPENJDK" = "xfalse"; then
30106    FREETYPE2_NOT_NEEDED=yes
30107fi
30108
30109if test "x$SUPPORT_HEADFUL" = xno; then
30110    X11_NOT_NEEDED=yes
30111fi
30112
30113###############################################################################
30114#
30115# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30116# that uses this API.
30117#
30118# Check whether --enable-macosx-runtime-support was given.
30119if test "${enable_macosx_runtime_support+set}" = set; then :
30120  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30121else
30122  MACOSX_RUNTIME_SUPPORT="no"
30123fi
30124
30125
30126USE_MACOSX_RUNTIME_SUPPORT=no
30127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30128$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30129if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30130    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30131        MACOSX_RUNTIME_SUPPORT=yes
30132        USE_MACOSX_RUNTIME_SUPPORT=yes
30133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30134$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30135    else
30136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30137$as_echo "yes, but explicitly disabled." >&6; }
30138    fi
30139else
30140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30141$as_echo "no" >&6; }
30142fi
30143
30144if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30146$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30147    X11_NOT_NEEDED=
30148    FREETYPE2_NOT_NEEDED=
30149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30150$as_echo "alsa pulse" >&6; }
30151fi
30152
30153
30154
30155###############################################################################
30156#
30157# Check for X Windows
30158#
30159
30160# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30161# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30162# --x-libraries for the sysroot, if that seems to be correct.
30163if test "x$SYS_ROOT" != "x/"; then
30164  if test "x$x_includes" = xNONE; then
30165    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30166      x_includes="$SYS_ROOT/usr/X11R6/include"
30167    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30168      x_includes="$SYS_ROOT/usr/include"
30169    fi
30170  fi
30171  if test "x$x_libraries" = xNONE; then
30172    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30173      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30174    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30175      x_libraries="$SYS_ROOT/usr/lib64"
30176    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30177      x_libraries="$SYS_ROOT/usr/lib"
30178    fi
30179  fi
30180fi
30181
30182# Now let autoconf do it's magic
30183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30184$as_echo_n "checking for X... " >&6; }
30185
30186
30187# Check whether --with-x was given.
30188if test "${with_x+set}" = set; then :
30189  withval=$with_x;
30190fi
30191
30192# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30193if test "x$with_x" = xno; then
30194  # The user explicitly disabled X.
30195  have_x=disabled
30196else
30197  case $x_includes,$x_libraries in #(
30198    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
30199    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30200  $as_echo_n "(cached) " >&6
30201else
30202  # One or both of the vars are not set, and there is no cached value.
30203ac_x_includes=no ac_x_libraries=no
30204rm -f -r conftest.dir
30205if mkdir conftest.dir; then
30206  cd conftest.dir
30207  cat >Imakefile <<'_ACEOF'
30208incroot:
30209	@echo incroot='${INCROOT}'
30210usrlibdir:
30211	@echo usrlibdir='${USRLIBDIR}'
30212libdir:
30213	@echo libdir='${LIBDIR}'
30214_ACEOF
30215  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30216    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30217    for ac_var in incroot usrlibdir libdir; do
30218      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30219    done
30220    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30221    for ac_extension in a so sl dylib la dll; do
30222      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30223	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30224	ac_im_usrlibdir=$ac_im_libdir; break
30225      fi
30226    done
30227    # Screen out bogus values from the imake configuration.  They are
30228    # bogus both because they are the default anyway, and because
30229    # using them would break gcc on systems where it needs fixed includes.
30230    case $ac_im_incroot in
30231	/usr/include) ac_x_includes= ;;
30232	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30233    esac
30234    case $ac_im_usrlibdir in
30235	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30236	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30237    esac
30238  fi
30239  cd ..
30240  rm -f -r conftest.dir
30241fi
30242
30243# Standard set of common directories for X headers.
30244# Check X11 before X11Rn because it is often a symlink to the current release.
30245ac_x_header_dirs='
30246/usr/X11/include
30247/usr/X11R7/include
30248/usr/X11R6/include
30249/usr/X11R5/include
30250/usr/X11R4/include
30251
30252/usr/include/X11
30253/usr/include/X11R7
30254/usr/include/X11R6
30255/usr/include/X11R5
30256/usr/include/X11R4
30257
30258/usr/local/X11/include
30259/usr/local/X11R7/include
30260/usr/local/X11R6/include
30261/usr/local/X11R5/include
30262/usr/local/X11R4/include
30263
30264/usr/local/include/X11
30265/usr/local/include/X11R7
30266/usr/local/include/X11R6
30267/usr/local/include/X11R5
30268/usr/local/include/X11R4
30269
30270/usr/X386/include
30271/usr/x386/include
30272/usr/XFree86/include/X11
30273
30274/usr/include
30275/usr/local/include
30276/usr/unsupported/include
30277/usr/athena/include
30278/usr/local/x11r5/include
30279/usr/lpp/Xamples/include
30280
30281/usr/openwin/include
30282/usr/openwin/share/include'
30283
30284if test "$ac_x_includes" = no; then
30285  # Guess where to find include files, by looking for Xlib.h.
30286  # First, try using that file with no special directory specified.
30287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30288/* end confdefs.h.  */
30289#include <X11/Xlib.h>
30290_ACEOF
30291if ac_fn_cxx_try_cpp "$LINENO"; then :
30292  # We can compile using X headers with no special include directory.
30293ac_x_includes=
30294else
30295  for ac_dir in $ac_x_header_dirs; do
30296  if test -r "$ac_dir/X11/Xlib.h"; then
30297    ac_x_includes=$ac_dir
30298    break
30299  fi
30300done
30301fi
30302rm -f conftest.err conftest.i conftest.$ac_ext
30303fi # $ac_x_includes = no
30304
30305if test "$ac_x_libraries" = no; then
30306  # Check for the libraries.
30307  # See if we find them without any special options.
30308  # Don't add to $LIBS permanently.
30309  ac_save_LIBS=$LIBS
30310  LIBS="-lX11 $LIBS"
30311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30312/* end confdefs.h.  */
30313#include <X11/Xlib.h>
30314int
30315main ()
30316{
30317XrmInitialize ()
30318  ;
30319  return 0;
30320}
30321_ACEOF
30322if ac_fn_cxx_try_link "$LINENO"; then :
30323  LIBS=$ac_save_LIBS
30324# We can link X programs with no special library path.
30325ac_x_libraries=
30326else
30327  LIBS=$ac_save_LIBS
30328for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30329do
30330  # Don't even attempt the hair of trying to link an X program!
30331  for ac_extension in a so sl dylib la dll; do
30332    if test -r "$ac_dir/libX11.$ac_extension"; then
30333      ac_x_libraries=$ac_dir
30334      break 2
30335    fi
30336  done
30337done
30338fi
30339rm -f core conftest.err conftest.$ac_objext \
30340    conftest$ac_exeext conftest.$ac_ext
30341fi # $ac_x_libraries = no
30342
30343case $ac_x_includes,$ac_x_libraries in #(
30344  no,* | *,no | *\'*)
30345    # Didn't find X, or a directory has "'" in its name.
30346    ac_cv_have_x="have_x=no";; #(
30347  *)
30348    # Record where we found X for the cache.
30349    ac_cv_have_x="have_x=yes\
30350	ac_x_includes='$ac_x_includes'\
30351	ac_x_libraries='$ac_x_libraries'"
30352esac
30353fi
30354;; #(
30355    *) have_x=yes;;
30356  esac
30357  eval "$ac_cv_have_x"
30358fi # $with_x != no
30359
30360if test "$have_x" != yes; then
30361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30362$as_echo "$have_x" >&6; }
30363  no_x=yes
30364else
30365  # If each of the values was on the command line, it overrides each guess.
30366  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30367  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30368  # Update the cache value to reflect the command line values.
30369  ac_cv_have_x="have_x=yes\
30370	ac_x_includes='$x_includes'\
30371	ac_x_libraries='$x_libraries'"
30372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30373$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30374fi
30375
30376if test "$no_x" = yes; then
30377  # Not all programs may use this symbol, but it does not hurt to define it.
30378
30379$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30380
30381  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30382else
30383  if test -n "$x_includes"; then
30384    X_CFLAGS="$X_CFLAGS -I$x_includes"
30385  fi
30386
30387  # It would also be nice to do this for all -L options, not just this one.
30388  if test -n "$x_libraries"; then
30389    X_LIBS="$X_LIBS -L$x_libraries"
30390    # For Solaris; some versions of Sun CC require a space after -R and
30391    # others require no space.  Words are not sufficient . . . .
30392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30393$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30394    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30395    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30396    ac_cxx_werror_flag=yes
30397    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398/* end confdefs.h.  */
30399
30400int
30401main ()
30402{
30403
30404  ;
30405  return 0;
30406}
30407_ACEOF
30408if ac_fn_cxx_try_link "$LINENO"; then :
30409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30410$as_echo "no" >&6; }
30411       X_LIBS="$X_LIBS -R$x_libraries"
30412else
30413  LIBS="$ac_xsave_LIBS -R $x_libraries"
30414       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30415/* end confdefs.h.  */
30416
30417int
30418main ()
30419{
30420
30421  ;
30422  return 0;
30423}
30424_ACEOF
30425if ac_fn_cxx_try_link "$LINENO"; then :
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30427$as_echo "yes" >&6; }
30428	  X_LIBS="$X_LIBS -R $x_libraries"
30429else
30430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30431$as_echo "neither works" >&6; }
30432fi
30433rm -f core conftest.err conftest.$ac_objext \
30434    conftest$ac_exeext conftest.$ac_ext
30435fi
30436rm -f core conftest.err conftest.$ac_objext \
30437    conftest$ac_exeext conftest.$ac_ext
30438    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30439    LIBS=$ac_xsave_LIBS
30440  fi
30441
30442  # Check for system-dependent libraries X programs must link with.
30443  # Do this before checking for the system-independent R6 libraries
30444  # (-lICE), since we may need -lsocket or whatever for X linking.
30445
30446  if test "$ISC" = yes; then
30447    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30448  else
30449    # Martyn Johnson says this is needed for Ultrix, if the X
30450    # libraries were built with DECnet support.  And Karl Berry says
30451    # the Alpha needs dnet_stub (dnet does not exist).
30452    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30453    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30454/* end confdefs.h.  */
30455
30456/* Override any GCC internal prototype to avoid an error.
30457   Use char because int might match the return type of a GCC
30458   builtin and then its argument prototype would still apply.  */
30459#ifdef __cplusplus
30460extern "C"
30461#endif
30462char XOpenDisplay ();
30463int
30464main ()
30465{
30466return XOpenDisplay ();
30467  ;
30468  return 0;
30469}
30470_ACEOF
30471if ac_fn_cxx_try_link "$LINENO"; then :
30472
30473else
30474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30475$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30476if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30477  $as_echo_n "(cached) " >&6
30478else
30479  ac_check_lib_save_LIBS=$LIBS
30480LIBS="-ldnet  $LIBS"
30481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30482/* end confdefs.h.  */
30483
30484/* Override any GCC internal prototype to avoid an error.
30485   Use char because int might match the return type of a GCC
30486   builtin and then its argument prototype would still apply.  */
30487#ifdef __cplusplus
30488extern "C"
30489#endif
30490char dnet_ntoa ();
30491int
30492main ()
30493{
30494return dnet_ntoa ();
30495  ;
30496  return 0;
30497}
30498_ACEOF
30499if ac_fn_cxx_try_link "$LINENO"; then :
30500  ac_cv_lib_dnet_dnet_ntoa=yes
30501else
30502  ac_cv_lib_dnet_dnet_ntoa=no
30503fi
30504rm -f core conftest.err conftest.$ac_objext \
30505    conftest$ac_exeext conftest.$ac_ext
30506LIBS=$ac_check_lib_save_LIBS
30507fi
30508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30509$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30510if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30511  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30512fi
30513
30514    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30516$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30517if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30518  $as_echo_n "(cached) " >&6
30519else
30520  ac_check_lib_save_LIBS=$LIBS
30521LIBS="-ldnet_stub  $LIBS"
30522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30523/* end confdefs.h.  */
30524
30525/* Override any GCC internal prototype to avoid an error.
30526   Use char because int might match the return type of a GCC
30527   builtin and then its argument prototype would still apply.  */
30528#ifdef __cplusplus
30529extern "C"
30530#endif
30531char dnet_ntoa ();
30532int
30533main ()
30534{
30535return dnet_ntoa ();
30536  ;
30537  return 0;
30538}
30539_ACEOF
30540if ac_fn_cxx_try_link "$LINENO"; then :
30541  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30542else
30543  ac_cv_lib_dnet_stub_dnet_ntoa=no
30544fi
30545rm -f core conftest.err conftest.$ac_objext \
30546    conftest$ac_exeext conftest.$ac_ext
30547LIBS=$ac_check_lib_save_LIBS
30548fi
30549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30550$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30551if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30552  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30553fi
30554
30555    fi
30556fi
30557rm -f core conftest.err conftest.$ac_objext \
30558    conftest$ac_exeext conftest.$ac_ext
30559    LIBS="$ac_xsave_LIBS"
30560
30561    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30562    # to get the SysV transport functions.
30563    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30564    # needs -lnsl.
30565    # The nsl library prevents programs from opening the X display
30566    # on Irix 5.2, according to T.E. Dickey.
30567    # The functions gethostbyname, getservbyname, and inet_addr are
30568    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30569    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30570if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30571
30572fi
30573
30574    if test $ac_cv_func_gethostbyname = no; then
30575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30576$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30577if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30578  $as_echo_n "(cached) " >&6
30579else
30580  ac_check_lib_save_LIBS=$LIBS
30581LIBS="-lnsl  $LIBS"
30582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30583/* end confdefs.h.  */
30584
30585/* Override any GCC internal prototype to avoid an error.
30586   Use char because int might match the return type of a GCC
30587   builtin and then its argument prototype would still apply.  */
30588#ifdef __cplusplus
30589extern "C"
30590#endif
30591char gethostbyname ();
30592int
30593main ()
30594{
30595return gethostbyname ();
30596  ;
30597  return 0;
30598}
30599_ACEOF
30600if ac_fn_cxx_try_link "$LINENO"; then :
30601  ac_cv_lib_nsl_gethostbyname=yes
30602else
30603  ac_cv_lib_nsl_gethostbyname=no
30604fi
30605rm -f core conftest.err conftest.$ac_objext \
30606    conftest$ac_exeext conftest.$ac_ext
30607LIBS=$ac_check_lib_save_LIBS
30608fi
30609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30610$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30611if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30612  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30613fi
30614
30615      if test $ac_cv_lib_nsl_gethostbyname = no; then
30616	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30617$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30618if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30619  $as_echo_n "(cached) " >&6
30620else
30621  ac_check_lib_save_LIBS=$LIBS
30622LIBS="-lbsd  $LIBS"
30623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30624/* end confdefs.h.  */
30625
30626/* Override any GCC internal prototype to avoid an error.
30627   Use char because int might match the return type of a GCC
30628   builtin and then its argument prototype would still apply.  */
30629#ifdef __cplusplus
30630extern "C"
30631#endif
30632char gethostbyname ();
30633int
30634main ()
30635{
30636return gethostbyname ();
30637  ;
30638  return 0;
30639}
30640_ACEOF
30641if ac_fn_cxx_try_link "$LINENO"; then :
30642  ac_cv_lib_bsd_gethostbyname=yes
30643else
30644  ac_cv_lib_bsd_gethostbyname=no
30645fi
30646rm -f core conftest.err conftest.$ac_objext \
30647    conftest$ac_exeext conftest.$ac_ext
30648LIBS=$ac_check_lib_save_LIBS
30649fi
30650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30651$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30652if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30653  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30654fi
30655
30656      fi
30657    fi
30658
30659    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30660    # socket/setsockopt and other routines are undefined under SCO ODT
30661    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30662    # on later versions), says Simon Leinen: it contains gethostby*
30663    # variants that don't use the name server (or something).  -lsocket
30664    # must be given before -lnsl if both are needed.  We assume that
30665    # if connect needs -lnsl, so does gethostbyname.
30666    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30667if test "x$ac_cv_func_connect" = x""yes; then :
30668
30669fi
30670
30671    if test $ac_cv_func_connect = no; then
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30673$as_echo_n "checking for connect in -lsocket... " >&6; }
30674if test "${ac_cv_lib_socket_connect+set}" = set; then :
30675  $as_echo_n "(cached) " >&6
30676else
30677  ac_check_lib_save_LIBS=$LIBS
30678LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30680/* end confdefs.h.  */
30681
30682/* Override any GCC internal prototype to avoid an error.
30683   Use char because int might match the return type of a GCC
30684   builtin and then its argument prototype would still apply.  */
30685#ifdef __cplusplus
30686extern "C"
30687#endif
30688char connect ();
30689int
30690main ()
30691{
30692return connect ();
30693  ;
30694  return 0;
30695}
30696_ACEOF
30697if ac_fn_cxx_try_link "$LINENO"; then :
30698  ac_cv_lib_socket_connect=yes
30699else
30700  ac_cv_lib_socket_connect=no
30701fi
30702rm -f core conftest.err conftest.$ac_objext \
30703    conftest$ac_exeext conftest.$ac_ext
30704LIBS=$ac_check_lib_save_LIBS
30705fi
30706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30707$as_echo "$ac_cv_lib_socket_connect" >&6; }
30708if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30709  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30710fi
30711
30712    fi
30713
30714    # Guillermo Gomez says -lposix is necessary on A/UX.
30715    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30716if test "x$ac_cv_func_remove" = x""yes; then :
30717
30718fi
30719
30720    if test $ac_cv_func_remove = no; then
30721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30722$as_echo_n "checking for remove in -lposix... " >&6; }
30723if test "${ac_cv_lib_posix_remove+set}" = set; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  ac_check_lib_save_LIBS=$LIBS
30727LIBS="-lposix  $LIBS"
30728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30729/* end confdefs.h.  */
30730
30731/* Override any GCC internal prototype to avoid an error.
30732   Use char because int might match the return type of a GCC
30733   builtin and then its argument prototype would still apply.  */
30734#ifdef __cplusplus
30735extern "C"
30736#endif
30737char remove ();
30738int
30739main ()
30740{
30741return remove ();
30742  ;
30743  return 0;
30744}
30745_ACEOF
30746if ac_fn_cxx_try_link "$LINENO"; then :
30747  ac_cv_lib_posix_remove=yes
30748else
30749  ac_cv_lib_posix_remove=no
30750fi
30751rm -f core conftest.err conftest.$ac_objext \
30752    conftest$ac_exeext conftest.$ac_ext
30753LIBS=$ac_check_lib_save_LIBS
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30756$as_echo "$ac_cv_lib_posix_remove" >&6; }
30757if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30758  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30759fi
30760
30761    fi
30762
30763    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30764    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30765if test "x$ac_cv_func_shmat" = x""yes; then :
30766
30767fi
30768
30769    if test $ac_cv_func_shmat = no; then
30770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30771$as_echo_n "checking for shmat in -lipc... " >&6; }
30772if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30773  $as_echo_n "(cached) " >&6
30774else
30775  ac_check_lib_save_LIBS=$LIBS
30776LIBS="-lipc  $LIBS"
30777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30778/* end confdefs.h.  */
30779
30780/* Override any GCC internal prototype to avoid an error.
30781   Use char because int might match the return type of a GCC
30782   builtin and then its argument prototype would still apply.  */
30783#ifdef __cplusplus
30784extern "C"
30785#endif
30786char shmat ();
30787int
30788main ()
30789{
30790return shmat ();
30791  ;
30792  return 0;
30793}
30794_ACEOF
30795if ac_fn_cxx_try_link "$LINENO"; then :
30796  ac_cv_lib_ipc_shmat=yes
30797else
30798  ac_cv_lib_ipc_shmat=no
30799fi
30800rm -f core conftest.err conftest.$ac_objext \
30801    conftest$ac_exeext conftest.$ac_ext
30802LIBS=$ac_check_lib_save_LIBS
30803fi
30804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30805$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30806if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30807  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30808fi
30809
30810    fi
30811  fi
30812
30813  # Check for libraries that X11R6 Xt/Xaw programs need.
30814  ac_save_LDFLAGS=$LDFLAGS
30815  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30816  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30817  # check for ICE first), but we must link in the order -lSM -lICE or
30818  # we get undefined symbols.  So assume we have SM if we have ICE.
30819  # These have to be linked with before -lX11, unlike the other
30820  # libraries we check for below, so use a different variable.
30821  # John Interrante, Karl Berry
30822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30823$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30824if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30825  $as_echo_n "(cached) " >&6
30826else
30827  ac_check_lib_save_LIBS=$LIBS
30828LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30830/* end confdefs.h.  */
30831
30832/* Override any GCC internal prototype to avoid an error.
30833   Use char because int might match the return type of a GCC
30834   builtin and then its argument prototype would still apply.  */
30835#ifdef __cplusplus
30836extern "C"
30837#endif
30838char IceConnectionNumber ();
30839int
30840main ()
30841{
30842return IceConnectionNumber ();
30843  ;
30844  return 0;
30845}
30846_ACEOF
30847if ac_fn_cxx_try_link "$LINENO"; then :
30848  ac_cv_lib_ICE_IceConnectionNumber=yes
30849else
30850  ac_cv_lib_ICE_IceConnectionNumber=no
30851fi
30852rm -f core conftest.err conftest.$ac_objext \
30853    conftest$ac_exeext conftest.$ac_ext
30854LIBS=$ac_check_lib_save_LIBS
30855fi
30856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30857$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30858if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30859  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30860fi
30861
30862  LDFLAGS=$ac_save_LDFLAGS
30863
30864fi
30865
30866
30867# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30868# this doesn't make sense so we remove it.
30869if test "x$COMPILE_TYPE" = xcross; then
30870  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30871fi
30872
30873if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30874
30875    # Print a helpful message on how to acquire the necessary build dependency.
30876    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30877    MISSING_DEPENDENCY=x11
30878    PKGHANDLER_COMMAND=
30879
30880    case $PKGHANDLER in
30881	apt-get)
30882                apt_help     $MISSING_DEPENDENCY ;;
30883    yum)
30884                yum_help     $MISSING_DEPENDENCY ;;
30885	port)
30886                port_help    $MISSING_DEPENDENCY ;;
30887	pkgutil)
30888                pkgutil_help $MISSING_DEPENDENCY ;;
30889	pkgadd)
30890                pkgadd_help  $MISSING_DEPENDENCY ;;
30891    * )
30892      break ;;
30893    esac
30894
30895    if test "x$PKGHANDLER_COMMAND" != x; then
30896        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30897    fi
30898
30899    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30900fi
30901
30902# Some of the old makefiles require a setting of OPENWIN_HOME
30903# Since the X11R6 directory has disappeared on later Linuxes,
30904# we need to probe for it.
30905if test "x$OPENJDK_TARGET_OS" = xlinux; then
30906    if test -d "$SYS_ROOT/usr/X11R6"; then
30907        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30908    elif test -d "$SYS_ROOT/usr/include/X11"; then
30909        OPENWIN_HOME="$SYS_ROOT/usr"
30910    fi
30911fi
30912if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30913    OPENWIN_HOME="/usr/openwin"
30914fi
30915
30916
30917
30918#
30919# Weird Sol10 something check...TODO change to try compile
30920#
30921if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30922  if test "`uname -r`" = "5.10"; then
30923     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30924     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30925     fi
30926  fi
30927fi
30928
30929ac_ext=c
30930ac_cpp='$CPP $CPPFLAGS'
30931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30933ac_compiler_gnu=$ac_cv_c_compiler_gnu
30934
30935OLD_CFLAGS="$CFLAGS"
30936CFLAGS="$CFLAGS $X_CFLAGS"
30937
30938# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30939for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30940do :
30941  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30942ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30943                   # include <X11/Xutil.h>
30944
30945"
30946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30947  cat >>confdefs.h <<_ACEOF
30948#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30949_ACEOF
30950 X11_A_OK=yes
30951else
30952  X11_A_OK=no; break
30953fi
30954
30955done
30956
30957
30958CFLAGS="$OLD_CFLAGS"
30959ac_ext=cpp
30960ac_cpp='$CXXCPP $CPPFLAGS'
30961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30964
30965
30966if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30967
30968    # Print a helpful message on how to acquire the necessary build dependency.
30969    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30970    MISSING_DEPENDENCY=x11
30971    PKGHANDLER_COMMAND=
30972
30973    case $PKGHANDLER in
30974	apt-get)
30975                apt_help     $MISSING_DEPENDENCY ;;
30976    yum)
30977                yum_help     $MISSING_DEPENDENCY ;;
30978	port)
30979                port_help    $MISSING_DEPENDENCY ;;
30980	pkgutil)
30981                pkgutil_help $MISSING_DEPENDENCY ;;
30982	pkgadd)
30983                pkgadd_help  $MISSING_DEPENDENCY ;;
30984    * )
30985      break ;;
30986    esac
30987
30988    if test "x$PKGHANDLER_COMMAND" != x; then
30989        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30990    fi
30991
30992    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30993fi
30994
30995
30996
30997
30998
30999
31000###############################################################################
31001#
31002# The common unix printing system cups is used to print from java.
31003#
31004
31005# Check whether --with-cups was given.
31006if test "${with_cups+set}" = set; then :
31007  withval=$with_cups;
31008fi
31009
31010
31011# Check whether --with-cups-include was given.
31012if test "${with_cups_include+set}" = set; then :
31013  withval=$with_cups_include;
31014fi
31015
31016
31017if test "x$CUPS_NOT_NEEDED" = xyes; then
31018	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31019		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31020$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31021	fi
31022	CUPS_CFLAGS=
31023else
31024	CUPS_FOUND=no
31025
31026	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31027	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31028	fi
31029
31030	if test "x${with_cups}" != x; then
31031	    CUPS_CFLAGS="-I${with_cups}/include"
31032	    CUPS_FOUND=yes
31033	fi
31034	if test "x${with_cups_include}" != x; then
31035	    CUPS_CFLAGS="-I${with_cups_include}"
31036	    CUPS_FOUND=yes
31037	fi
31038	if test "x$CUPS_FOUND" = xno; then
31039
31040
31041    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31042        # Source the builddeps file again, to make sure it uses the latest variables!
31043        . $builddepsfile
31044        # Look for a target and build machine specific resource!
31045        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31046        if test "x$resource" = x; then
31047            # Ok, lets instead look for a target specific resource
31048            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31049        fi
31050        if test "x$resource" = x; then
31051            # Ok, lets instead look for a build specific resource
31052            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31053        fi
31054        if test "x$resource" = x; then
31055            # Ok, lets instead look for a generic resource
31056            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31057            resource=${builddep_cups}
31058        fi
31059        if test "x$resource" != x; then
31060            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31061$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31062	    # If the resource in the builddeps.conf file is an existing directory,
31063	    # for example /java/linux/cups
31064	    if test -d ${resource}; then
31065	       depdir=${resource}
31066	    else
31067
31068# cups is for example mymodule
31069# $resource is for example libs/general/libmymod_1_2_3.zip
31070# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31071# $with_builddeps_dir is for example /localhome/builddeps
31072# depdir is the name of the variable into which we store the depdir, eg MYMOD
31073# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31074# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31075    filename=`basename $resource`
31076    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31077    filebase=${filename%%.*}
31078    extension=${filename#*.}
31079    installdir=$with_builddeps_dir/$filebase
31080    if test ! -f $installdir/$filename.unpacked; then
31081        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31082$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31083        if test ! -d $installdir; then
31084            mkdir -p $installdir
31085        fi
31086        if test ! -d $installdir; then
31087            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31088        fi
31089        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31090        touch $tmpfile
31091        if test ! -f $tmpfile; then
31092            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31093        fi
31094
31095    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31096    # $tmpfile is the local file name for the downloaded file.
31097    VALID_TOOL=no
31098    if test "x$BDEPS_FTP" = xwget; then
31099       VALID_TOOL=yes
31100       wget -O $tmpfile $with_builddeps_server/$resource
31101    fi
31102    if test "x$BDEPS_FTP" = xlftp; then
31103       VALID_TOOL=yes
31104       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31105    fi
31106    if test "x$BDEPS_FTP" = xftp; then
31107        VALID_TOOL=yes
31108        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31109        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31110        FTPUSERPWD=${FTPSERVER%%@*}
31111        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31112            FTPUSER=${userpwd%%:*}
31113            FTPPWD=${userpwd#*@}
31114            FTPSERVER=${FTPSERVER#*@}
31115        else
31116            FTPUSER=ftp
31117            FTPPWD=ftp
31118        fi
31119        # the "pass" command does not work on some
31120        # ftp clients (read ftp.exe) but if it works,
31121        # passive mode is better!
31122        (\
31123            echo "user $FTPUSER $FTPPWD"        ;\
31124            echo "pass"                         ;\
31125            echo "bin"                          ;\
31126            echo "get $FTPPATH $tmpfile"              ;\
31127        ) | ftp -in $FTPSERVER
31128    fi
31129    if test "x$VALID_TOOL" != xyes; then
31130       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31131    fi
31132
31133        mv $tmpfile $installdir/$filename
31134        if test ! -s $installdir/$filename; then
31135            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31136        fi
31137        case "$extension" in
31138            zip)  echo "Unzipping $installdir/$filename..."
31139               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31140            ;;
31141            tar.gz) echo "Untaring $installdir/$filename..."
31142               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31143            ;;
31144            tgz) echo "Untaring $installdir/$filename..."
31145               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31146            ;;
31147            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31148            ;;
31149        esac
31150    fi
31151    if test -f $installdir/$filename.unpacked; then
31152        depdir=$installdir
31153    fi
31154
31155	    fi
31156            # Source the builddeps file again, because in the previous command, the depdir
31157            # was updated to point at the current build dependency install directory.
31158            . $builddepsfile
31159            # Now extract variables from the builddeps.conf files.
31160            theroot=${builddep_cups_ROOT}
31161            thecflags=${builddep_cups_CFLAGS}
31162            thelibs=${builddep_cups_LIBS}
31163            if test "x$depdir" = x; then
31164                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31165            fi
31166            CUPS=$depdir
31167            if test "x$theroot" != x; then
31168               CUPS="$theroot"
31169            fi
31170            if test "x$thecflags" != x; then
31171               CUPS_CFLAGS="$thecflags"
31172            fi
31173            if test "x$thelibs" != x; then
31174               CUPS_LIBS="$thelibs"
31175            fi
31176            CUPS_FOUND=yes
31177
31178        fi
31179
31180    fi
31181
31182	fi
31183	if test "x$CUPS_FOUND" = xno; then
31184	    # Are the cups headers installed in the default /usr/include location?
31185	    for ac_header in cups/cups.h cups/ppd.h
31186do :
31187  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31188ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31189if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31190  cat >>confdefs.h <<_ACEOF
31191#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31192_ACEOF
31193 CUPS_FOUND=yes
31194	                      CUPS_CFLAGS=
31195	                      DEFAULT_CUPS=yes
31196fi
31197
31198done
31199
31200	fi
31201	if test "x$CUPS_FOUND" = xno; then
31202	    # Getting nervous now? Lets poke around for standard Solaris third-party
31203	    # package installation locations.
31204	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31205$as_echo_n "checking for cups headers... " >&6; }
31206	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31207	       # An SFW package seems to be installed!
31208	       CUPS_FOUND=yes
31209	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31210	    elif test -s /opt/csw/include/cups/cups.h; then
31211	       # A CSW package seems to be installed!
31212	       CUPS_FOUND=yes
31213	       CUPS_CFLAGS="-I/opt/csw/include"
31214	    fi
31215	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31216$as_echo "$CUPS_FOUND" >&6; }
31217	fi
31218	if test "x$CUPS_FOUND" = xno; then
31219
31220    # Print a helpful message on how to acquire the necessary build dependency.
31221    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31222    MISSING_DEPENDENCY=cups
31223    PKGHANDLER_COMMAND=
31224
31225    case $PKGHANDLER in
31226	apt-get)
31227                apt_help     $MISSING_DEPENDENCY ;;
31228    yum)
31229                yum_help     $MISSING_DEPENDENCY ;;
31230	port)
31231                port_help    $MISSING_DEPENDENCY ;;
31232	pkgutil)
31233                pkgutil_help $MISSING_DEPENDENCY ;;
31234	pkgadd)
31235                pkgadd_help  $MISSING_DEPENDENCY ;;
31236    * )
31237      break ;;
31238    esac
31239
31240    if test "x$PKGHANDLER_COMMAND" != x; then
31241        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31242    fi
31243
31244	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31245	fi
31246fi
31247
31248
31249
31250
31251
31252
31253###############################################################################
31254#
31255# The ubiquitous freetype2 library is used to render fonts.
31256#
31257
31258# Check whether --with-freetype was given.
31259if test "${with_freetype+set}" = set; then :
31260  withval=$with_freetype;
31261fi
31262
31263
31264# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31265USING_SYSTEM_FT_LIB=false
31266
31267if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31268	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31269		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31270$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31271	fi
31272	FREETYPE2_CFLAGS=
31273	FREETYPE2_LIBS=
31274        FREETYPE2_LIB_PATH=
31275else
31276	FREETYPE2_FOUND=no
31277
31278	if test "x$with_freetype" != x; then
31279
31280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31281
31282  # Input might be given as Windows format, start by converting to
31283  # unix format.
31284  path="$with_freetype"
31285  new_path=`$CYGPATH -u "$path"`
31286
31287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31290  # "foo.exe" is OK but "foo" is an error.
31291  #
31292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31293  # It is also a way to make sure we got the proper file name for the real test later on.
31294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31295  if test "x$test_shortpath" = x; then
31296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31297$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31298    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31299  fi
31300
31301  # Call helper function which possibly converts this using DOS-style short mode.
31302  # If so, the updated path is stored in $new_path.
31303
31304  input_path="$new_path"
31305  # Check if we need to convert this using DOS-style short mode. If the path
31306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31307  # take no chances and rewrite it.
31308  # Note: m4 eats our [], so we need to use [ and ] instead.
31309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31310  if test "x$has_forbidden_chars" != x; then
31311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31315      # Going to short mode and back again did indeed matter. Since short mode is
31316      # case insensitive, let's make it lowercase to improve readability.
31317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31318      # Now convert it back to Unix-stile (cygpath)
31319      input_path=`$CYGPATH -u "$shortmode_path"`
31320      new_path="$input_path"
31321    fi
31322  fi
31323
31324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31325  if test "x$test_cygdrive_prefix" = x; then
31326    # As a simple fix, exclude /usr/bin since it's not a real path.
31327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31329      # a path prefixed by /cygdrive for fixpath to work.
31330      new_path="$CYGWIN_ROOT_PATH$input_path"
31331    fi
31332  fi
31333
31334
31335  if test "x$path" != "x$new_path"; then
31336    with_freetype="$new_path"
31337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31338$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31339  fi
31340
31341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31342
31343  path="$with_freetype"
31344  has_colon=`$ECHO $path | $GREP ^.:`
31345  new_path="$path"
31346  if test "x$has_colon" = x; then
31347    # Not in mixed or Windows style, start by that.
31348    new_path=`cmd //c echo $path`
31349  fi
31350
31351
31352  input_path="$new_path"
31353  # Check if we need to convert this using DOS-style short mode. If the path
31354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31355  # take no chances and rewrite it.
31356  # Note: m4 eats our [], so we need to use [ and ] instead.
31357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31358  if test "x$has_forbidden_chars" != x; then
31359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31361  fi
31362
31363
31364  windows_path="$new_path"
31365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31366    unix_path=`$CYGPATH -u "$windows_path"`
31367    new_path="$unix_path"
31368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31370    new_path="$unix_path"
31371  fi
31372
31373  if test "x$path" != "x$new_path"; then
31374    with_freetype="$new_path"
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31376$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31377  fi
31378
31379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31381
31382  else
31383    # We're on a posix platform. Hooray! :)
31384    path="$with_freetype"
31385    has_space=`$ECHO "$path" | $GREP " "`
31386    if test "x$has_space" != x; then
31387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31388$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31390    fi
31391
31392    # Use eval to expand a potential ~
31393    eval path="$path"
31394    if test ! -f "$path" && test ! -d "$path"; then
31395      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31396    fi
31397
31398    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31399  fi
31400
31401	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31402            FREETYPE2_LIB_PATH="$with_freetype/lib"
31403            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31404                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31405                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31406            fi
31407            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31408                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31409            fi
31410	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31411            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31412                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31413            fi
31414 	    FREETYPE2_FOUND=yes
31415   	    if test "x$FREETYPE2_FOUND" = xyes; then
31416	        # Verify that the directories exist
31417                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31418		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31419		fi
31420	        # List the contents of the lib.
31421		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31422                if test "x$FREETYPELIB" = x; then
31423		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31424		fi
31425	        # Check one h-file
31426                if ! test -s "$with_freetype/include/ft2build.h"; then
31427		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31428		fi
31429            fi
31430        fi
31431	if test "x$FREETYPE2_FOUND" = xno; then
31432
31433
31434    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31435        # Source the builddeps file again, to make sure it uses the latest variables!
31436        . $builddepsfile
31437        # Look for a target and build machine specific resource!
31438        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31439        if test "x$resource" = x; then
31440            # Ok, lets instead look for a target specific resource
31441            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31442        fi
31443        if test "x$resource" = x; then
31444            # Ok, lets instead look for a build specific resource
31445            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31446        fi
31447        if test "x$resource" = x; then
31448            # Ok, lets instead look for a generic resource
31449            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31450            resource=${builddep_freetype2}
31451        fi
31452        if test "x$resource" != x; then
31453            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31454$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31455	    # If the resource in the builddeps.conf file is an existing directory,
31456	    # for example /java/linux/cups
31457	    if test -d ${resource}; then
31458	       depdir=${resource}
31459	    else
31460
31461# freetype2 is for example mymodule
31462# $resource is for example libs/general/libmymod_1_2_3.zip
31463# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31464# $with_builddeps_dir is for example /localhome/builddeps
31465# depdir is the name of the variable into which we store the depdir, eg MYMOD
31466# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31467# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31468    filename=`basename $resource`
31469    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31470    filebase=${filename%%.*}
31471    extension=${filename#*.}
31472    installdir=$with_builddeps_dir/$filebase
31473    if test ! -f $installdir/$filename.unpacked; then
31474        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31475$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31476        if test ! -d $installdir; then
31477            mkdir -p $installdir
31478        fi
31479        if test ! -d $installdir; then
31480            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31481        fi
31482        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31483        touch $tmpfile
31484        if test ! -f $tmpfile; then
31485            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31486        fi
31487
31488    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31489    # $tmpfile is the local file name for the downloaded file.
31490    VALID_TOOL=no
31491    if test "x$BDEPS_FTP" = xwget; then
31492       VALID_TOOL=yes
31493       wget -O $tmpfile $with_builddeps_server/$resource
31494    fi
31495    if test "x$BDEPS_FTP" = xlftp; then
31496       VALID_TOOL=yes
31497       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31498    fi
31499    if test "x$BDEPS_FTP" = xftp; then
31500        VALID_TOOL=yes
31501        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31502        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31503        FTPUSERPWD=${FTPSERVER%%@*}
31504        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31505            FTPUSER=${userpwd%%:*}
31506            FTPPWD=${userpwd#*@}
31507            FTPSERVER=${FTPSERVER#*@}
31508        else
31509            FTPUSER=ftp
31510            FTPPWD=ftp
31511        fi
31512        # the "pass" command does not work on some
31513        # ftp clients (read ftp.exe) but if it works,
31514        # passive mode is better!
31515        (\
31516            echo "user $FTPUSER $FTPPWD"        ;\
31517            echo "pass"                         ;\
31518            echo "bin"                          ;\
31519            echo "get $FTPPATH $tmpfile"              ;\
31520        ) | ftp -in $FTPSERVER
31521    fi
31522    if test "x$VALID_TOOL" != xyes; then
31523       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31524    fi
31525
31526        mv $tmpfile $installdir/$filename
31527        if test ! -s $installdir/$filename; then
31528            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31529        fi
31530        case "$extension" in
31531            zip)  echo "Unzipping $installdir/$filename..."
31532               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31533            ;;
31534            tar.gz) echo "Untaring $installdir/$filename..."
31535               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31536            ;;
31537            tgz) echo "Untaring $installdir/$filename..."
31538               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31539            ;;
31540            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31541            ;;
31542        esac
31543    fi
31544    if test -f $installdir/$filename.unpacked; then
31545        depdir=$installdir
31546    fi
31547
31548	    fi
31549            # Source the builddeps file again, because in the previous command, the depdir
31550            # was updated to point at the current build dependency install directory.
31551            . $builddepsfile
31552            # Now extract variables from the builddeps.conf files.
31553            theroot=${builddep_freetype2_ROOT}
31554            thecflags=${builddep_freetype2_CFLAGS}
31555            thelibs=${builddep_freetype2_LIBS}
31556            if test "x$depdir" = x; then
31557                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31558            fi
31559            FREETYPE2=$depdir
31560            if test "x$theroot" != x; then
31561               FREETYPE2="$theroot"
31562            fi
31563            if test "x$thecflags" != x; then
31564               FREETYPE2_CFLAGS="$thecflags"
31565            fi
31566            if test "x$thelibs" != x; then
31567               FREETYPE2_LIBS="$thelibs"
31568            fi
31569            FREETYPE2_FOUND=yes
31570            else FREETYPE2_FOUND=no
31571
31572        fi
31573        else FREETYPE2_FOUND=no
31574
31575    fi
31576
31577            USING_SYSTEM_FT_LIB=true
31578	fi
31579	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31580            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31581
31582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31583
31584  # Input might be given as Windows format, start by converting to
31585  # unix format.
31586  path="$FREETYPELOCATION"
31587  new_path=`$CYGPATH -u "$path"`
31588
31589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31592  # "foo.exe" is OK but "foo" is an error.
31593  #
31594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31595  # It is also a way to make sure we got the proper file name for the real test later on.
31596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31597  if test "x$test_shortpath" = x; then
31598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31599$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31600    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31601  fi
31602
31603  # Call helper function which possibly converts this using DOS-style short mode.
31604  # If so, the updated path is stored in $new_path.
31605
31606  input_path="$new_path"
31607  # Check if we need to convert this using DOS-style short mode. If the path
31608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31609  # take no chances and rewrite it.
31610  # Note: m4 eats our [], so we need to use [ and ] instead.
31611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31612  if test "x$has_forbidden_chars" != x; then
31613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31617      # Going to short mode and back again did indeed matter. Since short mode is
31618      # case insensitive, let's make it lowercase to improve readability.
31619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31620      # Now convert it back to Unix-stile (cygpath)
31621      input_path=`$CYGPATH -u "$shortmode_path"`
31622      new_path="$input_path"
31623    fi
31624  fi
31625
31626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31627  if test "x$test_cygdrive_prefix" = x; then
31628    # As a simple fix, exclude /usr/bin since it's not a real path.
31629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31631      # a path prefixed by /cygdrive for fixpath to work.
31632      new_path="$CYGWIN_ROOT_PATH$input_path"
31633    fi
31634  fi
31635
31636
31637  if test "x$path" != "x$new_path"; then
31638    FREETYPELOCATION="$new_path"
31639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31640$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31641  fi
31642
31643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31644
31645  path="$FREETYPELOCATION"
31646  has_colon=`$ECHO $path | $GREP ^.:`
31647  new_path="$path"
31648  if test "x$has_colon" = x; then
31649    # Not in mixed or Windows style, start by that.
31650    new_path=`cmd //c echo $path`
31651  fi
31652
31653
31654  input_path="$new_path"
31655  # Check if we need to convert this using DOS-style short mode. If the path
31656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31657  # take no chances and rewrite it.
31658  # Note: m4 eats our [], so we need to use [ and ] instead.
31659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31660  if test "x$has_forbidden_chars" != x; then
31661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31663  fi
31664
31665
31666  windows_path="$new_path"
31667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31668    unix_path=`$CYGPATH -u "$windows_path"`
31669    new_path="$unix_path"
31670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31672    new_path="$unix_path"
31673  fi
31674
31675  if test "x$path" != "x$new_path"; then
31676    FREETYPELOCATION="$new_path"
31677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31678$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31679  fi
31680
31681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31683
31684  else
31685    # We're on a posix platform. Hooray! :)
31686    path="$FREETYPELOCATION"
31687    has_space=`$ECHO "$path" | $GREP " "`
31688    if test "x$has_space" != x; then
31689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31690$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31692    fi
31693
31694    # Use eval to expand a potential ~
31695    eval path="$path"
31696    if test ! -f "$path" && test ! -d "$path"; then
31697      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31698    fi
31699
31700    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31701  fi
31702
31703	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31704$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31705	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31706	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31707	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31708 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31709                if ! test -s "$FREETYPE2_LIBS"; then
31710		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31711		fi
31712                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31713		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31714		fi
31715                USING_SYSTEM_FT_LIB=true
31716                FREETYPE2_FOUND=yes
31717	    fi
31718	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31719$as_echo "$FREETYPE2_FOUND" >&6; }
31720        fi
31721	if test "x$FREETYPE2_FOUND" = xno; then
31722
31723pkg_failed=no
31724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31725$as_echo_n "checking for FREETYPE2... " >&6; }
31726
31727if test -n "$FREETYPE2_CFLAGS"; then
31728    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31729 elif test -n "$PKG_CONFIG"; then
31730    if test -n "$PKG_CONFIG" && \
31731    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31732  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31733  ac_status=$?
31734  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31735  test $ac_status = 0; }; then
31736  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31737else
31738  pkg_failed=yes
31739fi
31740 else
31741    pkg_failed=untried
31742fi
31743if test -n "$FREETYPE2_LIBS"; then
31744    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31745 elif test -n "$PKG_CONFIG"; then
31746    if test -n "$PKG_CONFIG" && \
31747    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31748  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31749  ac_status=$?
31750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31751  test $ac_status = 0; }; then
31752  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31753else
31754  pkg_failed=yes
31755fi
31756 else
31757    pkg_failed=untried
31758fi
31759
31760
31761
31762if test $pkg_failed = yes; then
31763
31764if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31765        _pkg_short_errors_supported=yes
31766else
31767        _pkg_short_errors_supported=no
31768fi
31769        if test $_pkg_short_errors_supported = yes; then
31770	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31771        else
31772	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31773        fi
31774	# Put the nasty error message in config.log where it belongs
31775	echo "$FREETYPE2_PKG_ERRORS" >&5
31776
31777	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31778$as_echo "no" >&6; }
31779                FREETYPE2_FOUND=no
31780elif test $pkg_failed = untried; then
31781	FREETYPE2_FOUND=no
31782else
31783	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31784	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31786$as_echo "yes" >&6; }
31787	FREETYPE2_FOUND=yes
31788fi
31789            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31790            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31791            USING_SYSTEM_FT_LIB=true
31792            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31793            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31794              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31795            fi
31796	fi
31797	if test "x$FREETYPE2_FOUND" = xno; then
31798	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31799$as_echo_n "checking for freetype in some standard locations... " >&6; }
31800
31801	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31802	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31803	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31804	    fi
31805	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31806	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31807	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31808	    fi
31809
31810	    PREV_CXXCFLAGS="$CXXFLAGS"
31811	    PREV_LDFLAGS="$LDFLAGS"
31812	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31813	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31814	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31815/* end confdefs.h.  */
31816#include<ft2build.h>
31817	                    #include FT_FREETYPE_H
31818	                   int main() { return 0; }
31819
31820_ACEOF
31821if ac_fn_cxx_try_link "$LINENO"; then :
31822
31823	                      # Yes, the default cflags and libs did the trick.
31824	                      FREETYPE2_FOUND=yes
31825	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31826	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31827
31828else
31829
31830	                      FREETYPE2_FOUND=no
31831
31832fi
31833rm -f core conftest.err conftest.$ac_objext \
31834    conftest$ac_exeext conftest.$ac_ext
31835            CXXCFLAGS="$PREV_CXXFLAGS"
31836	    LDFLAGS="$PREV_LDFLAGS"
31837	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31838$as_echo "$FREETYPE2_FOUND" >&6; }
31839            USING_SYSTEM_FT_LIB=true
31840	fi
31841	if test "x$FREETYPE2_FOUND" = xno; then
31842
31843    # Print a helpful message on how to acquire the necessary build dependency.
31844    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31845    MISSING_DEPENDENCY=freetype2
31846    PKGHANDLER_COMMAND=
31847
31848    case $PKGHANDLER in
31849	apt-get)
31850                apt_help     $MISSING_DEPENDENCY ;;
31851    yum)
31852                yum_help     $MISSING_DEPENDENCY ;;
31853	port)
31854                port_help    $MISSING_DEPENDENCY ;;
31855	pkgutil)
31856                pkgutil_help $MISSING_DEPENDENCY ;;
31857	pkgadd)
31858                pkgadd_help  $MISSING_DEPENDENCY ;;
31859    * )
31860      break ;;
31861    esac
31862
31863    if test "x$PKGHANDLER_COMMAND" != x; then
31864        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31865    fi
31866
31867		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31868	fi
31869
31870        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31871            # AC_CHECK_LIB does not support use of cl.exe
31872            PREV_LDFLAGS="$LDFLAGS"
31873            LDFLAGS="$FREETYPE2_LIBS"
31874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31875$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31876if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31877  $as_echo_n "(cached) " >&6
31878else
31879  ac_check_lib_save_LIBS=$LIBS
31880LIBS="-lfreetype  $LIBS"
31881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31882/* end confdefs.h.  */
31883
31884/* Override any GCC internal prototype to avoid an error.
31885   Use char because int might match the return type of a GCC
31886   builtin and then its argument prototype would still apply.  */
31887#ifdef __cplusplus
31888extern "C"
31889#endif
31890char FT_Init_FreeType ();
31891int
31892main ()
31893{
31894return FT_Init_FreeType ();
31895  ;
31896  return 0;
31897}
31898_ACEOF
31899if ac_fn_cxx_try_link "$LINENO"; then :
31900  ac_cv_lib_freetype_FT_Init_FreeType=yes
31901else
31902  ac_cv_lib_freetype_FT_Init_FreeType=no
31903fi
31904rm -f core conftest.err conftest.$ac_objext \
31905    conftest$ac_exeext conftest.$ac_ext
31906LIBS=$ac_check_lib_save_LIBS
31907fi
31908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31909$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31910if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31911  FREETYPE2_FOUND=true
31912else
31913  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31914fi
31915
31916            LDFLAGS="$PREV_LDFLAGS"
31917        fi
31918fi
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928###############################################################################
31929#
31930# Check for alsa headers and libraries. Used on Linux/GNU systems.
31931#
31932
31933# Check whether --with-alsa was given.
31934if test "${with_alsa+set}" = set; then :
31935  withval=$with_alsa;
31936fi
31937
31938
31939# Check whether --with-alsa-include was given.
31940if test "${with_alsa_include+set}" = set; then :
31941  withval=$with_alsa_include;
31942fi
31943
31944
31945# Check whether --with-alsa-lib was given.
31946if test "${with_alsa_lib+set}" = set; then :
31947  withval=$with_alsa_lib;
31948fi
31949
31950
31951if test "x$ALSA_NOT_NEEDED" = xyes; then
31952	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31953		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31954$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31955	fi
31956	ALSA_CFLAGS=
31957	ALSA_LIBS=
31958else
31959	ALSA_FOUND=no
31960
31961	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31962	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31963	fi
31964
31965	if test "x${with_alsa}" != x; then
31966	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31967	    ALSA_CFLAGS="-I${with_alsa}/include"
31968	    ALSA_FOUND=yes
31969	fi
31970	if test "x${with_alsa_include}" != x; then
31971	    ALSA_CFLAGS="-I${with_alsa_include}"
31972	    ALSA_FOUND=yes
31973	fi
31974	if test "x${with_alsa_lib}" != x; then
31975	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31976	    ALSA_FOUND=yes
31977	fi
31978	if test "x$ALSA_FOUND" = xno; then
31979
31980
31981    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31982        # Source the builddeps file again, to make sure it uses the latest variables!
31983        . $builddepsfile
31984        # Look for a target and build machine specific resource!
31985        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31986        if test "x$resource" = x; then
31987            # Ok, lets instead look for a target specific resource
31988            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31989        fi
31990        if test "x$resource" = x; then
31991            # Ok, lets instead look for a build specific resource
31992            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31993        fi
31994        if test "x$resource" = x; then
31995            # Ok, lets instead look for a generic resource
31996            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31997            resource=${builddep_alsa}
31998        fi
31999        if test "x$resource" != x; then
32000            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
32001$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32002	    # If the resource in the builddeps.conf file is an existing directory,
32003	    # for example /java/linux/cups
32004	    if test -d ${resource}; then
32005	       depdir=${resource}
32006	    else
32007
32008# alsa is for example mymodule
32009# $resource is for example libs/general/libmymod_1_2_3.zip
32010# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32011# $with_builddeps_dir is for example /localhome/builddeps
32012# depdir is the name of the variable into which we store the depdir, eg MYMOD
32013# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32014# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32015    filename=`basename $resource`
32016    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32017    filebase=${filename%%.*}
32018    extension=${filename#*.}
32019    installdir=$with_builddeps_dir/$filebase
32020    if test ! -f $installdir/$filename.unpacked; then
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32022$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32023        if test ! -d $installdir; then
32024            mkdir -p $installdir
32025        fi
32026        if test ! -d $installdir; then
32027            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32028        fi
32029        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32030        touch $tmpfile
32031        if test ! -f $tmpfile; then
32032            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32033        fi
32034
32035    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32036    # $tmpfile is the local file name for the downloaded file.
32037    VALID_TOOL=no
32038    if test "x$BDEPS_FTP" = xwget; then
32039       VALID_TOOL=yes
32040       wget -O $tmpfile $with_builddeps_server/$resource
32041    fi
32042    if test "x$BDEPS_FTP" = xlftp; then
32043       VALID_TOOL=yes
32044       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32045    fi
32046    if test "x$BDEPS_FTP" = xftp; then
32047        VALID_TOOL=yes
32048        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32049        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32050        FTPUSERPWD=${FTPSERVER%%@*}
32051        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32052            FTPUSER=${userpwd%%:*}
32053            FTPPWD=${userpwd#*@}
32054            FTPSERVER=${FTPSERVER#*@}
32055        else
32056            FTPUSER=ftp
32057            FTPPWD=ftp
32058        fi
32059        # the "pass" command does not work on some
32060        # ftp clients (read ftp.exe) but if it works,
32061        # passive mode is better!
32062        (\
32063            echo "user $FTPUSER $FTPPWD"        ;\
32064            echo "pass"                         ;\
32065            echo "bin"                          ;\
32066            echo "get $FTPPATH $tmpfile"              ;\
32067        ) | ftp -in $FTPSERVER
32068    fi
32069    if test "x$VALID_TOOL" != xyes; then
32070       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32071    fi
32072
32073        mv $tmpfile $installdir/$filename
32074        if test ! -s $installdir/$filename; then
32075            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32076        fi
32077        case "$extension" in
32078            zip)  echo "Unzipping $installdir/$filename..."
32079               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32080            ;;
32081            tar.gz) echo "Untaring $installdir/$filename..."
32082               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32083            ;;
32084            tgz) echo "Untaring $installdir/$filename..."
32085               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32086            ;;
32087            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32088            ;;
32089        esac
32090    fi
32091    if test -f $installdir/$filename.unpacked; then
32092        depdir=$installdir
32093    fi
32094
32095	    fi
32096            # Source the builddeps file again, because in the previous command, the depdir
32097            # was updated to point at the current build dependency install directory.
32098            . $builddepsfile
32099            # Now extract variables from the builddeps.conf files.
32100            theroot=${builddep_alsa_ROOT}
32101            thecflags=${builddep_alsa_CFLAGS}
32102            thelibs=${builddep_alsa_LIBS}
32103            if test "x$depdir" = x; then
32104                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32105            fi
32106            ALSA=$depdir
32107            if test "x$theroot" != x; then
32108               ALSA="$theroot"
32109            fi
32110            if test "x$thecflags" != x; then
32111               ALSA_CFLAGS="$thecflags"
32112            fi
32113            if test "x$thelibs" != x; then
32114               ALSA_LIBS="$thelibs"
32115            fi
32116            ALSA_FOUND=yes
32117            else ALSA_FOUND=no
32118
32119        fi
32120        else ALSA_FOUND=no
32121
32122    fi
32123
32124	fi
32125	if test "x$ALSA_FOUND" = xno; then
32126
32127pkg_failed=no
32128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32129$as_echo_n "checking for ALSA... " >&6; }
32130
32131if test -n "$ALSA_CFLAGS"; then
32132    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32133 elif test -n "$PKG_CONFIG"; then
32134    if test -n "$PKG_CONFIG" && \
32135    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32136  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32137  ac_status=$?
32138  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32139  test $ac_status = 0; }; then
32140  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32141else
32142  pkg_failed=yes
32143fi
32144 else
32145    pkg_failed=untried
32146fi
32147if test -n "$ALSA_LIBS"; then
32148    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32149 elif test -n "$PKG_CONFIG"; then
32150    if test -n "$PKG_CONFIG" && \
32151    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32152  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32153  ac_status=$?
32154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32155  test $ac_status = 0; }; then
32156  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32157else
32158  pkg_failed=yes
32159fi
32160 else
32161    pkg_failed=untried
32162fi
32163
32164
32165
32166if test $pkg_failed = yes; then
32167
32168if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32169        _pkg_short_errors_supported=yes
32170else
32171        _pkg_short_errors_supported=no
32172fi
32173        if test $_pkg_short_errors_supported = yes; then
32174	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32175        else
32176	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32177        fi
32178	# Put the nasty error message in config.log where it belongs
32179	echo "$ALSA_PKG_ERRORS" >&5
32180
32181	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32182$as_echo "no" >&6; }
32183                ALSA_FOUND=no
32184elif test $pkg_failed = untried; then
32185	ALSA_FOUND=no
32186else
32187	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32188	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32190$as_echo "yes" >&6; }
32191	ALSA_FOUND=yes
32192fi
32193	fi
32194	if test "x$ALSA_FOUND" = xno; then
32195	    for ac_header in alsa/asoundlib.h
32196do :
32197  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32198if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32199  cat >>confdefs.h <<_ACEOF
32200#define HAVE_ALSA_ASOUNDLIB_H 1
32201_ACEOF
32202 ALSA_FOUND=yes
32203	                      ALSA_CFLAGS=-Iignoreme
32204	                      ALSA_LIBS=-lasound
32205	                      DEFAULT_ALSA=yes
32206else
32207  ALSA_FOUND=no
32208fi
32209
32210done
32211
32212	fi
32213	if test "x$ALSA_FOUND" = xno; then
32214
32215    # Print a helpful message on how to acquire the necessary build dependency.
32216    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32217    MISSING_DEPENDENCY=alsa
32218    PKGHANDLER_COMMAND=
32219
32220    case $PKGHANDLER in
32221	apt-get)
32222                apt_help     $MISSING_DEPENDENCY ;;
32223    yum)
32224                yum_help     $MISSING_DEPENDENCY ;;
32225	port)
32226                port_help    $MISSING_DEPENDENCY ;;
32227	pkgutil)
32228                pkgutil_help $MISSING_DEPENDENCY ;;
32229	pkgadd)
32230                pkgadd_help  $MISSING_DEPENDENCY ;;
32231    * )
32232      break ;;
32233    esac
32234
32235    if test "x$PKGHANDLER_COMMAND" != x; then
32236        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32237    fi
32238
32239	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32240	fi
32241fi
32242
32243
32244
32245
32246
32247
32248
32249###############################################################################
32250#
32251# Check for the jpeg library
32252#
32253
32254USE_EXTERNAL_LIBJPEG=true
32255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32256$as_echo_n "checking for main in -ljpeg... " >&6; }
32257if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32258  $as_echo_n "(cached) " >&6
32259else
32260  ac_check_lib_save_LIBS=$LIBS
32261LIBS="-ljpeg  $LIBS"
32262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32263/* end confdefs.h.  */
32264
32265
32266int
32267main ()
32268{
32269return main ();
32270  ;
32271  return 0;
32272}
32273_ACEOF
32274if ac_fn_cxx_try_link "$LINENO"; then :
32275  ac_cv_lib_jpeg_main=yes
32276else
32277  ac_cv_lib_jpeg_main=no
32278fi
32279rm -f core conftest.err conftest.$ac_objext \
32280    conftest$ac_exeext conftest.$ac_ext
32281LIBS=$ac_check_lib_save_LIBS
32282fi
32283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32284$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32285if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32286  cat >>confdefs.h <<_ACEOF
32287#define HAVE_LIBJPEG 1
32288_ACEOF
32289
32290  LIBS="-ljpeg $LIBS"
32291
32292else
32293   USE_EXTERNAL_LIBJPEG=false
32294               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32295$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32296
32297fi
32298
32299
32300
32301###############################################################################
32302#
32303# Check for the gif library
32304#
32305
32306
32307# Check whether --with-giflib was given.
32308if test "${with_giflib+set}" = set; then :
32309  withval=$with_giflib;
32310fi
32311
32312
32313
32314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32315$as_echo_n "checking for which giflib to use... " >&6; }
32316
32317# default is bundled
32318DEFAULT_GIFLIB=bundled
32319
32320#
32321# if user didn't specify, use DEFAULT_GIFLIB
32322#
32323if test "x${with_giflib}" = "x"; then
32324    with_giflib=${DEFAULT_GIFLIB}
32325fi
32326
32327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32328$as_echo "${with_giflib}" >&6; }
32329
32330if test "x${with_giflib}" = "xbundled"; then
32331    USE_EXTERNAL_LIBGIF=false
32332elif test "x${with_giflib}" = "xsystem"; then
32333    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32334if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32335
32336else
32337   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32338fi
32339
32340
32341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32342$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32343if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32344  $as_echo_n "(cached) " >&6
32345else
32346  ac_check_lib_save_LIBS=$LIBS
32347LIBS="-lgif  $LIBS"
32348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32349/* end confdefs.h.  */
32350
32351/* Override any GCC internal prototype to avoid an error.
32352   Use char because int might match the return type of a GCC
32353   builtin and then its argument prototype would still apply.  */
32354#ifdef __cplusplus
32355extern "C"
32356#endif
32357char DGifGetCode ();
32358int
32359main ()
32360{
32361return DGifGetCode ();
32362  ;
32363  return 0;
32364}
32365_ACEOF
32366if ac_fn_cxx_try_link "$LINENO"; then :
32367  ac_cv_lib_gif_DGifGetCode=yes
32368else
32369  ac_cv_lib_gif_DGifGetCode=no
32370fi
32371rm -f core conftest.err conftest.$ac_objext \
32372    conftest$ac_exeext conftest.$ac_ext
32373LIBS=$ac_check_lib_save_LIBS
32374fi
32375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32376$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32377if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32378  cat >>confdefs.h <<_ACEOF
32379#define HAVE_LIBGIF 1
32380_ACEOF
32381
32382  LIBS="-lgif $LIBS"
32383
32384else
32385   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32386fi
32387
32388
32389    USE_EXTERNAL_LIBGIF=true
32390else
32391    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32392fi
32393
32394
32395###############################################################################
32396#
32397# Check for the zlib library
32398#
32399
32400
32401# Check whether --with-zlib was given.
32402if test "${with_zlib+set}" = set; then :
32403  withval=$with_zlib;
32404fi
32405
32406
32407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32408$as_echo_n "checking for compress in -lz... " >&6; }
32409if test "${ac_cv_lib_z_compress+set}" = set; then :
32410  $as_echo_n "(cached) " >&6
32411else
32412  ac_check_lib_save_LIBS=$LIBS
32413LIBS="-lz  $LIBS"
32414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32415/* end confdefs.h.  */
32416
32417/* Override any GCC internal prototype to avoid an error.
32418   Use char because int might match the return type of a GCC
32419   builtin and then its argument prototype would still apply.  */
32420#ifdef __cplusplus
32421extern "C"
32422#endif
32423char compress ();
32424int
32425main ()
32426{
32427return compress ();
32428  ;
32429  return 0;
32430}
32431_ACEOF
32432if ac_fn_cxx_try_link "$LINENO"; then :
32433  ac_cv_lib_z_compress=yes
32434else
32435  ac_cv_lib_z_compress=no
32436fi
32437rm -f core conftest.err conftest.$ac_objext \
32438    conftest$ac_exeext conftest.$ac_ext
32439LIBS=$ac_check_lib_save_LIBS
32440fi
32441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32442$as_echo "$ac_cv_lib_z_compress" >&6; }
32443if test "x$ac_cv_lib_z_compress" = x""yes; then :
32444   ZLIB_FOUND=yes
32445else
32446   ZLIB_FOUND=no
32447fi
32448
32449
32450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32451$as_echo_n "checking for which zlib to use... " >&6; }
32452
32453DEFAULT_ZLIB=bundled
32454if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32455#
32456# On macosx default is system...on others default is
32457#
32458    DEFAULT_ZLIB=system
32459fi
32460
32461if test "x${ZLIB_FOUND}" != "xyes"; then
32462#
32463# If we don't find any system...set default to bundled
32464#
32465    DEFAULT_ZLIB=bundled
32466fi
32467
32468#
32469# If user didn't specify, use DEFAULT_ZLIB
32470#
32471if test "x${with_zlib}" = "x"; then
32472    with_zlib=${DEFAULT_ZLIB}
32473fi
32474
32475if test "x${with_zlib}" = "xbundled"; then
32476    USE_EXTERNAL_LIBZ=false
32477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32478$as_echo "bundled" >&6; }
32479elif test "x${with_zlib}" = "xsystem"; then
32480    if test "x${ZLIB_FOUND}" = "xyes"; then
32481        USE_EXTERNAL_LIBZ=true
32482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32483$as_echo "system" >&6; }
32484    else
32485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32486$as_echo "system not found" >&6; }
32487        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32488    fi
32489else
32490    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32491fi
32492
32493
32494
32495###############################################################################
32496LIBZIP_CAN_USE_MMAP=true
32497
32498
32499
32500###############################################################################
32501#
32502# Check if altzone exists in time.h
32503#
32504
32505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32506/* end confdefs.h.  */
32507#include <time.h>
32508int
32509main ()
32510{
32511return (int)altzone;
32512  ;
32513  return 0;
32514}
32515_ACEOF
32516if ac_fn_cxx_try_link "$LINENO"; then :
32517  has_altzone=yes
32518else
32519  has_altzone=no
32520fi
32521rm -f core conftest.err conftest.$ac_objext \
32522    conftest$ac_exeext conftest.$ac_ext
32523if test "x$has_altzone" = xyes; then
32524
32525$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32526
32527fi
32528
32529###############################################################################
32530#
32531# Check the maths library
32532#
32533
32534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32535$as_echo_n "checking for cos in -lm... " >&6; }
32536if test "${ac_cv_lib_m_cos+set}" = set; then :
32537  $as_echo_n "(cached) " >&6
32538else
32539  ac_check_lib_save_LIBS=$LIBS
32540LIBS="-lm  $LIBS"
32541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32542/* end confdefs.h.  */
32543
32544/* Override any GCC internal prototype to avoid an error.
32545   Use char because int might match the return type of a GCC
32546   builtin and then its argument prototype would still apply.  */
32547#ifdef __cplusplus
32548extern "C"
32549#endif
32550char cos ();
32551int
32552main ()
32553{
32554return cos ();
32555  ;
32556  return 0;
32557}
32558_ACEOF
32559if ac_fn_cxx_try_link "$LINENO"; then :
32560  ac_cv_lib_m_cos=yes
32561else
32562  ac_cv_lib_m_cos=no
32563fi
32564rm -f core conftest.err conftest.$ac_objext \
32565    conftest$ac_exeext conftest.$ac_ext
32566LIBS=$ac_check_lib_save_LIBS
32567fi
32568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32569$as_echo "$ac_cv_lib_m_cos" >&6; }
32570if test "x$ac_cv_lib_m_cos" = x""yes; then :
32571  cat >>confdefs.h <<_ACEOF
32572#define HAVE_LIBM 1
32573_ACEOF
32574
32575  LIBS="-lm $LIBS"
32576
32577else
32578
32579                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32580$as_echo "$as_me: Maths library was not found" >&6;}
32581
32582fi
32583
32584
32585
32586###############################################################################
32587#
32588# Check for libdl.so
32589
32590save_LIBS="$LIBS"
32591LIBS=""
32592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32593$as_echo_n "checking for dlopen in -ldl... " >&6; }
32594if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32595  $as_echo_n "(cached) " >&6
32596else
32597  ac_check_lib_save_LIBS=$LIBS
32598LIBS="-ldl  $LIBS"
32599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32600/* end confdefs.h.  */
32601
32602/* Override any GCC internal prototype to avoid an error.
32603   Use char because int might match the return type of a GCC
32604   builtin and then its argument prototype would still apply.  */
32605#ifdef __cplusplus
32606extern "C"
32607#endif
32608char dlopen ();
32609int
32610main ()
32611{
32612return dlopen ();
32613  ;
32614  return 0;
32615}
32616_ACEOF
32617if ac_fn_cxx_try_link "$LINENO"; then :
32618  ac_cv_lib_dl_dlopen=yes
32619else
32620  ac_cv_lib_dl_dlopen=no
32621fi
32622rm -f core conftest.err conftest.$ac_objext \
32623    conftest$ac_exeext conftest.$ac_ext
32624LIBS=$ac_check_lib_save_LIBS
32625fi
32626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32627$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32628if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32629  cat >>confdefs.h <<_ACEOF
32630#define HAVE_LIBDL 1
32631_ACEOF
32632
32633  LIBS="-ldl $LIBS"
32634
32635fi
32636
32637LIBDL="$LIBS"
32638
32639LIBS="$save_LIBS"
32640
32641
32642
32643###############################################################################
32644#
32645# statically link libstdc++ before C++ ABI is stablized on Linux unless
32646# dynamic build is configured on command line.
32647#
32648
32649# Check whether --with-stdc++lib was given.
32650if test "${with_stdc__lib+set}" = set; then :
32651  withval=$with_stdc__lib;
32652    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32653        && test "x$with_stdc__lib" != xdefault; then
32654      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32655    fi
32656
32657else
32658  with_stdc__lib=default
32659
32660fi
32661
32662
32663if test "x$OPENJDK_TARGET_OS" = xlinux; then
32664    # Test if -lstdc++ works.
32665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32666$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32667    ac_ext=cpp
32668ac_cpp='$CXXCPP $CPPFLAGS'
32669ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32670ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32671ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32672
32673    OLD_CXXFLAGS="$CXXFLAGS"
32674    CXXFLAGS="$CXXFLAGS -lstdc++"
32675    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32676/* end confdefs.h.  */
32677
32678int
32679main ()
32680{
32681return 0;
32682  ;
32683  return 0;
32684}
32685_ACEOF
32686if ac_fn_cxx_try_link "$LINENO"; then :
32687  has_dynamic_libstdcxx=yes
32688else
32689  has_dynamic_libstdcxx=no
32690fi
32691rm -f core conftest.err conftest.$ac_objext \
32692    conftest$ac_exeext conftest.$ac_ext
32693    CXXFLAGS="$OLD_CXXFLAGS"
32694    ac_ext=cpp
32695ac_cpp='$CXXCPP $CPPFLAGS'
32696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32699
32700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32701$as_echo "$has_dynamic_libstdcxx" >&6; }
32702
32703    # Test if stdc++ can be linked statically.
32704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32705$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32706    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32707    ac_ext=cpp
32708ac_cpp='$CXXCPP $CPPFLAGS'
32709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32712
32713    OLD_LIBS="$LIBS"
32714    OLD_CXX="$CXX"
32715    LIBS="$STATIC_STDCXX_FLAGS"
32716    CXX="$CC"
32717    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32718/* end confdefs.h.  */
32719
32720int
32721main ()
32722{
32723return 0;
32724  ;
32725  return 0;
32726}
32727_ACEOF
32728if ac_fn_cxx_try_link "$LINENO"; then :
32729  has_static_libstdcxx=yes
32730else
32731  has_static_libstdcxx=no
32732fi
32733rm -f core conftest.err conftest.$ac_objext \
32734    conftest$ac_exeext conftest.$ac_ext
32735    LIBS="$OLD_LIBS"
32736    CXX="$OLD_CXX"
32737    ac_ext=cpp
32738ac_cpp='$CXXCPP $CPPFLAGS'
32739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32742
32743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32744$as_echo "$has_static_libstdcxx" >&6; }
32745
32746    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32747        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32748    fi
32749
32750    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32751        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32752    fi
32753
32754    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32755        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32756    fi
32757
32758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32759$as_echo_n "checking how to link with libstdc++... " >&6; }
32760    # If dynamic was requested, it's available since it would fail above otherwise.
32761    # If dynamic wasn't requested, go with static unless it isn't available.
32762    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32763        LIBCXX="$LIBCXX -lstdc++"
32764        LDCXX="$CXX"
32765        STATIC_CXX_SETTING="STATIC_CXX=false"
32766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32767$as_echo "dynamic" >&6; }
32768    else
32769        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32770        LDCXX="$CC"
32771        STATIC_CXX_SETTING="STATIC_CXX=true"
32772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32773$as_echo "static" >&6; }
32774    fi
32775fi
32776
32777
32778if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32779    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32780
32781pkg_failed=no
32782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32783$as_echo_n "checking for LIBFFI... " >&6; }
32784
32785if test -n "$LIBFFI_CFLAGS"; then
32786    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32787 elif test -n "$PKG_CONFIG"; then
32788    if test -n "$PKG_CONFIG" && \
32789    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32790  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32791  ac_status=$?
32792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32793  test $ac_status = 0; }; then
32794  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32795else
32796  pkg_failed=yes
32797fi
32798 else
32799    pkg_failed=untried
32800fi
32801if test -n "$LIBFFI_LIBS"; then
32802    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32803 elif test -n "$PKG_CONFIG"; then
32804    if test -n "$PKG_CONFIG" && \
32805    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32806  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32807  ac_status=$?
32808  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32809  test $ac_status = 0; }; then
32810  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32811else
32812  pkg_failed=yes
32813fi
32814 else
32815    pkg_failed=untried
32816fi
32817
32818
32819
32820if test $pkg_failed = yes; then
32821
32822if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32823        _pkg_short_errors_supported=yes
32824else
32825        _pkg_short_errors_supported=no
32826fi
32827        if test $_pkg_short_errors_supported = yes; then
32828	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32829        else
32830	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32831        fi
32832	# Put the nasty error message in config.log where it belongs
32833	echo "$LIBFFI_PKG_ERRORS" >&5
32834
32835	as_fn_error $? "Package requirements (libffi) were not met:
32836
32837$LIBFFI_PKG_ERRORS
32838
32839Consider adjusting the PKG_CONFIG_PATH environment variable if you
32840installed software in a non-standard prefix.
32841
32842Alternatively, you may set the environment variables LIBFFI_CFLAGS
32843and LIBFFI_LIBS to avoid the need to call pkg-config.
32844See the pkg-config man page for more details.
32845" "$LINENO" 5
32846elif test $pkg_failed = untried; then
32847	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32849as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32850is in your PATH or set the PKG_CONFIG environment variable to the full
32851path to pkg-config.
32852
32853Alternatively, you may set the environment variables LIBFFI_CFLAGS
32854and LIBFFI_LIBS to avoid the need to call pkg-config.
32855See the pkg-config man page for more details.
32856
32857To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32858See \`config.log' for more details" "$LINENO" 5 ; }
32859else
32860	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32861	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32863$as_echo "yes" >&6; }
32864	:
32865fi
32866
32867fi
32868
32869if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32870    # Extract the first word of "llvm-config", so it can be a program name with args.
32871set dummy llvm-config; ac_word=$2
32872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32873$as_echo_n "checking for $ac_word... " >&6; }
32874if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32875  $as_echo_n "(cached) " >&6
32876else
32877  if test -n "$LLVM_CONFIG"; then
32878  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32879else
32880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32881for as_dir in $PATH
32882do
32883  IFS=$as_save_IFS
32884  test -z "$as_dir" && as_dir=.
32885    for ac_exec_ext in '' $ac_executable_extensions; do
32886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32887    ac_cv_prog_LLVM_CONFIG="llvm-config"
32888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32889    break 2
32890  fi
32891done
32892  done
32893IFS=$as_save_IFS
32894
32895fi
32896fi
32897LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32898if test -n "$LLVM_CONFIG"; then
32899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32900$as_echo "$LLVM_CONFIG" >&6; }
32901else
32902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32903$as_echo "no" >&6; }
32904fi
32905
32906
32907
32908    if test "x$LLVM_CONFIG" != xllvm-config; then
32909        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32910    fi
32911
32912    llvm_components="jit mcjit engine nativecodegen native"
32913    unset LLVM_CFLAGS
32914    for flag in $("$LLVM_CONFIG" --cxxflags); do
32915      if echo "${flag}" | grep -q '^-[ID]'; then
32916        if test "${flag}" != "-D_DEBUG" ; then
32917          if test "${LLVM_CFLAGS}" != "" ; then
32918            LLVM_CFLAGS="${LLVM_CFLAGS} "
32919          fi
32920          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32921        fi
32922      fi
32923    done
32924    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32925    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32926
32927    unset LLVM_LDFLAGS
32928    for flag in $("${LLVM_CONFIG}" --ldflags); do
32929      if echo "${flag}" | grep -q '^-L'; then
32930        if test "${LLVM_LDFLAGS}" != ""; then
32931          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32932        fi
32933        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32934      fi
32935    done
32936
32937    unset LLVM_LIBS
32938    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32939      if echo "${flag}" | grep -q '^-l'; then
32940        if test "${LLVM_LIBS}" != ""; then
32941          LLVM_LIBS="${LLVM_LIBS} "
32942        fi
32943        LLVM_LIBS="${LLVM_LIBS}${flag}"
32944      fi
32945    done
32946
32947
32948
32949
32950fi
32951
32952# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32953if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32954    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32955fi
32956
32957# TODO better (platform agnostic) test
32958if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32959    LIBCXX="-lstdc++"
32960fi
32961
32962
32963
32964
32965
32966# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32967
32968# When using cygwin or msys, we need a wrapper binary that renames
32969# /cygdrive/c/ arguments into c:/ arguments and peeks into
32970# @files and rewrites these too! This wrapper binary is
32971# called fixpath.
32972FIXPATH=
32973if test "x$OPENJDK_BUILD_OS" = xwindows; then
32974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32975$as_echo_n "checking if fixpath can be created... " >&6; }
32976    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32977    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32978    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32979      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32980      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32981      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32982      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32983    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32984      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32985      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32986
32987      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32988      # @ was chosen as separator to minimize risk of other tools messing around with it
32989      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32990      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32991
32992      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32993    fi
32994    rm -f $OUTPUT_ROOT/fixpath*
32995    cd $OUTPUT_ROOT
32996    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32997    cd $CURDIR
32998
32999    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33001$as_echo "no" >&6; }
33002        cat $OUTPUT_ROOT/fixpath1.log
33003        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
33004    fi
33005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33006$as_echo "yes" >&6; }
33007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
33008$as_echo_n "checking if fixpath.exe works... " >&6; }
33009    cd $OUTPUT_ROOT
33010    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33011    cd $CURDIR
33012    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33014$as_echo "no" >&6; }
33015        cat $OUTPUT_ROOT/fixpath2.log
33016        as_fn_error $? "fixpath did not work!" "$LINENO" 5
33017    fi
33018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33019$as_echo "yes" >&6; }
33020    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33021fi
33022
33023
33024
33025
33026###############################################################################
33027#
33028# We need to do some final tweaking, when everything else is done.
33029#
33030###############################################################################
33031
33032
33033HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33034
33035
33036# The name of the Service Agent jar.
33037SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33038if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33039  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33040fi
33041
33042
33043
33044
33045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33046$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33047
33048if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33049    ENABLE_INTREE_EC=yes
33050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33051$as_echo "yes" >&6; }
33052else
33053    ENABLE_INTREE_EC=no
33054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33055$as_echo "no" >&6; }
33056fi
33057
33058
33059
33060
33061###############################################################################
33062#
33063# Configure parts of the build that only affect the build performance,
33064# not the result.
33065#
33066###############################################################################
33067
33068
33069  # How many cores do we have on this build system?
33070
33071# Check whether --with-num-cores was given.
33072if test "${with_num_cores+set}" = set; then :
33073  withval=$with_num_cores;
33074fi
33075
33076  if test "x$with_num_cores" = x; then
33077    # The number of cores were not specified, try to probe them.
33078
33079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33080$as_echo_n "checking for number of cores... " >&6; }
33081    NUM_CORES=1
33082    FOUND_CORES=no
33083
33084    if test -f /proc/cpuinfo; then
33085        # Looks like a Linux (or cygwin) system
33086        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33087        FOUND_CORES=yes
33088    elif test -x /usr/sbin/psrinfo; then
33089        # Looks like a Solaris system
33090        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33091        FOUND_CORES=yes
33092    elif test -x /usr/sbin/system_profiler; then
33093        # Looks like a MacOSX system
33094        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33095        FOUND_CORES=yes
33096    elif test -n "$NUMBER_OF_PROCESSORS"; then
33097        # On windows, look in the env
33098        NUM_CORES=$NUMBER_OF_PROCESSORS
33099        FOUND_CORES=yes
33100    fi
33101
33102    if test "x$FOUND_CORES" = xyes; then
33103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33104$as_echo "$NUM_CORES" >&6; }
33105    else
33106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33107$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33109$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33110    fi
33111
33112
33113  else
33114    NUM_CORES=$with_num_cores
33115  fi
33116
33117
33118
33119  # How much memory do we have on this build system?
33120
33121# Check whether --with-memory-size was given.
33122if test "${with_memory_size+set}" = set; then :
33123  withval=$with_memory_size;
33124fi
33125
33126  if test "x$with_memory_size" = x; then
33127    # The memory size was not specified, try to probe it.
33128
33129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33130$as_echo_n "checking for memory size... " >&6; }
33131    # Default to 1024 MB
33132    MEMORY_SIZE=1024
33133    FOUND_MEM=no
33134
33135    if test -f /proc/meminfo; then
33136        # Looks like a Linux (or cygwin) system
33137        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33138        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33139        FOUND_MEM=yes
33140    elif test -x /usr/sbin/prtconf; then
33141        # Looks like a Solaris system
33142        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33143        FOUND_MEM=yes
33144    elif test -x /usr/sbin/system_profiler; then
33145        # Looks like a MacOSX system
33146        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33147        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33148        FOUND_MEM=yes
33149    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33150        # Windows, but without cygwin
33151        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33152        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33153        FOUND_MEM=yes
33154    fi
33155
33156    if test "x$FOUND_MEM" = xyes; then
33157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33158$as_echo "$MEMORY_SIZE MB" >&6; }
33159    else
33160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33161$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33163$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33164    fi
33165
33166  else
33167    MEMORY_SIZE=$with_memory_size
33168  fi
33169
33170
33171
33172  # Provide a decent default number of parallel jobs for make depending on
33173  # number of cores, amount of memory and machine architecture.
33174
33175# Check whether --with-jobs was given.
33176if test "${with_jobs+set}" = set; then :
33177  withval=$with_jobs;
33178fi
33179
33180  if test "x$with_jobs" = x; then
33181    # Number of jobs was not specified, calculate.
33182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33183$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33184    # Approximate memory in GB, rounding up a bit.
33185    memory_gb=`expr $MEMORY_SIZE / 1100`
33186    # Pick the lowest of memory in gb and number of cores.
33187    if test "$memory_gb" -lt "$NUM_CORES"; then
33188      JOBS="$memory_gb"
33189    else
33190      JOBS="$NUM_CORES"
33191      # On bigger machines, leave some room for other processes to run
33192      if test "$JOBS" -gt "4"; then
33193        JOBS=`expr $JOBS '*' 90 / 100`
33194      fi
33195    fi
33196    # Cap number of jobs to 16
33197    if test "$JOBS" -gt "16"; then
33198      JOBS=16
33199    fi
33200    if test "$JOBS" -eq "0"; then
33201      JOBS=1
33202    fi
33203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33204$as_echo "$JOBS" >&6; }
33205  else
33206    JOBS=$with_jobs
33207  fi
33208
33209
33210
33211# Setup smart javac (after cores and memory have been setup)
33212
33213
33214# Check whether --with-sjavac-server-java was given.
33215if test "${with_sjavac_server_java+set}" = set; then :
33216  withval=$with_sjavac_server_java;
33217fi
33218
33219
33220if test "x$with_sjavac_server_java" != x; then
33221    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33222    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33223    if test "x$FOUND_VERSION" = x; then
33224        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33225    fi
33226else
33227    SJAVAC_SERVER_JAVA=""
33228    # Hotspot specific options.
33229
33230    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33231    $ECHO "Command: $JAVA -verbosegc -version" >&5
33232    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33233    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33234    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33235    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33236        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33237	JVM_ARG_OK=true
33238    else
33239	$ECHO "Arg failed:" >&5
33240	$ECHO "$OUTPUT" >&5
33241	JVM_ARG_OK=false
33242    fi
33243
33244    # JRockit specific options.
33245
33246    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33247    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33248    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33249    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33250    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33251    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33252        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33253	JVM_ARG_OK=true
33254    else
33255	$ECHO "Arg failed:" >&5
33256	$ECHO "$OUTPUT" >&5
33257	JVM_ARG_OK=false
33258    fi
33259
33260    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33261fi
33262
33263
33264if test "$MEMORY_SIZE" -gt "2500"; then
33265
33266    $ECHO "Check if jvm arg is ok: -d64" >&5
33267    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33268    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33269    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33270    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33271    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33272        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33273	JVM_ARG_OK=true
33274    else
33275	$ECHO "Arg failed:" >&5
33276	$ECHO "$OUTPUT" >&5
33277	JVM_ARG_OK=false
33278    fi
33279
33280    if test "$JVM_ARG_OK" = true; then
33281        JVM_64BIT=true
33282	JVM_ARG_OK=false
33283    fi
33284    fi
33285
33286if test "$JVM_64BIT" = true; then
33287    if test "$MEMORY_SIZE" -gt "17000"; then
33288
33289    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33290    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33291    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33292    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33293    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33294    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33295        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33296	JVM_ARG_OK=true
33297    else
33298	$ECHO "Arg failed:" >&5
33299	$ECHO "$OUTPUT" >&5
33300	JVM_ARG_OK=false
33301    fi
33302
33303    fi
33304    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33305
33306    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33307    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33308    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33309    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33310    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33311    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33312        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33313	JVM_ARG_OK=true
33314    else
33315	$ECHO "Arg failed:" >&5
33316	$ECHO "$OUTPUT" >&5
33317	JVM_ARG_OK=false
33318    fi
33319
33320    fi
33321    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33322
33323    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33324    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33325    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33326    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33327    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33328    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33329        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33330	JVM_ARG_OK=true
33331    else
33332	$ECHO "Arg failed:" >&5
33333	$ECHO "$OUTPUT" >&5
33334	JVM_ARG_OK=false
33335    fi
33336
33337    fi
33338    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33339
33340    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33341    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33342    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33343    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33344    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33345    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33346        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33347	JVM_ARG_OK=true
33348    else
33349	$ECHO "Arg failed:" >&5
33350	$ECHO "$OUTPUT" >&5
33351	JVM_ARG_OK=false
33352    fi
33353
33354    fi
33355fi
33356if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33357
33358    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33359    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33360    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33361    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33362    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33363    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33364        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33365	JVM_ARG_OK=true
33366    else
33367	$ECHO "Arg failed:" >&5
33368	$ECHO "$OUTPUT" >&5
33369	JVM_ARG_OK=false
33370    fi
33371
33372fi
33373if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33374
33375    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33376    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33377    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33378    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33379    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33380    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33381        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33382	JVM_ARG_OK=true
33383    else
33384	$ECHO "Arg failed:" >&5
33385	$ECHO "$OUTPUT" >&5
33386	JVM_ARG_OK=false
33387    fi
33388
33389fi
33390if test "$JVM_ARG_OK" = false; then
33391
33392    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33393    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33394    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33395    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33396    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33397    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33398        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33399	JVM_ARG_OK=true
33400    else
33401	$ECHO "Arg failed:" >&5
33402	$ECHO "$OUTPUT" >&5
33403	JVM_ARG_OK=false
33404    fi
33405
33406fi
33407
33408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33409$as_echo_n "checking whether to use sjavac... " >&6; }
33410# Check whether --enable-sjavac was given.
33411if test "${enable_sjavac+set}" = set; then :
33412  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33413else
33414  ENABLE_SJAVAC='no'
33415fi
33416
33417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33418$as_echo "$ENABLE_SJAVAC" >&6; }
33419
33420
33421if test "x$ENABLE_SJAVAC" = xyes; then
33422    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33423else
33424    SJAVAC_SERVER_DIR=
33425fi
33426
33427
33428
33429
33430# Can the C/C++ compiler use precompiled headers?
33431
33432
33433###############################################################################
33434#
33435# Can the C/C++ compiler use precompiled headers?
33436#
33437# Check whether --enable-precompiled-headers was given.
33438if test "${enable_precompiled_headers+set}" = set; then :
33439  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33440else
33441  ENABLE_PRECOMPH=yes
33442fi
33443
33444
33445USE_PRECOMPILED_HEADER=1
33446if test "x$ENABLE_PRECOMPH" = xno; then
33447    USE_PRECOMPILED_HEADER=0
33448fi
33449
33450if test "x$ENABLE_PRECOMPH" = xyes; then
33451    # Check that the compiler actually supports precomp headers.
33452    if test "x$GCC" = xyes; then
33453         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33454$as_echo_n "checking that precompiled headers work... " >&6; }
33455         echo "int alfa();" > conftest.h
33456         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33457         if test ! -f conftest.hpp.gch; then
33458             USE_PRECOMPILED_HEADER=0
33459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33460$as_echo "no" >&6; }
33461         else
33462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33463$as_echo "yes" >&6; }
33464         fi
33465         rm -f conftest.h conftest.hpp.gch
33466    fi
33467fi
33468
33469
33470
33471
33472# Setup use of ccache, if available
33473
33474    # Check whether --enable-ccache was given.
33475if test "${enable_ccache+set}" = set; then :
33476  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33477else
33478  ENABLE_CCACHE=yes
33479fi
33480
33481    if test "x$ENABLE_CCACHE" = xyes; then
33482        OLD_PATH="$PATH"
33483        if test "x$TOOLS_DIR" != x; then
33484          PATH=$TOOLS_DIR:$PATH
33485        fi
33486        # Extract the first word of "ccache", so it can be a program name with args.
33487set dummy ccache; ac_word=$2
33488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33489$as_echo_n "checking for $ac_word... " >&6; }
33490if test "${ac_cv_path_CCACHE+set}" = set; then :
33491  $as_echo_n "(cached) " >&6
33492else
33493  case $CCACHE in
33494  [\\/]* | ?:[\\/]*)
33495  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33496  ;;
33497  *)
33498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33499for as_dir in $PATH
33500do
33501  IFS=$as_save_IFS
33502  test -z "$as_dir" && as_dir=.
33503    for ac_exec_ext in '' $ac_executable_extensions; do
33504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33505    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33507    break 2
33508  fi
33509done
33510  done
33511IFS=$as_save_IFS
33512
33513  ;;
33514esac
33515fi
33516CCACHE=$ac_cv_path_CCACHE
33517if test -n "$CCACHE"; then
33518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33519$as_echo "$CCACHE" >&6; }
33520else
33521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33522$as_echo "no" >&6; }
33523fi
33524
33525
33526        PATH="$OLD_PATH"
33527    else
33528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33529$as_echo_n "checking for ccache... " >&6; }
33530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33531$as_echo "explicitly disabled" >&6; }
33532        CCACHE=
33533    fi
33534
33535
33536
33537# Check whether --with-ccache-dir was given.
33538if test "${with_ccache_dir+set}" = set; then :
33539  withval=$with_ccache_dir;
33540fi
33541
33542
33543    if test "x$with_ccache_dir" != x; then
33544        # When using a non home ccache directory, assume the use is to share ccache files
33545        # with other users. Thus change the umask.
33546        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33547    fi
33548    CCACHE_FOUND=""
33549    if test "x$CCACHE" != x; then
33550
33551    if test "x$CCACHE" != x; then
33552        CCACHE_FOUND="true"
33553        # Only use ccache if it is 3.1.4 or later, which supports
33554        # precompiled headers.
33555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33556$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33557        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33558        if test "x$HAS_GOOD_CCACHE" = x; then
33559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33560$as_echo "no, disabling ccache" >&6; }
33561            CCACHE=
33562        else
33563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33564$as_echo "yes" >&6; }
33565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33566$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33567            PUSHED_FLAGS="$CXXFLAGS"
33568            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33569            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33570/* end confdefs.h.  */
33571
33572int
33573main ()
33574{
33575
33576  ;
33577  return 0;
33578}
33579_ACEOF
33580if ac_fn_cxx_try_compile "$LINENO"; then :
33581  CC_KNOWS_CCACHE_TRICK=yes
33582else
33583  CC_KNOWS_CCACHE_TRICK=no
33584fi
33585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33586            CXXFLAGS="$PUSHED_FLAGS"
33587            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33588                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33589$as_echo "yes" >&6; }
33590            else
33591                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33592$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33593                CCACHE=
33594            fi
33595        fi
33596    fi
33597
33598    if test "x$CCACHE" != x; then
33599        CCACHE_SLOPPINESS=time_macros
33600        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33601        CCACHE_FLAGS=-fpch-preprocess
33602
33603        if test "x$SET_CCACHE_DIR" != x; then
33604            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33605	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33606        fi
33607    fi
33608
33609    fi
33610
33611
33612###############################################################################
33613#
33614# And now the finish...
33615#
33616###############################################################################
33617
33618# Check for some common pitfalls
33619
33620  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33621    file_to_test="$SRC_ROOT/LICENSE"
33622    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33623      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
33624    fi
33625  fi
33626
33627
33628
33629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33630$as_echo_n "checking if build directory is on local disk... " >&6; }
33631
33632	# df -l lists only local disks; if the given directory is not found then
33633	# a non-zero exit code is given
33634  if test "x$DF" = x; then
33635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33636      # msys does not have df; use Windows "net use" instead.
33637      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33638      if test "x$IS_NETWORK_DISK" = x; then
33639        OUTPUT_DIR_IS_LOCAL="yes"
33640      else
33641        OUTPUT_DIR_IS_LOCAL="no"
33642      fi
33643    else
33644      # No df here, say it's local
33645      OUTPUT_DIR_IS_LOCAL="yes"
33646    fi
33647  else
33648    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33649      OUTPUT_DIR_IS_LOCAL="yes"
33650    else
33651      OUTPUT_DIR_IS_LOCAL="no"
33652    fi
33653  fi
33654
33655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33656$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33657
33658
33659
33660# Check if the user has any old-style ALT_ variables set.
33661FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33662
33663# Before generating output files, test if they exist. If they do, this is a reconfigure.
33664# Since we can't properly handle the dependencies for this, warn the user about the situation
33665if test -e $OUTPUT_ROOT/spec.gmk; then
33666  IS_RECONFIGURE=yes
33667else
33668  IS_RECONFIGURE=no
33669fi
33670
33671if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33672  HIDE_PERFORMANCE_HINTS=yes
33673else
33674  HIDE_PERFORMANCE_HINTS=no
33675  # Hide it the next time around...
33676  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33677fi
33678
33679
33680
33681# At the end, call the custom hook. (Dummy macro if no custom sources available)
33682
33683
33684# We're messing a bit with internal autoconf variables to put the config.status
33685# in the output directory instead of the current directory.
33686CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33687# Create the actual output files. Now the main work of configure is done.
33688cat >confcache <<\_ACEOF
33689# This file is a shell script that caches the results of configure
33690# tests run on this system so they can be shared between configure
33691# scripts and configure runs, see configure's option --config-cache.
33692# It is not useful on other systems.  If it contains results you don't
33693# want to keep, you may remove or edit it.
33694#
33695# config.status only pays attention to the cache file if you give it
33696# the --recheck option to rerun configure.
33697#
33698# `ac_cv_env_foo' variables (set or unset) will be overridden when
33699# loading this file, other *unset* `ac_cv_foo' will be assigned the
33700# following values.
33701
33702_ACEOF
33703
33704# The following way of writing the cache mishandles newlines in values,
33705# but we know of no workaround that is simple, portable, and efficient.
33706# So, we kill variables containing newlines.
33707# Ultrix sh set writes to stderr and can't be redirected directly,
33708# and sets the high bit in the cache file unless we assign to the vars.
33709(
33710  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33711    eval ac_val=\$$ac_var
33712    case $ac_val in #(
33713    *${as_nl}*)
33714      case $ac_var in #(
33715      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33716$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33717      esac
33718      case $ac_var in #(
33719      _ | IFS | as_nl) ;; #(
33720      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33721      *) { eval $ac_var=; unset $ac_var;} ;;
33722      esac ;;
33723    esac
33724  done
33725
33726  (set) 2>&1 |
33727    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33728    *${as_nl}ac_space=\ *)
33729      # `set' does not quote correctly, so add quotes: double-quote
33730      # substitution turns \\\\ into \\, and sed turns \\ into \.
33731      sed -n \
33732	"s/'/'\\\\''/g;
33733	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33734      ;; #(
33735    *)
33736      # `set' quotes correctly as required by POSIX, so do not add quotes.
33737      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33738      ;;
33739    esac |
33740    sort
33741) |
33742  sed '
33743     /^ac_cv_env_/b end
33744     t clear
33745     :clear
33746     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33747     t end
33748     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33749     :end' >>confcache
33750if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33751  if test -w "$cache_file"; then
33752    test "x$cache_file" != "x/dev/null" &&
33753      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33754$as_echo "$as_me: updating cache $cache_file" >&6;}
33755    cat confcache >$cache_file
33756  else
33757    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33758$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33759  fi
33760fi
33761rm -f confcache
33762
33763test "x$prefix" = xNONE && prefix=$ac_default_prefix
33764# Let make expand exec_prefix.
33765test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33766
33767DEFS=-DHAVE_CONFIG_H
33768
33769ac_libobjs=
33770ac_ltlibobjs=
33771U=
33772for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33773  # 1. Remove the extension, and $U if already installed.
33774  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33775  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33776  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33777  #    will be set to the directory where LIBOBJS objects are built.
33778  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33779  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33780done
33781LIBOBJS=$ac_libobjs
33782
33783LTLIBOBJS=$ac_ltlibobjs
33784
33785
33786
33787: ${CONFIG_STATUS=./config.status}
33788ac_write_fail=0
33789ac_clean_files_save=$ac_clean_files
33790ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33791{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33792$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33793as_write_fail=0
33794cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33795#! $SHELL
33796# Generated by $as_me.
33797# Run this file to recreate the current configuration.
33798# Compiler output produced by configure, useful for debugging
33799# configure, is in config.log if it exists.
33800
33801debug=false
33802ac_cs_recheck=false
33803ac_cs_silent=false
33804
33805SHELL=\${CONFIG_SHELL-$SHELL}
33806export SHELL
33807_ASEOF
33808cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33809## -------------------- ##
33810## M4sh Initialization. ##
33811## -------------------- ##
33812
33813# Be more Bourne compatible
33814DUALCASE=1; export DUALCASE # for MKS sh
33815if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33816  emulate sh
33817  NULLCMD=:
33818  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33819  # is contrary to our usage.  Disable this feature.
33820  alias -g '${1+"$@"}'='"$@"'
33821  setopt NO_GLOB_SUBST
33822else
33823  case `(set -o) 2>/dev/null` in #(
33824  *posix*) :
33825    set -o posix ;; #(
33826  *) :
33827     ;;
33828esac
33829fi
33830
33831
33832as_nl='
33833'
33834export as_nl
33835# Printing a long string crashes Solaris 7 /usr/bin/printf.
33836as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33837as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33839# Prefer a ksh shell builtin over an external printf program on Solaris,
33840# but without wasting forks for bash or zsh.
33841if test -z "$BASH_VERSION$ZSH_VERSION" \
33842    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33843  as_echo='print -r --'
33844  as_echo_n='print -rn --'
33845elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33846  as_echo='printf %s\n'
33847  as_echo_n='printf %s'
33848else
33849  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33850    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33851    as_echo_n='/usr/ucb/echo -n'
33852  else
33853    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33854    as_echo_n_body='eval
33855      arg=$1;
33856      case $arg in #(
33857      *"$as_nl"*)
33858	expr "X$arg" : "X\\(.*\\)$as_nl";
33859	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33860      esac;
33861      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33862    '
33863    export as_echo_n_body
33864    as_echo_n='sh -c $as_echo_n_body as_echo'
33865  fi
33866  export as_echo_body
33867  as_echo='sh -c $as_echo_body as_echo'
33868fi
33869
33870# The user is always right.
33871if test "${PATH_SEPARATOR+set}" != set; then
33872  PATH_SEPARATOR=:
33873  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33874    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33875      PATH_SEPARATOR=';'
33876  }
33877fi
33878
33879
33880# IFS
33881# We need space, tab and new line, in precisely that order.  Quoting is
33882# there to prevent editors from complaining about space-tab.
33883# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33884# splitting by setting IFS to empty value.)
33885IFS=" ""	$as_nl"
33886
33887# Find who we are.  Look in the path if we contain no directory separator.
33888case $0 in #((
33889  *[\\/]* ) as_myself=$0 ;;
33890  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33891for as_dir in $PATH
33892do
33893  IFS=$as_save_IFS
33894  test -z "$as_dir" && as_dir=.
33895    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33896  done
33897IFS=$as_save_IFS
33898
33899     ;;
33900esac
33901# We did not find ourselves, most probably we were run as `sh COMMAND'
33902# in which case we are not to be found in the path.
33903if test "x$as_myself" = x; then
33904  as_myself=$0
33905fi
33906if test ! -f "$as_myself"; then
33907  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33908  exit 1
33909fi
33910
33911# Unset variables that we do not need and which cause bugs (e.g. in
33912# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33913# suppresses any "Segmentation fault" message there.  '((' could
33914# trigger a bug in pdksh 5.2.14.
33915for as_var in BASH_ENV ENV MAIL MAILPATH
33916do eval test x\${$as_var+set} = xset \
33917  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33918done
33919PS1='$ '
33920PS2='> '
33921PS4='+ '
33922
33923# NLS nuisances.
33924LC_ALL=C
33925export LC_ALL
33926LANGUAGE=C
33927export LANGUAGE
33928
33929# CDPATH.
33930(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33931
33932
33933# as_fn_error STATUS ERROR [LINENO LOG_FD]
33934# ----------------------------------------
33935# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33936# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33937# script with STATUS, using 1 if that was 0.
33938as_fn_error ()
33939{
33940  as_status=$1; test $as_status -eq 0 && as_status=1
33941  if test "$4"; then
33942    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33943    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33944  fi
33945  $as_echo "$as_me: error: $2" >&2
33946  as_fn_exit $as_status
33947} # as_fn_error
33948
33949
33950# as_fn_set_status STATUS
33951# -----------------------
33952# Set $? to STATUS, without forking.
33953as_fn_set_status ()
33954{
33955  return $1
33956} # as_fn_set_status
33957
33958# as_fn_exit STATUS
33959# -----------------
33960# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33961as_fn_exit ()
33962{
33963  set +e
33964  as_fn_set_status $1
33965  exit $1
33966} # as_fn_exit
33967
33968# as_fn_unset VAR
33969# ---------------
33970# Portably unset VAR.
33971as_fn_unset ()
33972{
33973  { eval $1=; unset $1;}
33974}
33975as_unset=as_fn_unset
33976# as_fn_append VAR VALUE
33977# ----------------------
33978# Append the text in VALUE to the end of the definition contained in VAR. Take
33979# advantage of any shell optimizations that allow amortized linear growth over
33980# repeated appends, instead of the typical quadratic growth present in naive
33981# implementations.
33982if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33983  eval 'as_fn_append ()
33984  {
33985    eval $1+=\$2
33986  }'
33987else
33988  as_fn_append ()
33989  {
33990    eval $1=\$$1\$2
33991  }
33992fi # as_fn_append
33993
33994# as_fn_arith ARG...
33995# ------------------
33996# Perform arithmetic evaluation on the ARGs, and store the result in the
33997# global $as_val. Take advantage of shells that can avoid forks. The arguments
33998# must be portable across $(()) and expr.
33999if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34000  eval 'as_fn_arith ()
34001  {
34002    as_val=$(( $* ))
34003  }'
34004else
34005  as_fn_arith ()
34006  {
34007    as_val=`expr "$@" || test $? -eq 1`
34008  }
34009fi # as_fn_arith
34010
34011
34012if expr a : '\(a\)' >/dev/null 2>&1 &&
34013   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34014  as_expr=expr
34015else
34016  as_expr=false
34017fi
34018
34019if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34020  as_basename=basename
34021else
34022  as_basename=false
34023fi
34024
34025if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34026  as_dirname=dirname
34027else
34028  as_dirname=false
34029fi
34030
34031as_me=`$as_basename -- "$0" ||
34032$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34033	 X"$0" : 'X\(//\)$' \| \
34034	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34035$as_echo X/"$0" |
34036    sed '/^.*\/\([^/][^/]*\)\/*$/{
34037	    s//\1/
34038	    q
34039	  }
34040	  /^X\/\(\/\/\)$/{
34041	    s//\1/
34042	    q
34043	  }
34044	  /^X\/\(\/\).*/{
34045	    s//\1/
34046	    q
34047	  }
34048	  s/.*/./; q'`
34049
34050# Avoid depending upon Character Ranges.
34051as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34052as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34053as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34054as_cr_digits='0123456789'
34055as_cr_alnum=$as_cr_Letters$as_cr_digits
34056
34057ECHO_C= ECHO_N= ECHO_T=
34058case `echo -n x` in #(((((
34059-n*)
34060  case `echo 'xy\c'` in
34061  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34062  xy)  ECHO_C='\c';;
34063  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34064       ECHO_T='	';;
34065  esac;;
34066*)
34067  ECHO_N='-n';;
34068esac
34069
34070rm -f conf$$ conf$$.exe conf$$.file
34071if test -d conf$$.dir; then
34072  rm -f conf$$.dir/conf$$.file
34073else
34074  rm -f conf$$.dir
34075  mkdir conf$$.dir 2>/dev/null
34076fi
34077if (echo >conf$$.file) 2>/dev/null; then
34078  if ln -s conf$$.file conf$$ 2>/dev/null; then
34079    as_ln_s='ln -s'
34080    # ... but there are two gotchas:
34081    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34082    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34083    # In both cases, we have to default to `cp -p'.
34084    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34085      as_ln_s='cp -p'
34086  elif ln conf$$.file conf$$ 2>/dev/null; then
34087    as_ln_s=ln
34088  else
34089    as_ln_s='cp -p'
34090  fi
34091else
34092  as_ln_s='cp -p'
34093fi
34094rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34095rmdir conf$$.dir 2>/dev/null
34096
34097
34098# as_fn_mkdir_p
34099# -------------
34100# Create "$as_dir" as a directory, including parents if necessary.
34101as_fn_mkdir_p ()
34102{
34103
34104  case $as_dir in #(
34105  -*) as_dir=./$as_dir;;
34106  esac
34107  test -d "$as_dir" || eval $as_mkdir_p || {
34108    as_dirs=
34109    while :; do
34110      case $as_dir in #(
34111      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34112      *) as_qdir=$as_dir;;
34113      esac
34114      as_dirs="'$as_qdir' $as_dirs"
34115      as_dir=`$as_dirname -- "$as_dir" ||
34116$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34117	 X"$as_dir" : 'X\(//\)[^/]' \| \
34118	 X"$as_dir" : 'X\(//\)$' \| \
34119	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34120$as_echo X"$as_dir" |
34121    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34122	    s//\1/
34123	    q
34124	  }
34125	  /^X\(\/\/\)[^/].*/{
34126	    s//\1/
34127	    q
34128	  }
34129	  /^X\(\/\/\)$/{
34130	    s//\1/
34131	    q
34132	  }
34133	  /^X\(\/\).*/{
34134	    s//\1/
34135	    q
34136	  }
34137	  s/.*/./; q'`
34138      test -d "$as_dir" && break
34139    done
34140    test -z "$as_dirs" || eval "mkdir $as_dirs"
34141  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34142
34143
34144} # as_fn_mkdir_p
34145if mkdir -p . 2>/dev/null; then
34146  as_mkdir_p='mkdir -p "$as_dir"'
34147else
34148  test -d ./-p && rmdir ./-p
34149  as_mkdir_p=false
34150fi
34151
34152if test -x / >/dev/null 2>&1; then
34153  as_test_x='test -x'
34154else
34155  if ls -dL / >/dev/null 2>&1; then
34156    as_ls_L_option=L
34157  else
34158    as_ls_L_option=
34159  fi
34160  as_test_x='
34161    eval sh -c '\''
34162      if test -d "$1"; then
34163	test -d "$1/.";
34164      else
34165	case $1 in #(
34166	-*)set "./$1";;
34167	esac;
34168	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34169	???[sx]*):;;*)false;;esac;fi
34170    '\'' sh
34171  '
34172fi
34173as_executable_p=$as_test_x
34174
34175# Sed expression to map a string onto a valid CPP name.
34176as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34177
34178# Sed expression to map a string onto a valid variable name.
34179as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34180
34181
34182exec 6>&1
34183## ----------------------------------- ##
34184## Main body of $CONFIG_STATUS script. ##
34185## ----------------------------------- ##
34186_ASEOF
34187test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34188
34189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34190# Save the log message, to keep $0 and so on meaningful, and to
34191# report actual input values of CONFIG_FILES etc. instead of their
34192# values after options handling.
34193ac_log="
34194This file was extended by OpenJDK $as_me jdk8, which was
34195generated by GNU Autoconf 2.67.  Invocation command line was
34196
34197  CONFIG_FILES    = $CONFIG_FILES
34198  CONFIG_HEADERS  = $CONFIG_HEADERS
34199  CONFIG_LINKS    = $CONFIG_LINKS
34200  CONFIG_COMMANDS = $CONFIG_COMMANDS
34201  $ $0 $@
34202
34203on `(hostname || uname -n) 2>/dev/null | sed 1q`
34204"
34205
34206_ACEOF
34207
34208case $ac_config_files in *"
34209"*) set x $ac_config_files; shift; ac_config_files=$*;;
34210esac
34211
34212case $ac_config_headers in *"
34213"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34214esac
34215
34216
34217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34218# Files that config.status was made for.
34219config_files="$ac_config_files"
34220config_headers="$ac_config_headers"
34221
34222_ACEOF
34223
34224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34225ac_cs_usage="\
34226\`$as_me' instantiates files and other configuration actions
34227from templates according to the current configuration.  Unless the files
34228and actions are specified as TAGs, all are instantiated by default.
34229
34230Usage: $0 [OPTION]... [TAG]...
34231
34232  -h, --help       print this help, then exit
34233  -V, --version    print version number and configuration settings, then exit
34234      --config     print configuration, then exit
34235  -q, --quiet, --silent
34236                   do not print progress messages
34237  -d, --debug      don't remove temporary files
34238      --recheck    update $as_me by reconfiguring in the same conditions
34239      --file=FILE[:TEMPLATE]
34240                   instantiate the configuration file FILE
34241      --header=FILE[:TEMPLATE]
34242                   instantiate the configuration header FILE
34243
34244Configuration files:
34245$config_files
34246
34247Configuration headers:
34248$config_headers
34249
34250Report bugs to <build-dev@openjdk.java.net>.
34251OpenJDK home page: <http://openjdk.java.net>."
34252
34253_ACEOF
34254cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34255ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34256ac_cs_version="\\
34257OpenJDK config.status jdk8
34258configured by $0, generated by GNU Autoconf 2.67,
34259  with options \\"\$ac_cs_config\\"
34260
34261Copyright (C) 2010 Free Software Foundation, Inc.
34262This config.status script is free software; the Free Software Foundation
34263gives unlimited permission to copy, distribute and modify it."
34264
34265ac_pwd='$ac_pwd'
34266srcdir='$srcdir'
34267AWK='$AWK'
34268test -n "\$AWK" || AWK=awk
34269_ACEOF
34270
34271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34272# The default lists apply if the user does not specify any file.
34273ac_need_defaults=:
34274while test $# != 0
34275do
34276  case $1 in
34277  --*=?*)
34278    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34279    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34280    ac_shift=:
34281    ;;
34282  --*=)
34283    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34284    ac_optarg=
34285    ac_shift=:
34286    ;;
34287  *)
34288    ac_option=$1
34289    ac_optarg=$2
34290    ac_shift=shift
34291    ;;
34292  esac
34293
34294  case $ac_option in
34295  # Handling of the options.
34296  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34297    ac_cs_recheck=: ;;
34298  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34299    $as_echo "$ac_cs_version"; exit ;;
34300  --config | --confi | --conf | --con | --co | --c )
34301    $as_echo "$ac_cs_config"; exit ;;
34302  --debug | --debu | --deb | --de | --d | -d )
34303    debug=: ;;
34304  --file | --fil | --fi | --f )
34305    $ac_shift
34306    case $ac_optarg in
34307    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34308    '') as_fn_error $? "missing file argument" ;;
34309    esac
34310    as_fn_append CONFIG_FILES " '$ac_optarg'"
34311    ac_need_defaults=false;;
34312  --header | --heade | --head | --hea )
34313    $ac_shift
34314    case $ac_optarg in
34315    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34316    esac
34317    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34318    ac_need_defaults=false;;
34319  --he | --h)
34320    # Conflict between --help and --header
34321    as_fn_error $? "ambiguous option: \`$1'
34322Try \`$0 --help' for more information.";;
34323  --help | --hel | -h )
34324    $as_echo "$ac_cs_usage"; exit ;;
34325  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34326  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34327    ac_cs_silent=: ;;
34328
34329  # This is an error.
34330  -*) as_fn_error $? "unrecognized option: \`$1'
34331Try \`$0 --help' for more information." ;;
34332
34333  *) as_fn_append ac_config_targets " $1"
34334     ac_need_defaults=false ;;
34335
34336  esac
34337  shift
34338done
34339
34340ac_configure_extra_args=
34341
34342if $ac_cs_silent; then
34343  exec 6>/dev/null
34344  ac_configure_extra_args="$ac_configure_extra_args --silent"
34345fi
34346
34347_ACEOF
34348cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34349if \$ac_cs_recheck; then
34350  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34351  shift
34352  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34353  CONFIG_SHELL='$SHELL'
34354  export CONFIG_SHELL
34355  exec "\$@"
34356fi
34357
34358_ACEOF
34359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34360exec 5>>config.log
34361{
34362  echo
34363  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34364## Running $as_me. ##
34365_ASBOX
34366  $as_echo "$ac_log"
34367} >&5
34368
34369_ACEOF
34370cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34371_ACEOF
34372
34373cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34374
34375# Handling of arguments.
34376for ac_config_target in $ac_config_targets
34377do
34378  case $ac_config_target in
34379    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34380    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34381    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34382    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34383    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34384    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34385    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34386
34387  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34388  esac
34389done
34390
34391
34392# If the user did not use the arguments to specify the items to instantiate,
34393# then the envvar interface is used.  Set only those that are not.
34394# We use the long form for the default assignment because of an extremely
34395# bizarre bug on SunOS 4.1.3.
34396if $ac_need_defaults; then
34397  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34398  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34399fi
34400
34401# Have a temporary directory for convenience.  Make it in the build tree
34402# simply because there is no reason against having it here, and in addition,
34403# creating and moving files from /tmp can sometimes cause problems.
34404# Hook for its removal unless debugging.
34405# Note that there is a small window in which the directory will not be cleaned:
34406# after its creation but before its name has been assigned to `$tmp'.
34407$debug ||
34408{
34409  tmp=
34410  trap 'exit_status=$?
34411  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34412' 0
34413  trap 'as_fn_exit 1' 1 2 13 15
34414}
34415# Create a (secure) tmp directory for tmp files.
34416
34417{
34418  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34419  test -n "$tmp" && test -d "$tmp"
34420}  ||
34421{
34422  tmp=./conf$$-$RANDOM
34423  (umask 077 && mkdir "$tmp")
34424} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34425
34426# Set up the scripts for CONFIG_FILES section.
34427# No need to generate them if there are no CONFIG_FILES.
34428# This happens for instance with `./config.status config.h'.
34429if test -n "$CONFIG_FILES"; then
34430
34431
34432ac_cr=`echo X | tr X '\015'`
34433# On cygwin, bash can eat \r inside `` if the user requested igncr.
34434# But we know of no other shell where ac_cr would be empty at this
34435# point, so we can use a bashism as a fallback.
34436if test "x$ac_cr" = x; then
34437  eval ac_cr=\$\'\\r\'
34438fi
34439ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34440if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34441  ac_cs_awk_cr='\\r'
34442else
34443  ac_cs_awk_cr=$ac_cr
34444fi
34445
34446echo 'BEGIN {' >"$tmp/subs1.awk" &&
34447_ACEOF
34448
34449
34450{
34451  echo "cat >conf$$subs.awk <<_ACEOF" &&
34452  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34453  echo "_ACEOF"
34454} >conf$$subs.sh ||
34455  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34456ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34457ac_delim='%!_!# '
34458for ac_last_try in false false false false false :; do
34459  . ./conf$$subs.sh ||
34460    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34461
34462  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34463  if test $ac_delim_n = $ac_delim_num; then
34464    break
34465  elif $ac_last_try; then
34466    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34467  else
34468    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34469  fi
34470done
34471rm -f conf$$subs.sh
34472
34473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34474cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34475_ACEOF
34476sed -n '
34477h
34478s/^/S["/; s/!.*/"]=/
34479p
34480g
34481s/^[^!]*!//
34482:repl
34483t repl
34484s/'"$ac_delim"'$//
34485t delim
34486:nl
34487h
34488s/\(.\{148\}\)..*/\1/
34489t more1
34490s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34491p
34492n
34493b repl
34494:more1
34495s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34496p
34497g
34498s/.\{148\}//
34499t nl
34500:delim
34501h
34502s/\(.\{148\}\)..*/\1/
34503t more2
34504s/["\\]/\\&/g; s/^/"/; s/$/"/
34505p
34506b
34507:more2
34508s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34509p
34510g
34511s/.\{148\}//
34512t delim
34513' <conf$$subs.awk | sed '
34514/^[^""]/{
34515  N
34516  s/\n//
34517}
34518' >>$CONFIG_STATUS || ac_write_fail=1
34519rm -f conf$$subs.awk
34520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34521_ACAWK
34522cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34523  for (key in S) S_is_set[key] = 1
34524  FS = ""
34525
34526}
34527{
34528  line = $ 0
34529  nfields = split(line, field, "@")
34530  substed = 0
34531  len = length(field[1])
34532  for (i = 2; i < nfields; i++) {
34533    key = field[i]
34534    keylen = length(key)
34535    if (S_is_set[key]) {
34536      value = S[key]
34537      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34538      len += length(value) + length(field[++i])
34539      substed = 1
34540    } else
34541      len += 1 + keylen
34542  }
34543
34544  print line
34545}
34546
34547_ACAWK
34548_ACEOF
34549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34550if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34551  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34552else
34553  cat
34554fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34555  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34556_ACEOF
34557
34558# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34559# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34560# trailing colons and then remove the whole line if VPATH becomes empty
34561# (actually we leave an empty line to preserve line numbers).
34562if test "x$srcdir" = x.; then
34563  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34564h
34565s///
34566s/^/:/
34567s/[	 ]*$/:/
34568s/:\$(srcdir):/:/g
34569s/:\${srcdir}:/:/g
34570s/:@srcdir@:/:/g
34571s/^:*//
34572s/:*$//
34573x
34574s/\(=[	 ]*\).*/\1/
34575G
34576s/\n//
34577s/^[^=]*=[	 ]*$//
34578}'
34579fi
34580
34581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34582fi # test -n "$CONFIG_FILES"
34583
34584# Set up the scripts for CONFIG_HEADERS section.
34585# No need to generate them if there are no CONFIG_HEADERS.
34586# This happens for instance with `./config.status Makefile'.
34587if test -n "$CONFIG_HEADERS"; then
34588cat >"$tmp/defines.awk" <<\_ACAWK ||
34589BEGIN {
34590_ACEOF
34591
34592# Transform confdefs.h into an awk script `defines.awk', embedded as
34593# here-document in config.status, that substitutes the proper values into
34594# config.h.in to produce config.h.
34595
34596# Create a delimiter string that does not exist in confdefs.h, to ease
34597# handling of long lines.
34598ac_delim='%!_!# '
34599for ac_last_try in false false :; do
34600  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34601  if test -z "$ac_t"; then
34602    break
34603  elif $ac_last_try; then
34604    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34605  else
34606    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34607  fi
34608done
34609
34610# For the awk script, D is an array of macro values keyed by name,
34611# likewise P contains macro parameters if any.  Preserve backslash
34612# newline sequences.
34613
34614ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34615sed -n '
34616s/.\{148\}/&'"$ac_delim"'/g
34617t rset
34618:rset
34619s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34620t def
34621d
34622:def
34623s/\\$//
34624t bsnl
34625s/["\\]/\\&/g
34626s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34627D["\1"]=" \3"/p
34628s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34629d
34630:bsnl
34631s/["\\]/\\&/g
34632s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34633D["\1"]=" \3\\\\\\n"\\/p
34634t cont
34635s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34636t cont
34637d
34638:cont
34639n
34640s/.\{148\}/&'"$ac_delim"'/g
34641t clear
34642:clear
34643s/\\$//
34644t bsnlc
34645s/["\\]/\\&/g; s/^/"/; s/$/"/p
34646d
34647:bsnlc
34648s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34649b cont
34650' <confdefs.h | sed '
34651s/'"$ac_delim"'/"\\\
34652"/g' >>$CONFIG_STATUS || ac_write_fail=1
34653
34654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34655  for (key in D) D_is_set[key] = 1
34656  FS = ""
34657}
34658/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34659  line = \$ 0
34660  split(line, arg, " ")
34661  if (arg[1] == "#") {
34662    defundef = arg[2]
34663    mac1 = arg[3]
34664  } else {
34665    defundef = substr(arg[1], 2)
34666    mac1 = arg[2]
34667  }
34668  split(mac1, mac2, "(") #)
34669  macro = mac2[1]
34670  prefix = substr(line, 1, index(line, defundef) - 1)
34671  if (D_is_set[macro]) {
34672    # Preserve the white space surrounding the "#".
34673    print prefix "define", macro P[macro] D[macro]
34674    next
34675  } else {
34676    # Replace #undef with comments.  This is necessary, for example,
34677    # in the case of _POSIX_SOURCE, which is predefined and required
34678    # on some systems where configure will not decide to define it.
34679    if (defundef == "undef") {
34680      print "/*", prefix defundef, macro, "*/"
34681      next
34682    }
34683  }
34684}
34685{ print }
34686_ACAWK
34687_ACEOF
34688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34689  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34690fi # test -n "$CONFIG_HEADERS"
34691
34692
34693eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34694shift
34695for ac_tag
34696do
34697  case $ac_tag in
34698  :[FHLC]) ac_mode=$ac_tag; continue;;
34699  esac
34700  case $ac_mode$ac_tag in
34701  :[FHL]*:*);;
34702  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34703  :[FH]-) ac_tag=-:-;;
34704  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34705  esac
34706  ac_save_IFS=$IFS
34707  IFS=:
34708  set x $ac_tag
34709  IFS=$ac_save_IFS
34710  shift
34711  ac_file=$1
34712  shift
34713
34714  case $ac_mode in
34715  :L) ac_source=$1;;
34716  :[FH])
34717    ac_file_inputs=
34718    for ac_f
34719    do
34720      case $ac_f in
34721      -) ac_f="$tmp/stdin";;
34722      *) # Look for the file first in the build tree, then in the source tree
34723	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34724	 # because $ac_f cannot contain `:'.
34725	 test -f "$ac_f" ||
34726	   case $ac_f in
34727	   [\\/$]*) false;;
34728	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34729	   esac ||
34730	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34731      esac
34732      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34733      as_fn_append ac_file_inputs " '$ac_f'"
34734    done
34735
34736    # Let's still pretend it is `configure' which instantiates (i.e., don't
34737    # use $as_me), people would be surprised to read:
34738    #    /* config.h.  Generated by config.status.  */
34739    configure_input='Generated from '`
34740	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34741	`' by configure.'
34742    if test x"$ac_file" != x-; then
34743      configure_input="$ac_file.  $configure_input"
34744      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34745$as_echo "$as_me: creating $ac_file" >&6;}
34746    fi
34747    # Neutralize special characters interpreted by sed in replacement strings.
34748    case $configure_input in #(
34749    *\&* | *\|* | *\\* )
34750       ac_sed_conf_input=`$as_echo "$configure_input" |
34751       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34752    *) ac_sed_conf_input=$configure_input;;
34753    esac
34754
34755    case $ac_tag in
34756    *:-:* | *:-) cat >"$tmp/stdin" \
34757      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34758    esac
34759    ;;
34760  esac
34761
34762  ac_dir=`$as_dirname -- "$ac_file" ||
34763$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34764	 X"$ac_file" : 'X\(//\)[^/]' \| \
34765	 X"$ac_file" : 'X\(//\)$' \| \
34766	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34767$as_echo X"$ac_file" |
34768    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34769	    s//\1/
34770	    q
34771	  }
34772	  /^X\(\/\/\)[^/].*/{
34773	    s//\1/
34774	    q
34775	  }
34776	  /^X\(\/\/\)$/{
34777	    s//\1/
34778	    q
34779	  }
34780	  /^X\(\/\).*/{
34781	    s//\1/
34782	    q
34783	  }
34784	  s/.*/./; q'`
34785  as_dir="$ac_dir"; as_fn_mkdir_p
34786  ac_builddir=.
34787
34788case "$ac_dir" in
34789.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34790*)
34791  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34792  # A ".." for each directory in $ac_dir_suffix.
34793  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34794  case $ac_top_builddir_sub in
34795  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34796  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34797  esac ;;
34798esac
34799ac_abs_top_builddir=$ac_pwd
34800ac_abs_builddir=$ac_pwd$ac_dir_suffix
34801# for backward compatibility:
34802ac_top_builddir=$ac_top_build_prefix
34803
34804case $srcdir in
34805  .)  # We are building in place.
34806    ac_srcdir=.
34807    ac_top_srcdir=$ac_top_builddir_sub
34808    ac_abs_top_srcdir=$ac_pwd ;;
34809  [\\/]* | ?:[\\/]* )  # Absolute name.
34810    ac_srcdir=$srcdir$ac_dir_suffix;
34811    ac_top_srcdir=$srcdir
34812    ac_abs_top_srcdir=$srcdir ;;
34813  *) # Relative name.
34814    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34815    ac_top_srcdir=$ac_top_build_prefix$srcdir
34816    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34817esac
34818ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34819
34820
34821  case $ac_mode in
34822  :F)
34823  #
34824  # CONFIG_FILE
34825  #
34826
34827_ACEOF
34828
34829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34830# If the template does not know about datarootdir, expand it.
34831# FIXME: This hack should be removed a few years after 2.60.
34832ac_datarootdir_hack=; ac_datarootdir_seen=
34833ac_sed_dataroot='
34834/datarootdir/ {
34835  p
34836  q
34837}
34838/@datadir@/p
34839/@docdir@/p
34840/@infodir@/p
34841/@localedir@/p
34842/@mandir@/p'
34843case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34844*datarootdir*) ac_datarootdir_seen=yes;;
34845*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34846  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34847$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34848_ACEOF
34849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34850  ac_datarootdir_hack='
34851  s&@datadir@&$datadir&g
34852  s&@docdir@&$docdir&g
34853  s&@infodir@&$infodir&g
34854  s&@localedir@&$localedir&g
34855  s&@mandir@&$mandir&g
34856  s&\\\${datarootdir}&$datarootdir&g' ;;
34857esac
34858_ACEOF
34859
34860# Neutralize VPATH when `$srcdir' = `.'.
34861# Shell code in configure.ac might set extrasub.
34862# FIXME: do we really want to maintain this feature?
34863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34864ac_sed_extra="$ac_vpsub
34865$extrasub
34866_ACEOF
34867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34868:t
34869/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34870s|@configure_input@|$ac_sed_conf_input|;t t
34871s&@top_builddir@&$ac_top_builddir_sub&;t t
34872s&@top_build_prefix@&$ac_top_build_prefix&;t t
34873s&@srcdir@&$ac_srcdir&;t t
34874s&@abs_srcdir@&$ac_abs_srcdir&;t t
34875s&@top_srcdir@&$ac_top_srcdir&;t t
34876s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34877s&@builddir@&$ac_builddir&;t t
34878s&@abs_builddir@&$ac_abs_builddir&;t t
34879s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34880$ac_datarootdir_hack
34881"
34882eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34883  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34884
34885test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34886  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34887  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34888  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34889which seems to be undefined.  Please make sure it is defined" >&5
34890$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34891which seems to be undefined.  Please make sure it is defined" >&2;}
34892
34893  rm -f "$tmp/stdin"
34894  case $ac_file in
34895  -) cat "$tmp/out" && rm -f "$tmp/out";;
34896  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34897  esac \
34898  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34899 ;;
34900  :H)
34901  #
34902  # CONFIG_HEADER
34903  #
34904  if test x"$ac_file" != x-; then
34905    {
34906      $as_echo "/* $configure_input  */" \
34907      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34908    } >"$tmp/config.h" \
34909      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34910    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34911      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34912$as_echo "$as_me: $ac_file is unchanged" >&6;}
34913    else
34914      rm -f "$ac_file"
34915      mv "$tmp/config.h" "$ac_file" \
34916	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34917    fi
34918  else
34919    $as_echo "/* $configure_input  */" \
34920      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34921      || as_fn_error $? "could not create -" "$LINENO" 5
34922  fi
34923 ;;
34924
34925
34926  esac
34927
34928done # for ac_tag
34929
34930
34931as_fn_exit 0
34932_ACEOF
34933ac_clean_files=$ac_clean_files_save
34934
34935test $ac_write_fail = 0 ||
34936  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34937
34938
34939# configure is writing to config.log, and then calls config.status.
34940# config.status does its own redirection, appending to config.log.
34941# Unfortunately, on DOS this fails, as config.log is still kept open
34942# by configure, so config.status won't be able to write to it; its
34943# output is simply discarded.  So we exec the FD to /dev/null,
34944# effectively closing config.log, so it can be properly (re)opened and
34945# appended to by config.status.  When coming back to configure, we
34946# need to make the FD available again.
34947if test "$no_create" != yes; then
34948  ac_cs_success=:
34949  ac_config_status_args=
34950  test "$silent" = yes &&
34951    ac_config_status_args="$ac_config_status_args --quiet"
34952  exec 5>/dev/null
34953  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34954  exec 5>>config.log
34955  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34956  # would make configure fail if this is the last instruction.
34957  $ac_cs_success || as_fn_exit 1
34958fi
34959if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34960  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34961$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34962fi
34963
34964
34965# Make the compare script executable
34966$CHMOD +x $OUTPUT_ROOT/compare.sh
34967
34968# Finally output some useful information to the user
34969
34970# Finally output some useful information to the user
34971
34972if test "x$CCACHE_FOUND" != x; then
34973	if  test "x$HAS_GOOD_CCACHE" = x; then
34974		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34975		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34976	else
34977		CCACHE_STATUS="installed and in use"
34978	fi
34979else
34980	if test "x$GCC" = xyes; then
34981		CCACHE_STATUS="not installed (consider installing)"
34982		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34983	else
34984		CCACHE_STATUS="not available for your system"
34985	fi
34986fi
34987
34988printf "\n"
34989printf "====================================================\n"
34990printf "A new configuration has been successfully created in\n"
34991printf "$OUTPUT_ROOT\n"
34992if test "x$CONFIGURE_COMMAND_LINE" != x; then
34993	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34994else
34995	printf "using default settings.\n"
34996fi
34997
34998printf "\n"
34999printf "Configuration summary:\n"
35000printf "* Debug level:    $DEBUG_LEVEL\n"
35001printf "* JDK variant:    $JDK_VARIANT\n"
35002printf "* JVM variants:   $with_jvm_variants\n"
35003printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35004
35005printf "\n"
35006printf "Tools summary:\n"
35007if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35008  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35009fi
35010printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35011printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35012printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35013
35014printf "\n"
35015printf "Build performance summary:\n"
35016printf "* Cores to use:   $JOBS\n"
35017printf "* Memory limit:   $MEMORY_SIZE MB\n"
35018printf "* ccache status:  $CCACHE_STATUS\n"
35019printf "\n"
35020
35021if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35022	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35023	printf "$CCACHE_HELP_MSG\n"
35024
35025    # Print a helpful message on how to acquire the necessary build dependency.
35026    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35027    MISSING_DEPENDENCY=ccache
35028    PKGHANDLER_COMMAND=
35029
35030    case $PKGHANDLER in
35031	apt-get)
35032                apt_help     $MISSING_DEPENDENCY ;;
35033    yum)
35034                yum_help     $MISSING_DEPENDENCY ;;
35035	port)
35036                port_help    $MISSING_DEPENDENCY ;;
35037	pkgutil)
35038                pkgutil_help $MISSING_DEPENDENCY ;;
35039	pkgadd)
35040                pkgadd_help  $MISSING_DEPENDENCY ;;
35041    * )
35042      break ;;
35043    esac
35044
35045    if test "x$PKGHANDLER_COMMAND" != x; then
35046        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35047    fi
35048
35049	printf "$HELP_MSG\n"
35050	printf "\n"
35051fi
35052
35053if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35054	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35055	printf "will result in longer build times.\n"
35056	printf "\n"
35057fi
35058
35059if test "x$FOUND_ALT_VARIABLES" != "x"; then
35060	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35061	printf "These are not respected, and will be ignored. It is recommended\n"
35062	printf "that you clean your environment. The following variables are set:\n"
35063	printf "$FOUND_ALT_VARIABLES\n"
35064	printf "\n"
35065fi
35066
35067if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35068	printf "WARNING: Your build output directory is not on a local disk.\n"
35069	printf "This will severely degrade build performance!\n"
35070	printf "It is recommended that you create an output directory on a local disk,\n"
35071	printf "and run the configure script again from that directory.\n"
35072	printf "\n"
35073fi
35074
35075if test "x$IS_RECONFIGURE" = "xyes"; then
35076	printf "WARNING: The result of this configuration has overridden an older\n"
35077	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35078	printf "proper build. Failure to do so might result in strange build problems.\n"
35079	printf "\n"
35080fi
35081
35082