generated-configure.sh revision 939:3ef3f4174c2b
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
641USING_BROKEN_SUSE_LD
642COMPILER_SUPPORTS_TARGET_BITS_FLAG
643ZERO_ARCHFLAG
644LDFLAGS_CXX_JDK
645LDFLAGS_JDKEXE_SUFFIX
646LDFLAGS_JDKLIB_SUFFIX
647LDFLAGS_JDKEXE
648LDFLAGS_JDKLIB
649CXXFLAGS_JDKEXE
650CXXFLAGS_JDKLIB
651CFLAGS_JDKEXE
652CFLAGS_JDKLIB
653MACOSX_VERSION_MIN
654PACKAGE_PATH
655LEGACY_EXTRA_LDFLAGS
656LEGACY_EXTRA_CXXFLAGS
657LEGACY_EXTRA_CFLAGS
658CXX_FLAG_DEPS
659C_FLAG_DEPS
660CXX_O_FLAG_NONE
661CXX_O_FLAG_NORM
662CXX_O_FLAG_HI
663CXX_O_FLAG_HIGHEST
664C_O_FLAG_NONE
665C_O_FLAG_NORM
666C_O_FLAG_HI
667C_O_FLAG_HIGHEST
668POST_MCS_CMD
669POST_STRIP_CMD
670SET_EXECUTABLE_ORIGIN
671SET_SHARED_LIBRARY_ORIGIN
672CXX_FLAG_REORDER
673C_FLAG_REORDER
674SET_SHARED_LIBRARY_MAPFILE
675SET_SHARED_LIBRARY_NAME
676SHARED_LIBRARY_FLAGS
677EXE_SUFFIX
678STATIC_LIBRARY_SUFFIX
679SHARED_LIBRARY_SUFFIX
680LIBRARY_PREFIX
681STATIC_LIBRARY
682SHARED_LIBRARY
683OBJ_SUFFIX
684COMPILER_NAME
685JT_HOME
686JTREGEXE
687LIPO
688ac_ct_OBJDUMP
689OBJDUMP
690ac_ct_OBJCOPY
691OBJCOPY
692MCS
693STRIP
694GNM
695NM
696AS
697CXXCPP
698CPP
699COMPILER_TYPE
700RC_FLAGS
701DUMPBIN
702WINAR
703HOTSPOT_RC
704HOTSPOT_MT
705RC
706MT
707WINLD
708HOTSPOT_LD
709HOTSPOT_CXX
710ARFLAGS
711AR
712LDEXECXX
713LDCXX
714LDEXE
715LD
716ac_ct_OBJC
717OBJCFLAGS
718OBJC
719ac_ct_CXX
720CXXFLAGS
721CXX
722ac_ct_PROPER_COMPILER_CXX
723PROPER_COMPILER_CXX
724POTENTIAL_CXX
725TOOLS_DIR_CXX
726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733ac_ct_PROPER_COMPILER_CC
734PROPER_COMPILER_CC
735POTENTIAL_CC
736TOOLS_DIR_CC
737BUILD_LD
738BUILD_CXX
739BUILD_CC
740MSVCR_DLL
741DXSDK_INCLUDE_PATH
742DXSDK_LIB_PATH
743VS_PATH
744VS_LIB
745VS_INCLUDE
746CYGWIN_LINK
747AR_OUT_OPTION
748LD_OUT_OPTION
749EXE_OUT_OPTION
750CC_OUT_OPTION
751BUILD_HOTSPOT
752HOTSPOT_DIST
753BUILD_OUTPUT
754OVERRIDE_SRC_ROOT
755ADD_SRC_ROOT
756JDK_TOPDIR
757NASHORN_TOPDIR
758HOTSPOT_TOPDIR
759JAXWS_TOPDIR
760JAXP_TOPDIR
761CORBA_TOPDIR
762LANGTOOLS_TOPDIR
763BOOT_JDK_JVMARGS
764JAVAC_FLAGS
765BOOT_JDK_SOURCETARGET
766BOOT_JDK
767BOOT_TOOLSJAR
768BOOT_RTJAR
769JAVA_CHECK
770JAVAC_CHECK
771COOKED_BUILD_NUMBER
772JDK_VERSION
773COPYRIGHT_YEAR
774MACOSX_BUNDLE_ID_BASE
775MACOSX_BUNDLE_NAME_BASE
776COMPANY_NAME
777JDK_RC_PLATFORM_NAME
778PRODUCT_SUFFIX
779PRODUCT_NAME
780LAUNCHER_NAME
781MILESTONE
782JDK_BUILD_NUMBER
783JDK_UPDATE_VERSION
784JDK_MICRO_VERSION
785JDK_MINOR_VERSION
786JDK_MAJOR_VERSION
787USER_RELEASE_SUFFIX
788COMPRESS_JARS
789UNLIMITED_CRYPTO
790CACERTS_FILE
791TEST_IN_BUILD
792BUILD_HEADLESS
793SUPPORT_HEADFUL
794SUPPORT_HEADLESS
795BDEPS_FTP
796BDEPS_UNZIP
797OS_VERSION_MICRO
798OS_VERSION_MINOR
799OS_VERSION_MAJOR
800PKG_CONFIG
801CODESIGN
802XATTR
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_CORE
829JVM_VARIANT_ZEROSHARK
830JVM_VARIANT_ZERO
831JVM_VARIANT_KERNEL
832JVM_VARIANT_MINIMAL1
833JVM_VARIANT_CLIENT
834JVM_VARIANT_SERVER
835JVM_VARIANTS
836JVM_INTERPRETER
837JDK_VARIANT
838SET_OPENJDK
839BUILD_LOG_WRAPPER
840BUILD_LOG_PREVIOUS
841BUILD_LOG
842SYS_ROOT
843PATH_SEP
844SRC_ROOT
845ZERO_ARCHDEF
846DEFINE_CROSS_COMPILE_ARCH
847LP64
848OPENJDK_TARGET_OS_API_DIR
849OPENJDK_TARGET_CPU_JLI_CFLAGS
850OPENJDK_TARGET_CPU_OSARCH
851OPENJDK_TARGET_CPU_ISADIR
852OPENJDK_TARGET_CPU_LIBDIR
853OPENJDK_TARGET_CPU_LEGACY_LIB
854OPENJDK_TARGET_CPU_LEGACY
855REQUIRED_OS_VERSION
856REQUIRED_OS_NAME
857COMPILE_TYPE
858OPENJDK_TARGET_CPU_ENDIAN
859OPENJDK_TARGET_CPU_BITS
860OPENJDK_TARGET_CPU_ARCH
861OPENJDK_TARGET_CPU
862OPENJDK_TARGET_OS_API
863OPENJDK_TARGET_OS
864OPENJDK_BUILD_CPU_ENDIAN
865OPENJDK_BUILD_CPU_BITS
866OPENJDK_BUILD_CPU_ARCH
867OPENJDK_BUILD_CPU
868OPENJDK_BUILD_OS_API
869OPENJDK_BUILD_OS
870OPENJDK_BUILD_AUTOCONF_NAME
871OPENJDK_TARGET_AUTOCONF_NAME
872target_os
873target_vendor
874target_cpu
875target
876host_os
877host_vendor
878host_cpu
879host
880build_os
881build_vendor
882build_cpu
883build
884SETFILE
885DF
886READLINK
887CYGPATH
888NAWK
889SED
890FGREP
891EGREP
892GREP
893AWK
894XARGS
895WHICH
896WC
897UNIQ
898UNAME
899TR
900TOUCH
901TEE
902TAR
903TAIL
904SORT
905SH
906RM
907PRINTF
908MV
909MKTEMP
910MKDIR
911LS
912LN
913HEAD
914FIND
915FILE
916EXPR
917ECHO
918DIRNAME
919DIFF
920DATE
921CUT
922CPIO
923CP
924COMM
925CMP
926CHMOD
927CAT
928BASH
929BASENAME
930DATE_WHEN_CONFIGURED
931CONFIGURE_COMMAND_LINE
932CUSTOM_MAKE_DIR
933target_alias
934host_alias
935build_alias
936LIBS
937ECHO_T
938ECHO_N
939ECHO_C
940DEFS
941mandir
942localedir
943libdir
944psdir
945pdfdir
946dvidir
947htmldir
948infodir
949docdir
950oldincludedir
951includedir
952localstatedir
953sharedstatedir
954sysconfdir
955datadir
956datarootdir
957libexecdir
958sbindir
959bindir
960program_transform_name
961prefix
962exec_prefix
963PACKAGE_URL
964PACKAGE_BUGREPORT
965PACKAGE_STRING
966PACKAGE_VERSION
967PACKAGE_TARNAME
968PACKAGE_NAME
969PATH_SEPARATOR
970SHELL'
971ac_subst_files=''
972ac_user_opts='
973enable_option_checking
974with_custom_make_dir
975with_target_bits
976with_sys_root
977with_tools_dir
978with_devkit
979enable_openjdk_only
980with_jdk_variant
981with_jvm_interpreter
982with_jvm_variants
983enable_debug
984with_debug_level
985with_conf_name
986with_builddeps_conf
987with_builddeps_server
988with_builddeps_dir
989with_builddeps_group
990enable_headful
991enable_hotspot_test_in_build
992with_cacerts_file
993enable_unlimited_crypto
994with_milestone
995with_update_version
996with_build_number
997with_user_release_suffix
998with_boot_jdk
999with_boot_jdk_jvmargs
1000with_add_source_root
1001with_override_source_root
1002with_adds_and_overrides
1003with_override_langtools
1004with_override_corba
1005with_override_jaxp
1006with_override_jaxws
1007with_override_hotspot
1008with_override_jdk
1009with_import_hotspot
1010with_msvcr_dll
1011with_dxsdk
1012with_dxsdk_lib
1013with_dxsdk_include
1014with_jtreg
1015with_extra_cflags
1016with_extra_cxxflags
1017with_extra_ldflags
1018enable_debug_symbols
1019enable_zip_debug_info
1020enable_macosx_runtime_support
1021with_x
1022with_cups
1023with_cups_include
1024with_freetype
1025with_alsa
1026with_alsa_include
1027with_alsa_lib
1028with_giflib
1029with_zlib
1030with_stdc__lib
1031with_num_cores
1032with_memory_size
1033with_jobs
1034with_sjavac_server_java
1035enable_sjavac
1036enable_precompiled_headers
1037enable_ccache
1038with_ccache_dir
1039'
1040      ac_precious_vars='build_alias
1041host_alias
1042target_alias
1043PKG_CONFIG
1044CC
1045CFLAGS
1046LDFLAGS
1047LIBS
1048CPPFLAGS
1049CXX
1050CXXFLAGS
1051CCC
1052OBJC
1053OBJCFLAGS
1054CPP
1055CXXCPP
1056XMKMF
1057FREETYPE2_CFLAGS
1058FREETYPE2_LIBS
1059ALSA_CFLAGS
1060ALSA_LIBS
1061LIBFFI_CFLAGS
1062LIBFFI_LIBS'
1063
1064
1065# Initialize some variables set by options.
1066ac_init_help=
1067ac_init_version=false
1068ac_unrecognized_opts=
1069ac_unrecognized_sep=
1070# The variables have the same names as the options, with
1071# dashes changed to underlines.
1072cache_file=/dev/null
1073exec_prefix=NONE
1074no_create=
1075no_recursion=
1076prefix=NONE
1077program_prefix=NONE
1078program_suffix=NONE
1079program_transform_name=s,x,x,
1080silent=
1081site=
1082srcdir=
1083verbose=
1084x_includes=NONE
1085x_libraries=NONE
1086
1087# Installation directory options.
1088# These are left unexpanded so users can "make install exec_prefix=/foo"
1089# and all the variables that are supposed to be based on exec_prefix
1090# by default will actually change.
1091# Use braces instead of parens because sh, perl, etc. also accept them.
1092# (The list follows the same order as the GNU Coding Standards.)
1093bindir='${exec_prefix}/bin'
1094sbindir='${exec_prefix}/sbin'
1095libexecdir='${exec_prefix}/libexec'
1096datarootdir='${prefix}/share'
1097datadir='${datarootdir}'
1098sysconfdir='${prefix}/etc'
1099sharedstatedir='${prefix}/com'
1100localstatedir='${prefix}/var'
1101includedir='${prefix}/include'
1102oldincludedir='/usr/include'
1103docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1104infodir='${datarootdir}/info'
1105htmldir='${docdir}'
1106dvidir='${docdir}'
1107pdfdir='${docdir}'
1108psdir='${docdir}'
1109libdir='${exec_prefix}/lib'
1110localedir='${datarootdir}/locale'
1111mandir='${datarootdir}/man'
1112
1113ac_prev=
1114ac_dashdash=
1115for ac_option
1116do
1117  # If the previous option needs an argument, assign it.
1118  if test -n "$ac_prev"; then
1119    eval $ac_prev=\$ac_option
1120    ac_prev=
1121    continue
1122  fi
1123
1124  case $ac_option in
1125  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1126  *=)   ac_optarg= ;;
1127  *)    ac_optarg=yes ;;
1128  esac
1129
1130  # Accept the important Cygnus configure options, so we can diagnose typos.
1131
1132  case $ac_dashdash$ac_option in
1133  --)
1134    ac_dashdash=yes ;;
1135
1136  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1137    ac_prev=bindir ;;
1138  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1139    bindir=$ac_optarg ;;
1140
1141  -build | --build | --buil | --bui | --bu)
1142    ac_prev=build_alias ;;
1143  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1144    build_alias=$ac_optarg ;;
1145
1146  -cache-file | --cache-file | --cache-fil | --cache-fi \
1147  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1148    ac_prev=cache_file ;;
1149  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1150  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1151    cache_file=$ac_optarg ;;
1152
1153  --config-cache | -C)
1154    cache_file=config.cache ;;
1155
1156  -datadir | --datadir | --datadi | --datad)
1157    ac_prev=datadir ;;
1158  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1159    datadir=$ac_optarg ;;
1160
1161  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1162  | --dataroo | --dataro | --datar)
1163    ac_prev=datarootdir ;;
1164  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1165  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1166    datarootdir=$ac_optarg ;;
1167
1168  -disable-* | --disable-*)
1169    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1170    # Reject names that are not valid shell variable names.
1171    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1172      as_fn_error $? "invalid feature name: $ac_useropt"
1173    ac_useropt_orig=$ac_useropt
1174    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175    case $ac_user_opts in
1176      *"
1177"enable_$ac_useropt"
1178"*) ;;
1179      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1180	 ac_unrecognized_sep=', ';;
1181    esac
1182    eval enable_$ac_useropt=no ;;
1183
1184  -docdir | --docdir | --docdi | --doc | --do)
1185    ac_prev=docdir ;;
1186  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1187    docdir=$ac_optarg ;;
1188
1189  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1190    ac_prev=dvidir ;;
1191  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1192    dvidir=$ac_optarg ;;
1193
1194  -enable-* | --enable-*)
1195    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1196    # Reject names that are not valid shell variable names.
1197    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1198      as_fn_error $? "invalid feature name: $ac_useropt"
1199    ac_useropt_orig=$ac_useropt
1200    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201    case $ac_user_opts in
1202      *"
1203"enable_$ac_useropt"
1204"*) ;;
1205      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1206	 ac_unrecognized_sep=', ';;
1207    esac
1208    eval enable_$ac_useropt=\$ac_optarg ;;
1209
1210  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1211  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1212  | --exec | --exe | --ex)
1213    ac_prev=exec_prefix ;;
1214  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1215  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1216  | --exec=* | --exe=* | --ex=*)
1217    exec_prefix=$ac_optarg ;;
1218
1219  -gas | --gas | --ga | --g)
1220    # Obsolete; use --with-gas.
1221    with_gas=yes ;;
1222
1223  -help | --help | --hel | --he | -h)
1224    ac_init_help=long ;;
1225  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1226    ac_init_help=recursive ;;
1227  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1228    ac_init_help=short ;;
1229
1230  -host | --host | --hos | --ho)
1231    ac_prev=host_alias ;;
1232  -host=* | --host=* | --hos=* | --ho=*)
1233    host_alias=$ac_optarg ;;
1234
1235  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1236    ac_prev=htmldir ;;
1237  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1238  | --ht=*)
1239    htmldir=$ac_optarg ;;
1240
1241  -includedir | --includedir | --includedi | --included | --include \
1242  | --includ | --inclu | --incl | --inc)
1243    ac_prev=includedir ;;
1244  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1245  | --includ=* | --inclu=* | --incl=* | --inc=*)
1246    includedir=$ac_optarg ;;
1247
1248  -infodir | --infodir | --infodi | --infod | --info | --inf)
1249    ac_prev=infodir ;;
1250  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1251    infodir=$ac_optarg ;;
1252
1253  -libdir | --libdir | --libdi | --libd)
1254    ac_prev=libdir ;;
1255  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1256    libdir=$ac_optarg ;;
1257
1258  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1259  | --libexe | --libex | --libe)
1260    ac_prev=libexecdir ;;
1261  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1262  | --libexe=* | --libex=* | --libe=*)
1263    libexecdir=$ac_optarg ;;
1264
1265  -localedir | --localedir | --localedi | --localed | --locale)
1266    ac_prev=localedir ;;
1267  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1268    localedir=$ac_optarg ;;
1269
1270  -localstatedir | --localstatedir | --localstatedi | --localstated \
1271  | --localstate | --localstat | --localsta | --localst | --locals)
1272    ac_prev=localstatedir ;;
1273  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1274  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1275    localstatedir=$ac_optarg ;;
1276
1277  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1278    ac_prev=mandir ;;
1279  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1280    mandir=$ac_optarg ;;
1281
1282  -nfp | --nfp | --nf)
1283    # Obsolete; use --without-fp.
1284    with_fp=no ;;
1285
1286  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1287  | --no-cr | --no-c | -n)
1288    no_create=yes ;;
1289
1290  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1291  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1292    no_recursion=yes ;;
1293
1294  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1295  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1296  | --oldin | --oldi | --old | --ol | --o)
1297    ac_prev=oldincludedir ;;
1298  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1299  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1300  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1301    oldincludedir=$ac_optarg ;;
1302
1303  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1304    ac_prev=prefix ;;
1305  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1306    prefix=$ac_optarg ;;
1307
1308  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1309  | --program-pre | --program-pr | --program-p)
1310    ac_prev=program_prefix ;;
1311  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1312  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1313    program_prefix=$ac_optarg ;;
1314
1315  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1316  | --program-suf | --program-su | --program-s)
1317    ac_prev=program_suffix ;;
1318  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1319  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1320    program_suffix=$ac_optarg ;;
1321
1322  -program-transform-name | --program-transform-name \
1323  | --program-transform-nam | --program-transform-na \
1324  | --program-transform-n | --program-transform- \
1325  | --program-transform | --program-transfor \
1326  | --program-transfo | --program-transf \
1327  | --program-trans | --program-tran \
1328  | --progr-tra | --program-tr | --program-t)
1329    ac_prev=program_transform_name ;;
1330  -program-transform-name=* | --program-transform-name=* \
1331  | --program-transform-nam=* | --program-transform-na=* \
1332  | --program-transform-n=* | --program-transform-=* \
1333  | --program-transform=* | --program-transfor=* \
1334  | --program-transfo=* | --program-transf=* \
1335  | --program-trans=* | --program-tran=* \
1336  | --progr-tra=* | --program-tr=* | --program-t=*)
1337    program_transform_name=$ac_optarg ;;
1338
1339  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1340    ac_prev=pdfdir ;;
1341  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1342    pdfdir=$ac_optarg ;;
1343
1344  -psdir | --psdir | --psdi | --psd | --ps)
1345    ac_prev=psdir ;;
1346  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1347    psdir=$ac_optarg ;;
1348
1349  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1350  | -silent | --silent | --silen | --sile | --sil)
1351    silent=yes ;;
1352
1353  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1354    ac_prev=sbindir ;;
1355  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1356  | --sbi=* | --sb=*)
1357    sbindir=$ac_optarg ;;
1358
1359  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1360  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1361  | --sharedst | --shareds | --shared | --share | --shar \
1362  | --sha | --sh)
1363    ac_prev=sharedstatedir ;;
1364  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1365  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1366  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1367  | --sha=* | --sh=*)
1368    sharedstatedir=$ac_optarg ;;
1369
1370  -site | --site | --sit)
1371    ac_prev=site ;;
1372  -site=* | --site=* | --sit=*)
1373    site=$ac_optarg ;;
1374
1375  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1376    ac_prev=srcdir ;;
1377  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1378    srcdir=$ac_optarg ;;
1379
1380  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1381  | --syscon | --sysco | --sysc | --sys | --sy)
1382    ac_prev=sysconfdir ;;
1383  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1384  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1385    sysconfdir=$ac_optarg ;;
1386
1387  -target | --target | --targe | --targ | --tar | --ta | --t)
1388    ac_prev=target_alias ;;
1389  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1390    target_alias=$ac_optarg ;;
1391
1392  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1393    verbose=yes ;;
1394
1395  -version | --version | --versio | --versi | --vers | -V)
1396    ac_init_version=: ;;
1397
1398  -with-* | --with-*)
1399    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1400    # Reject names that are not valid shell variable names.
1401    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1402      as_fn_error $? "invalid package name: $ac_useropt"
1403    ac_useropt_orig=$ac_useropt
1404    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1405    case $ac_user_opts in
1406      *"
1407"with_$ac_useropt"
1408"*) ;;
1409      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1410	 ac_unrecognized_sep=', ';;
1411    esac
1412    eval with_$ac_useropt=\$ac_optarg ;;
1413
1414  -without-* | --without-*)
1415    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1416    # Reject names that are not valid shell variable names.
1417    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1418      as_fn_error $? "invalid package name: $ac_useropt"
1419    ac_useropt_orig=$ac_useropt
1420    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1421    case $ac_user_opts in
1422      *"
1423"with_$ac_useropt"
1424"*) ;;
1425      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1426	 ac_unrecognized_sep=', ';;
1427    esac
1428    eval with_$ac_useropt=no ;;
1429
1430  --x)
1431    # Obsolete; use --with-x.
1432    with_x=yes ;;
1433
1434  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1435  | --x-incl | --x-inc | --x-in | --x-i)
1436    ac_prev=x_includes ;;
1437  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1438  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1439    x_includes=$ac_optarg ;;
1440
1441  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1442  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1443    ac_prev=x_libraries ;;
1444  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1445  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1446    x_libraries=$ac_optarg ;;
1447
1448  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1449Try \`$0 --help' for more information"
1450    ;;
1451
1452  *=*)
1453    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1454    # Reject names that are not valid shell variable names.
1455    case $ac_envvar in #(
1456      '' | [0-9]* | *[!_$as_cr_alnum]* )
1457      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1458    esac
1459    eval $ac_envvar=\$ac_optarg
1460    export $ac_envvar ;;
1461
1462  *)
1463    # FIXME: should be removed in autoconf 3.0.
1464    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1465    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1466      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1467    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1468    ;;
1469
1470  esac
1471done
1472
1473if test -n "$ac_prev"; then
1474  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1475  as_fn_error $? "missing argument to $ac_option"
1476fi
1477
1478if test -n "$ac_unrecognized_opts"; then
1479  case $enable_option_checking in
1480    no) ;;
1481    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1482    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1483  esac
1484fi
1485
1486# Check all directory arguments for consistency.
1487for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1488		datadir sysconfdir sharedstatedir localstatedir includedir \
1489		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1490		libdir localedir mandir
1491do
1492  eval ac_val=\$$ac_var
1493  # Remove trailing slashes.
1494  case $ac_val in
1495    */ )
1496      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1497      eval $ac_var=\$ac_val;;
1498  esac
1499  # Be sure to have absolute directory names.
1500  case $ac_val in
1501    [\\/$]* | ?:[\\/]* )  continue;;
1502    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1503  esac
1504  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1505done
1506
1507# There might be people who depend on the old broken behavior: `$host'
1508# used to hold the argument of --host etc.
1509# FIXME: To remove some day.
1510build=$build_alias
1511host=$host_alias
1512target=$target_alias
1513
1514# FIXME: To remove some day.
1515if test "x$host_alias" != x; then
1516  if test "x$build_alias" = x; then
1517    cross_compiling=maybe
1518    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1519    If a cross compiler is detected then cross compile mode will be used" >&2
1520  elif test "x$build_alias" != "x$host_alias"; then
1521    cross_compiling=yes
1522  fi
1523fi
1524
1525ac_tool_prefix=
1526test -n "$host_alias" && ac_tool_prefix=$host_alias-
1527
1528test "$silent" = yes && exec 6>/dev/null
1529
1530
1531ac_pwd=`pwd` && test -n "$ac_pwd" &&
1532ac_ls_di=`ls -di .` &&
1533ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1534  as_fn_error $? "working directory cannot be determined"
1535test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1536  as_fn_error $? "pwd does not report name of working directory"
1537
1538
1539# Find the source files, if location was not specified.
1540if test -z "$srcdir"; then
1541  ac_srcdir_defaulted=yes
1542  # Try the directory containing this script, then the parent directory.
1543  ac_confdir=`$as_dirname -- "$as_myself" ||
1544$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1545	 X"$as_myself" : 'X\(//\)[^/]' \| \
1546	 X"$as_myself" : 'X\(//\)$' \| \
1547	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1548$as_echo X"$as_myself" |
1549    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1550	    s//\1/
1551	    q
1552	  }
1553	  /^X\(\/\/\)[^/].*/{
1554	    s//\1/
1555	    q
1556	  }
1557	  /^X\(\/\/\)$/{
1558	    s//\1/
1559	    q
1560	  }
1561	  /^X\(\/\).*/{
1562	    s//\1/
1563	    q
1564	  }
1565	  s/.*/./; q'`
1566  srcdir=$ac_confdir
1567  if test ! -r "$srcdir/$ac_unique_file"; then
1568    srcdir=..
1569  fi
1570else
1571  ac_srcdir_defaulted=no
1572fi
1573if test ! -r "$srcdir/$ac_unique_file"; then
1574  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1575  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1576fi
1577ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1578ac_abs_confdir=`(
1579	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1580	pwd)`
1581# When building in place, set srcdir=.
1582if test "$ac_abs_confdir" = "$ac_pwd"; then
1583  srcdir=.
1584fi
1585# Remove unnecessary trailing slashes from srcdir.
1586# Double slashes in file names in object file debugging info
1587# mess up M-x gdb in Emacs.
1588case $srcdir in
1589*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1590esac
1591for ac_var in $ac_precious_vars; do
1592  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1593  eval ac_env_${ac_var}_value=\$${ac_var}
1594  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1595  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1596done
1597
1598#
1599# Report the --help message.
1600#
1601if test "$ac_init_help" = "long"; then
1602  # Omit some internal or obsolete options to make the list less imposing.
1603  # This message is too long to be a string in the A/UX 3.1 sh.
1604  cat <<_ACEOF
1605\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1606
1607Usage: $0 [OPTION]... [VAR=VALUE]...
1608
1609To assign environment variables (e.g., CC, CFLAGS...), specify them as
1610VAR=VALUE.  See below for descriptions of some of the useful variables.
1611
1612Defaults for the options are specified in brackets.
1613
1614Configuration:
1615  -h, --help              display this help and exit
1616      --help=short        display options specific to this package
1617      --help=recursive    display the short help of all the included packages
1618  -V, --version           display version information and exit
1619  -q, --quiet, --silent   do not print \`checking ...' messages
1620      --cache-file=FILE   cache test results in FILE [disabled]
1621  -C, --config-cache      alias for \`--cache-file=config.cache'
1622  -n, --no-create         do not create output files
1623      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1624
1625Installation directories:
1626  --prefix=PREFIX         install architecture-independent files in PREFIX
1627                          [$ac_default_prefix]
1628  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1629                          [PREFIX]
1630
1631By default, \`make install' will install all the files in
1632\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1633an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1634for instance \`--prefix=\$HOME'.
1635
1636For better control, use the options below.
1637
1638Fine tuning of the installation directories:
1639  --bindir=DIR            user executables [EPREFIX/bin]
1640  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1641  --libexecdir=DIR        program executables [EPREFIX/libexec]
1642  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1643  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1644  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1645  --libdir=DIR            object code libraries [EPREFIX/lib]
1646  --includedir=DIR        C header files [PREFIX/include]
1647  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1648  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1649  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1650  --infodir=DIR           info documentation [DATAROOTDIR/info]
1651  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1652  --mandir=DIR            man documentation [DATAROOTDIR/man]
1653  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1654  --htmldir=DIR           html documentation [DOCDIR]
1655  --dvidir=DIR            dvi documentation [DOCDIR]
1656  --pdfdir=DIR            pdf documentation [DOCDIR]
1657  --psdir=DIR             ps documentation [DOCDIR]
1658_ACEOF
1659
1660  cat <<\_ACEOF
1661
1662X features:
1663  --x-includes=DIR    X include files are in DIR
1664  --x-libraries=DIR   X library files are in DIR
1665
1666System types:
1667  --build=BUILD     configure for building on BUILD [guessed]
1668  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1669  --target=TARGET   configure for building compilers for TARGET [HOST]
1670_ACEOF
1671fi
1672
1673if test -n "$ac_init_help"; then
1674  case $ac_init_help in
1675     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1676   esac
1677  cat <<\_ACEOF
1678
1679Optional Features:
1680  --disable-option-checking  ignore unrecognized --enable/--with options
1681  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1682  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1683  --enable-openjdk-only   suppress building custom source even if present
1684                          [disabled]
1685  --enable-debug          set the debug level to fastdebug (shorthand for
1686                          --with-debug-level=fastdebug) [disabled]
1687  --disable-headful       disable building headful support (graphical UI
1688                          support) [enabled]
1689  --enable-hotspot-test-in-build
1690                          run the Queens test after Hotspot build [disabled]
1691  --enable-unlimited-crypto
1692                          Enable unlimited crypto policy [disabled]
1693  --disable-debug-symbols disable generation of debug symbols [enabled]
1694  --disable-zip-debug-info
1695                          disable zipping of debug-info files [enabled]
1696  --disable-macosx-runtime-support
1697                          disable the use of MacOSX Java runtime support
1698                          framework [enabled]
1699  --enable-sjavac         use sjavac to do fast incremental compiles
1700                          [disabled]
1701  --disable-precompiled-headers
1702                          disable using precompiled headers when compiling C++
1703                          [enabled]
1704  --disable-ccache        disable using ccache to speed up recompilations
1705                          [enabled]
1706
1707Optional Packages:
1708  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1709  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1710  --with-custom-make-dir  use this directory for custom build/make files
1711  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1712                          support it), e.g. --with-target-bits=32 [guessed]
1713  --with-sys-root         pass this sys-root to the compilers and tools (for
1714                          cross-compiling)
1715  --with-tools-dir        search this directory for compilers and tools (for
1716                          cross-compiling)
1717  --with-devkit           use this directory as base for tools-dir and
1718                          sys-root (for cross-compiling)
1719  --with-jdk-variant      JDK variant to build (normal) [normal]
1720  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1721  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1722                          client, minimal1, kernel, zero, zeroshark, core)
1723                          [server]
1724  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1725                          [release]
1726  --with-conf-name        use this as the name of the configuration [generated
1727                          from important configuration options]
1728  --with-builddeps-conf   use this configuration file for the builddeps
1729  --with-builddeps-server download and use build dependencies from this server
1730                          url
1731  --with-builddeps-dir    store downloaded build dependencies here
1732                          [/localhome/builddeps]
1733  --with-builddeps-group  chgrp the downloaded build dependencies to this
1734                          group
1735  --with-cacerts-file     specify alternative cacerts file
1736  --with-milestone        Set milestone value for build [internal]
1737  --with-update-version   Set update version value for build [b00]
1738  --with-build-number     Set build number value for build [b00]
1739  --with-user-release-suffix
1740                          Add a custom string to the version string if build
1741                          number isn't set.[username_builddateb00]
1742  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1743  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1744                          invocations of the Boot JDK, overriding the default
1745                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1746                          -enableassertions"
1747  --with-add-source-root  for each and every source directory, look in this
1748                          additional source root for the same directory; if it
1749                          exists and have files in it, include it in the build
1750  --with-override-source-root
1751                          for each and every source directory, look in this
1752                          override source root for the same directory; if it
1753                          exists, use that directory instead and ignore the
1754                          directory in the original source root
1755  --with-adds-and-overrides
1756                          use the subdirs 'adds' and 'overrides' in the
1757                          specified directory as add-source-root and
1758                          override-source-root
1759  --with-override-langtools
1760                          use this langtools dir for the build
1761  --with-override-corba   use this corba dir for the build
1762  --with-override-jaxp    use this jaxp dir for the build
1763  --with-override-jaxws   use this jaxws dir for the build
1764  --with-override-hotspot use this hotspot dir for the build
1765  --with-override-jdk     use this jdk dir for the build
1766  --with-import-hotspot   import hotspot binaries from this jdk image or
1767                          hotspot build dist dir instead of building from
1768                          source
1769  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1770                          only) [probed]
1771  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1772  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1773                          [probed]
1774  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1775                          [probed]
1776  --with-jtreg            Regression Test Harness [probed]
1777  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1778  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1779  --with-extra-ldflags    extra flags to be used when linking jdk
1780  --with-x                use the X Window System
1781  --with-cups             specify prefix directory for the cups package
1782                          (expecting the headers under PATH/include)
1783  --with-cups-include     specify directory for the cups include files
1784  --with-freetype         specify prefix directory for the freetype2 package
1785                          (expecting the libraries under PATH/lib and the
1786                          headers under PATH/include)
1787  --with-alsa             specify prefix directory for the alsa package
1788                          (expecting the libraries under PATH/lib and the
1789                          headers under PATH/include)
1790  --with-alsa-include     specify directory for the alsa include files
1791  --with-alsa-lib         specify directory for the alsa library
1792  --with-giflib           use giflib from build system or OpenJDK source
1793                          (system, bundled) [bundled]
1794  --with-zlib             use zlib from build system or OpenJDK source
1795                          (system, bundled) [bundled]
1796  --with-stdc++lib=<static>,<dynamic>,<default>
1797                          force linking of the C++ runtime on Linux to either
1798                          static or dynamic, default is static with dynamic as
1799                          fallback
1800  --with-num-cores        number of cores in the build system, e.g.
1801                          --with-num-cores=8 [probed]
1802  --with-memory-size      memory (in MB) available in the build system, e.g.
1803                          --with-memory-size=1024 [probed]
1804  --with-jobs             number of parallel jobs to let make run [calculated
1805                          based on cores and memory]
1806  --with-sjavac-server-java
1807                          use this java binary for running the sjavac
1808                          background server [Boot JDK java]
1809  --with-ccache-dir       where to store ccache files [~/.ccache]
1810
1811Some influential environment variables:
1812  PKG_CONFIG  path to pkg-config utility
1813  CC          C compiler command
1814  CFLAGS      C compiler flags
1815  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1816              nonstandard directory <lib dir>
1817  LIBS        libraries to pass to the linker, e.g. -l<library>
1818  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1819              you have headers in a nonstandard directory <include dir>
1820  CXX         C++ compiler command
1821  CXXFLAGS    C++ compiler flags
1822  OBJC        Objective C compiler command
1823  OBJCFLAGS   Objective C compiler flags
1824  CPP         C preprocessor
1825  CXXCPP      C++ preprocessor
1826  XMKMF       Path to xmkmf, Makefile generator for X Window System
1827  FREETYPE2_CFLAGS
1828              C compiler flags for FREETYPE2, overriding pkg-config
1829  FREETYPE2_LIBS
1830              linker flags for FREETYPE2, overriding pkg-config
1831  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1832  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1833  LIBFFI_CFLAGS
1834              C compiler flags for LIBFFI, overriding pkg-config
1835  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1836
1837Use these variables to override the choices made by `configure' or to help
1838it to find libraries and programs with nonstandard names/locations.
1839
1840Report bugs to <build-dev@openjdk.java.net>.
1841OpenJDK home page: <http://openjdk.java.net>.
1842_ACEOF
1843ac_status=$?
1844fi
1845
1846if test "$ac_init_help" = "recursive"; then
1847  # If there are subdirs, report their specific --help.
1848  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1849    test -d "$ac_dir" ||
1850      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1851      continue
1852    ac_builddir=.
1853
1854case "$ac_dir" in
1855.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856*)
1857  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1858  # A ".." for each directory in $ac_dir_suffix.
1859  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1860  case $ac_top_builddir_sub in
1861  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1862  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1863  esac ;;
1864esac
1865ac_abs_top_builddir=$ac_pwd
1866ac_abs_builddir=$ac_pwd$ac_dir_suffix
1867# for backward compatibility:
1868ac_top_builddir=$ac_top_build_prefix
1869
1870case $srcdir in
1871  .)  # We are building in place.
1872    ac_srcdir=.
1873    ac_top_srcdir=$ac_top_builddir_sub
1874    ac_abs_top_srcdir=$ac_pwd ;;
1875  [\\/]* | ?:[\\/]* )  # Absolute name.
1876    ac_srcdir=$srcdir$ac_dir_suffix;
1877    ac_top_srcdir=$srcdir
1878    ac_abs_top_srcdir=$srcdir ;;
1879  *) # Relative name.
1880    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1881    ac_top_srcdir=$ac_top_build_prefix$srcdir
1882    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1883esac
1884ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1885
1886    cd "$ac_dir" || { ac_status=$?; continue; }
1887    # Check for guested configure.
1888    if test -f "$ac_srcdir/configure.gnu"; then
1889      echo &&
1890      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1891    elif test -f "$ac_srcdir/configure"; then
1892      echo &&
1893      $SHELL "$ac_srcdir/configure" --help=recursive
1894    else
1895      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1896    fi || ac_status=$?
1897    cd "$ac_pwd" || { ac_status=$?; break; }
1898  done
1899fi
1900
1901test -n "$ac_init_help" && exit $ac_status
1902if $ac_init_version; then
1903  cat <<\_ACEOF
1904OpenJDK configure jdk8
1905generated by GNU Autoconf 2.67
1906
1907Copyright (C) 2010 Free Software Foundation, Inc.
1908This configure script is free software; the Free Software Foundation
1909gives unlimited permission to copy, distribute and modify it.
1910_ACEOF
1911  exit
1912fi
1913
1914## ------------------------ ##
1915## Autoconf initialization. ##
1916## ------------------------ ##
1917
1918# ac_fn_c_try_compile LINENO
1919# --------------------------
1920# Try to compile conftest.$ac_ext, and return whether this succeeded.
1921ac_fn_c_try_compile ()
1922{
1923  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924  rm -f conftest.$ac_objext
1925  if { { ac_try="$ac_compile"
1926case "(($ac_try" in
1927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1928  *) ac_try_echo=$ac_try;;
1929esac
1930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1931$as_echo "$ac_try_echo"; } >&5
1932  (eval "$ac_compile") 2>conftest.err
1933  ac_status=$?
1934  if test -s conftest.err; then
1935    grep -v '^ *+' conftest.err >conftest.er1
1936    cat conftest.er1 >&5
1937    mv -f conftest.er1 conftest.err
1938  fi
1939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1940  test $ac_status = 0; } && {
1941	 test -z "$ac_c_werror_flag" ||
1942	 test ! -s conftest.err
1943       } && test -s conftest.$ac_objext; then :
1944  ac_retval=0
1945else
1946  $as_echo "$as_me: failed program was:" >&5
1947sed 's/^/| /' conftest.$ac_ext >&5
1948
1949	ac_retval=1
1950fi
1951  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1952  as_fn_set_status $ac_retval
1953
1954} # ac_fn_c_try_compile
1955
1956# ac_fn_cxx_try_compile LINENO
1957# ----------------------------
1958# Try to compile conftest.$ac_ext, and return whether this succeeded.
1959ac_fn_cxx_try_compile ()
1960{
1961  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962  rm -f conftest.$ac_objext
1963  if { { ac_try="$ac_compile"
1964case "(($ac_try" in
1965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966  *) ac_try_echo=$ac_try;;
1967esac
1968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969$as_echo "$ac_try_echo"; } >&5
1970  (eval "$ac_compile") 2>conftest.err
1971  ac_status=$?
1972  if test -s conftest.err; then
1973    grep -v '^ *+' conftest.err >conftest.er1
1974    cat conftest.er1 >&5
1975    mv -f conftest.er1 conftest.err
1976  fi
1977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1978  test $ac_status = 0; } && {
1979	 test -z "$ac_cxx_werror_flag" ||
1980	 test ! -s conftest.err
1981       } && test -s conftest.$ac_objext; then :
1982  ac_retval=0
1983else
1984  $as_echo "$as_me: failed program was:" >&5
1985sed 's/^/| /' conftest.$ac_ext >&5
1986
1987	ac_retval=1
1988fi
1989  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1990  as_fn_set_status $ac_retval
1991
1992} # ac_fn_cxx_try_compile
1993
1994# ac_fn_objc_try_compile LINENO
1995# -----------------------------
1996# Try to compile conftest.$ac_ext, and return whether this succeeded.
1997ac_fn_objc_try_compile ()
1998{
1999  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000  rm -f conftest.$ac_objext
2001  if { { ac_try="$ac_compile"
2002case "(($ac_try" in
2003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2004  *) ac_try_echo=$ac_try;;
2005esac
2006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2007$as_echo "$ac_try_echo"; } >&5
2008  (eval "$ac_compile") 2>conftest.err
2009  ac_status=$?
2010  if test -s conftest.err; then
2011    grep -v '^ *+' conftest.err >conftest.er1
2012    cat conftest.er1 >&5
2013    mv -f conftest.er1 conftest.err
2014  fi
2015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2016  test $ac_status = 0; } && {
2017	 test -z "$ac_objc_werror_flag" ||
2018	 test ! -s conftest.err
2019       } && test -s conftest.$ac_objext; then :
2020  ac_retval=0
2021else
2022  $as_echo "$as_me: failed program was:" >&5
2023sed 's/^/| /' conftest.$ac_ext >&5
2024
2025	ac_retval=1
2026fi
2027  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2028  as_fn_set_status $ac_retval
2029
2030} # ac_fn_objc_try_compile
2031
2032# ac_fn_c_try_cpp LINENO
2033# ----------------------
2034# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2035ac_fn_c_try_cpp ()
2036{
2037  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038  if { { ac_try="$ac_cpp conftest.$ac_ext"
2039case "(($ac_try" in
2040  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2041  *) ac_try_echo=$ac_try;;
2042esac
2043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2044$as_echo "$ac_try_echo"; } >&5
2045  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2046  ac_status=$?
2047  if test -s conftest.err; then
2048    grep -v '^ *+' conftest.err >conftest.er1
2049    cat conftest.er1 >&5
2050    mv -f conftest.er1 conftest.err
2051  fi
2052  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2053  test $ac_status = 0; } > conftest.i && {
2054	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2055	 test ! -s conftest.err
2056       }; then :
2057  ac_retval=0
2058else
2059  $as_echo "$as_me: failed program was:" >&5
2060sed 's/^/| /' conftest.$ac_ext >&5
2061
2062    ac_retval=1
2063fi
2064  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2065  as_fn_set_status $ac_retval
2066
2067} # ac_fn_c_try_cpp
2068
2069# ac_fn_cxx_try_cpp LINENO
2070# ------------------------
2071# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2072ac_fn_cxx_try_cpp ()
2073{
2074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075  if { { ac_try="$ac_cpp conftest.$ac_ext"
2076case "(($ac_try" in
2077  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2078  *) ac_try_echo=$ac_try;;
2079esac
2080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2081$as_echo "$ac_try_echo"; } >&5
2082  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2083  ac_status=$?
2084  if test -s conftest.err; then
2085    grep -v '^ *+' conftest.err >conftest.er1
2086    cat conftest.er1 >&5
2087    mv -f conftest.er1 conftest.err
2088  fi
2089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2090  test $ac_status = 0; } > conftest.i && {
2091	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2092	 test ! -s conftest.err
2093       }; then :
2094  ac_retval=0
2095else
2096  $as_echo "$as_me: failed program was:" >&5
2097sed 's/^/| /' conftest.$ac_ext >&5
2098
2099    ac_retval=1
2100fi
2101  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2102  as_fn_set_status $ac_retval
2103
2104} # ac_fn_cxx_try_cpp
2105
2106# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2107# ---------------------------------------------------------
2108# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2109# the include files in INCLUDES and setting the cache variable VAR
2110# accordingly.
2111ac_fn_cxx_check_header_mongrel ()
2112{
2113  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114  if eval "test \"\${$3+set}\"" = set; then :
2115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2116$as_echo_n "checking for $2... " >&6; }
2117if eval "test \"\${$3+set}\"" = set; then :
2118  $as_echo_n "(cached) " >&6
2119fi
2120eval ac_res=\$$3
2121	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2122$as_echo "$ac_res" >&6; }
2123else
2124  # Is the header compilable?
2125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2126$as_echo_n "checking $2 usability... " >&6; }
2127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h.  */
2129$4
2130#include <$2>
2131_ACEOF
2132if ac_fn_cxx_try_compile "$LINENO"; then :
2133  ac_header_compiler=yes
2134else
2135  ac_header_compiler=no
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2139$as_echo "$ac_header_compiler" >&6; }
2140
2141# Is the header present?
2142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2143$as_echo_n "checking $2 presence... " >&6; }
2144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h.  */
2146#include <$2>
2147_ACEOF
2148if ac_fn_cxx_try_cpp "$LINENO"; then :
2149  ac_header_preproc=yes
2150else
2151  ac_header_preproc=no
2152fi
2153rm -f conftest.err conftest.i conftest.$ac_ext
2154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2155$as_echo "$ac_header_preproc" >&6; }
2156
2157# So?  What about this header?
2158case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2159  yes:no: )
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2161$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2163$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2164    ;;
2165  no:yes:* )
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2167$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2169$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2171$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2172    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2173$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2174    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2175$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2176( $as_echo "## ----------------------------------------- ##
2177## Report this to build-dev@openjdk.java.net ##
2178## ----------------------------------------- ##"
2179     ) | sed "s/^/$as_me: WARNING:     /" >&2
2180    ;;
2181esac
2182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2183$as_echo_n "checking for $2... " >&6; }
2184if eval "test \"\${$3+set}\"" = set; then :
2185  $as_echo_n "(cached) " >&6
2186else
2187  eval "$3=\$ac_header_compiler"
2188fi
2189eval ac_res=\$$3
2190	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2191$as_echo "$ac_res" >&6; }
2192fi
2193  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2194
2195} # ac_fn_cxx_check_header_mongrel
2196
2197# ac_fn_cxx_try_run LINENO
2198# ------------------------
2199# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2200# that executables *can* be run.
2201ac_fn_cxx_try_run ()
2202{
2203  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204  if { { ac_try="$ac_link"
2205case "(($ac_try" in
2206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207  *) ac_try_echo=$ac_try;;
2208esac
2209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2210$as_echo "$ac_try_echo"; } >&5
2211  (eval "$ac_link") 2>&5
2212  ac_status=$?
2213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2215  { { case "(($ac_try" in
2216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2217  *) ac_try_echo=$ac_try;;
2218esac
2219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2220$as_echo "$ac_try_echo"; } >&5
2221  (eval "$ac_try") 2>&5
2222  ac_status=$?
2223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224  test $ac_status = 0; }; }; then :
2225  ac_retval=0
2226else
2227  $as_echo "$as_me: program exited with status $ac_status" >&5
2228       $as_echo "$as_me: failed program was:" >&5
2229sed 's/^/| /' conftest.$ac_ext >&5
2230
2231       ac_retval=$ac_status
2232fi
2233  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2234  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235  as_fn_set_status $ac_retval
2236
2237} # ac_fn_cxx_try_run
2238
2239# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2240# ---------------------------------------------------------
2241# Tests whether HEADER exists and can be compiled using the include files in
2242# INCLUDES, setting the cache variable VAR accordingly.
2243ac_fn_cxx_check_header_compile ()
2244{
2245  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2247$as_echo_n "checking for $2... " >&6; }
2248if eval "test \"\${$3+set}\"" = set; then :
2249  $as_echo_n "(cached) " >&6
2250else
2251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h.  */
2253$4
2254#include <$2>
2255_ACEOF
2256if ac_fn_cxx_try_compile "$LINENO"; then :
2257  eval "$3=yes"
2258else
2259  eval "$3=no"
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262fi
2263eval ac_res=\$$3
2264	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2265$as_echo "$ac_res" >&6; }
2266  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2267
2268} # ac_fn_cxx_check_header_compile
2269
2270# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2271# ----------------------------------------------
2272# Tries to find the compile-time value of EXPR in a program that includes
2273# INCLUDES, setting VAR accordingly. Returns whether the value could be
2274# computed
2275ac_fn_cxx_compute_int ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  if test "$cross_compiling" = yes; then
2279    # Depending upon the size, compute the lo and hi bounds.
2280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h.  */
2282$4
2283int
2284main ()
2285{
2286static int test_array [1 - 2 * !(($2) >= 0)];
2287test_array [0] = 0
2288
2289  ;
2290  return 0;
2291}
2292_ACEOF
2293if ac_fn_cxx_try_compile "$LINENO"; then :
2294  ac_lo=0 ac_mid=0
2295  while :; do
2296    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h.  */
2298$4
2299int
2300main ()
2301{
2302static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2303test_array [0] = 0
2304
2305  ;
2306  return 0;
2307}
2308_ACEOF
2309if ac_fn_cxx_try_compile "$LINENO"; then :
2310  ac_hi=$ac_mid; break
2311else
2312  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2313			if test $ac_lo -le $ac_mid; then
2314			  ac_lo= ac_hi=
2315			  break
2316			fi
2317			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320  done
2321else
2322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h.  */
2324$4
2325int
2326main ()
2327{
2328static int test_array [1 - 2 * !(($2) < 0)];
2329test_array [0] = 0
2330
2331  ;
2332  return 0;
2333}
2334_ACEOF
2335if ac_fn_cxx_try_compile "$LINENO"; then :
2336  ac_hi=-1 ac_mid=-1
2337  while :; do
2338    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h.  */
2340$4
2341int
2342main ()
2343{
2344static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2345test_array [0] = 0
2346
2347  ;
2348  return 0;
2349}
2350_ACEOF
2351if ac_fn_cxx_try_compile "$LINENO"; then :
2352  ac_lo=$ac_mid; break
2353else
2354  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2355			if test $ac_mid -le $ac_hi; then
2356			  ac_lo= ac_hi=
2357			  break
2358			fi
2359			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362  done
2363else
2364  ac_lo= ac_hi=
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369# Binary search between lo and hi bounds.
2370while test "x$ac_lo" != "x$ac_hi"; do
2371  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374$4
2375int
2376main ()
2377{
2378static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2379test_array [0] = 0
2380
2381  ;
2382  return 0;
2383}
2384_ACEOF
2385if ac_fn_cxx_try_compile "$LINENO"; then :
2386  ac_hi=$ac_mid
2387else
2388  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391done
2392case $ac_lo in #((
2393?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2394'') ac_retval=1 ;;
2395esac
2396  else
2397    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2398/* end confdefs.h.  */
2399$4
2400static long int longval () { return $2; }
2401static unsigned long int ulongval () { return $2; }
2402#include <stdio.h>
2403#include <stdlib.h>
2404int
2405main ()
2406{
2407
2408  FILE *f = fopen ("conftest.val", "w");
2409  if (! f)
2410    return 1;
2411  if (($2) < 0)
2412    {
2413      long int i = longval ();
2414      if (i != ($2))
2415	return 1;
2416      fprintf (f, "%ld", i);
2417    }
2418  else
2419    {
2420      unsigned long int i = ulongval ();
2421      if (i != ($2))
2422	return 1;
2423      fprintf (f, "%lu", i);
2424    }
2425  /* Do not output a trailing newline, as this causes \r\n confusion
2426     on some platforms.  */
2427  return ferror (f) || fclose (f) != 0;
2428
2429  ;
2430  return 0;
2431}
2432_ACEOF
2433if ac_fn_cxx_try_run "$LINENO"; then :
2434  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2435else
2436  ac_retval=1
2437fi
2438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2439  conftest.$ac_objext conftest.beam conftest.$ac_ext
2440rm -f conftest.val
2441
2442  fi
2443  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2444  as_fn_set_status $ac_retval
2445
2446} # ac_fn_cxx_compute_int
2447
2448# ac_fn_cxx_try_link LINENO
2449# -------------------------
2450# Try to link conftest.$ac_ext, and return whether this succeeded.
2451ac_fn_cxx_try_link ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  rm -f conftest.$ac_objext conftest$ac_exeext
2455  if { { ac_try="$ac_link"
2456case "(($ac_try" in
2457  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2458  *) ac_try_echo=$ac_try;;
2459esac
2460eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2461$as_echo "$ac_try_echo"; } >&5
2462  (eval "$ac_link") 2>conftest.err
2463  ac_status=$?
2464  if test -s conftest.err; then
2465    grep -v '^ *+' conftest.err >conftest.er1
2466    cat conftest.er1 >&5
2467    mv -f conftest.er1 conftest.err
2468  fi
2469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470  test $ac_status = 0; } && {
2471	 test -z "$ac_cxx_werror_flag" ||
2472	 test ! -s conftest.err
2473       } && test -s conftest$ac_exeext && {
2474	 test "$cross_compiling" = yes ||
2475	 $as_test_x conftest$ac_exeext
2476       }; then :
2477  ac_retval=0
2478else
2479  $as_echo "$as_me: failed program was:" >&5
2480sed 's/^/| /' conftest.$ac_ext >&5
2481
2482	ac_retval=1
2483fi
2484  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2485  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2486  # interfere with the next link command; also delete a directory that is
2487  # left behind by Apple's compiler.  We do this before executing the actions.
2488  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2489  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2490  as_fn_set_status $ac_retval
2491
2492} # ac_fn_cxx_try_link
2493
2494# ac_fn_cxx_check_func LINENO FUNC VAR
2495# ------------------------------------
2496# Tests whether FUNC exists, setting the cache variable VAR accordingly
2497ac_fn_cxx_check_func ()
2498{
2499  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501$as_echo_n "checking for $2... " >&6; }
2502if eval "test \"\${$3+set}\"" = set; then :
2503  $as_echo_n "(cached) " >&6
2504else
2505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2506/* end confdefs.h.  */
2507/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2508   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2509#define $2 innocuous_$2
2510
2511/* System header to define __stub macros and hopefully few prototypes,
2512    which can conflict with char $2 (); below.
2513    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2514    <limits.h> exists even on freestanding compilers.  */
2515
2516#ifdef __STDC__
2517# include <limits.h>
2518#else
2519# include <assert.h>
2520#endif
2521
2522#undef $2
2523
2524/* Override any GCC internal prototype to avoid an error.
2525   Use char because int might match the return type of a GCC
2526   builtin and then its argument prototype would still apply.  */
2527#ifdef __cplusplus
2528extern "C"
2529#endif
2530char $2 ();
2531/* The GNU C library defines this for functions which it implements
2532    to always fail with ENOSYS.  Some functions are actually named
2533    something starting with __ and the normal name is an alias.  */
2534#if defined __stub_$2 || defined __stub___$2
2535choke me
2536#endif
2537
2538int
2539main ()
2540{
2541return $2 ();
2542  ;
2543  return 0;
2544}
2545_ACEOF
2546if ac_fn_cxx_try_link "$LINENO"; then :
2547  eval "$3=yes"
2548else
2549  eval "$3=no"
2550fi
2551rm -f core conftest.err conftest.$ac_objext \
2552    conftest$ac_exeext conftest.$ac_ext
2553fi
2554eval ac_res=\$$3
2555	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556$as_echo "$ac_res" >&6; }
2557  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2558
2559} # ac_fn_cxx_check_func
2560
2561# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2562# -------------------------------------------------------
2563# Tests whether HEADER exists and can be compiled using the include files in
2564# INCLUDES, setting the cache variable VAR accordingly.
2565ac_fn_c_check_header_compile ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2569$as_echo_n "checking for $2... " >&6; }
2570if eval "test \"\${$3+set}\"" = set; then :
2571  $as_echo_n "(cached) " >&6
2572else
2573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2574/* end confdefs.h.  */
2575$4
2576#include <$2>
2577_ACEOF
2578if ac_fn_c_try_compile "$LINENO"; then :
2579  eval "$3=yes"
2580else
2581  eval "$3=no"
2582fi
2583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2584fi
2585eval ac_res=\$$3
2586	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2587$as_echo "$ac_res" >&6; }
2588  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2589
2590} # ac_fn_c_check_header_compile
2591cat >config.log <<_ACEOF
2592This file contains any messages produced by compilers while
2593running configure, to aid debugging if configure makes a mistake.
2594
2595It was created by OpenJDK $as_me jdk8, which was
2596generated by GNU Autoconf 2.67.  Invocation command line was
2597
2598  $ $0 $@
2599
2600_ACEOF
2601exec 5>>config.log
2602{
2603cat <<_ASUNAME
2604## --------- ##
2605## Platform. ##
2606## --------- ##
2607
2608hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2609uname -m = `(uname -m) 2>/dev/null || echo unknown`
2610uname -r = `(uname -r) 2>/dev/null || echo unknown`
2611uname -s = `(uname -s) 2>/dev/null || echo unknown`
2612uname -v = `(uname -v) 2>/dev/null || echo unknown`
2613
2614/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2615/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2616
2617/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2618/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2619/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2620/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2621/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2622/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2623/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2624
2625_ASUNAME
2626
2627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628for as_dir in $PATH
2629do
2630  IFS=$as_save_IFS
2631  test -z "$as_dir" && as_dir=.
2632    $as_echo "PATH: $as_dir"
2633  done
2634IFS=$as_save_IFS
2635
2636} >&5
2637
2638cat >&5 <<_ACEOF
2639
2640
2641## ----------- ##
2642## Core tests. ##
2643## ----------- ##
2644
2645_ACEOF
2646
2647
2648# Keep a trace of the command line.
2649# Strip out --no-create and --no-recursion so they do not pile up.
2650# Strip out --silent because we don't want to record it for future runs.
2651# Also quote any args containing shell meta-characters.
2652# Make two passes to allow for proper duplicate-argument suppression.
2653ac_configure_args=
2654ac_configure_args0=
2655ac_configure_args1=
2656ac_must_keep_next=false
2657for ac_pass in 1 2
2658do
2659  for ac_arg
2660  do
2661    case $ac_arg in
2662    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2663    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2664    | -silent | --silent | --silen | --sile | --sil)
2665      continue ;;
2666    *\'*)
2667      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2668    esac
2669    case $ac_pass in
2670    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2671    2)
2672      as_fn_append ac_configure_args1 " '$ac_arg'"
2673      if test $ac_must_keep_next = true; then
2674	ac_must_keep_next=false # Got value, back to normal.
2675      else
2676	case $ac_arg in
2677	  *=* | --config-cache | -C | -disable-* | --disable-* \
2678	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2679	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2680	  | -with-* | --with-* | -without-* | --without-* | --x)
2681	    case "$ac_configure_args0 " in
2682	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2683	    esac
2684	    ;;
2685	  -* ) ac_must_keep_next=true ;;
2686	esac
2687      fi
2688      as_fn_append ac_configure_args " '$ac_arg'"
2689      ;;
2690    esac
2691  done
2692done
2693{ ac_configure_args0=; unset ac_configure_args0;}
2694{ ac_configure_args1=; unset ac_configure_args1;}
2695
2696# When interrupted or exit'd, cleanup temporary files, and complete
2697# config.log.  We remove comments because anyway the quotes in there
2698# would cause problems or look ugly.
2699# WARNING: Use '\'' to represent an apostrophe within the trap.
2700# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2701trap 'exit_status=$?
2702  # Save into config.log some information that might help in debugging.
2703  {
2704    echo
2705
2706    $as_echo "## ---------------- ##
2707## Cache variables. ##
2708## ---------------- ##"
2709    echo
2710    # The following way of writing the cache mishandles newlines in values,
2711(
2712  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2713    eval ac_val=\$$ac_var
2714    case $ac_val in #(
2715    *${as_nl}*)
2716      case $ac_var in #(
2717      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2718$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2719      esac
2720      case $ac_var in #(
2721      _ | IFS | as_nl) ;; #(
2722      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2723      *) { eval $ac_var=; unset $ac_var;} ;;
2724      esac ;;
2725    esac
2726  done
2727  (set) 2>&1 |
2728    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2729    *${as_nl}ac_space=\ *)
2730      sed -n \
2731	"s/'\''/'\''\\\\'\'''\''/g;
2732	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2733      ;; #(
2734    *)
2735      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2736      ;;
2737    esac |
2738    sort
2739)
2740    echo
2741
2742    $as_echo "## ----------------- ##
2743## Output variables. ##
2744## ----------------- ##"
2745    echo
2746    for ac_var in $ac_subst_vars
2747    do
2748      eval ac_val=\$$ac_var
2749      case $ac_val in
2750      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2751      esac
2752      $as_echo "$ac_var='\''$ac_val'\''"
2753    done | sort
2754    echo
2755
2756    if test -n "$ac_subst_files"; then
2757      $as_echo "## ------------------- ##
2758## File substitutions. ##
2759## ------------------- ##"
2760      echo
2761      for ac_var in $ac_subst_files
2762      do
2763	eval ac_val=\$$ac_var
2764	case $ac_val in
2765	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2766	esac
2767	$as_echo "$ac_var='\''$ac_val'\''"
2768      done | sort
2769      echo
2770    fi
2771
2772    if test -s confdefs.h; then
2773      $as_echo "## ----------- ##
2774## confdefs.h. ##
2775## ----------- ##"
2776      echo
2777      cat confdefs.h
2778      echo
2779    fi
2780    test "$ac_signal" != 0 &&
2781      $as_echo "$as_me: caught signal $ac_signal"
2782    $as_echo "$as_me: exit $exit_status"
2783  } >&5
2784  rm -f core *.core core.conftest.* &&
2785    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2786    exit $exit_status
2787' 0
2788for ac_signal in 1 2 13 15; do
2789  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2790done
2791ac_signal=0
2792
2793# confdefs.h avoids OS command line length limits that DEFS can exceed.
2794rm -f -r conftest* confdefs.h
2795
2796$as_echo "/* confdefs.h */" > confdefs.h
2797
2798# Predefined preprocessor variables.
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_NAME "$PACKAGE_NAME"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_VERSION "$PACKAGE_VERSION"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_STRING "$PACKAGE_STRING"
2814_ACEOF
2815
2816cat >>confdefs.h <<_ACEOF
2817#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2818_ACEOF
2819
2820cat >>confdefs.h <<_ACEOF
2821#define PACKAGE_URL "$PACKAGE_URL"
2822_ACEOF
2823
2824
2825# Let the site file select an alternate cache file if it wants to.
2826# Prefer an explicitly selected file to automatically selected ones.
2827ac_site_file1=NONE
2828ac_site_file2=NONE
2829if test -n "$CONFIG_SITE"; then
2830  # We do not want a PATH search for config.site.
2831  case $CONFIG_SITE in #((
2832    -*)  ac_site_file1=./$CONFIG_SITE;;
2833    */*) ac_site_file1=$CONFIG_SITE;;
2834    *)   ac_site_file1=./$CONFIG_SITE;;
2835  esac
2836elif test "x$prefix" != xNONE; then
2837  ac_site_file1=$prefix/share/config.site
2838  ac_site_file2=$prefix/etc/config.site
2839else
2840  ac_site_file1=$ac_default_prefix/share/config.site
2841  ac_site_file2=$ac_default_prefix/etc/config.site
2842fi
2843for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2844do
2845  test "x$ac_site_file" = xNONE && continue
2846  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2847    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2848$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2849    sed 's/^/| /' "$ac_site_file" >&5
2850    . "$ac_site_file" \
2851      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2853as_fn_error $? "failed to load site script $ac_site_file
2854See \`config.log' for more details" "$LINENO" 5; }
2855  fi
2856done
2857
2858if test -r "$cache_file"; then
2859  # Some versions of bash will fail to source /dev/null (special files
2860  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2861  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2862    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2863$as_echo "$as_me: loading cache $cache_file" >&6;}
2864    case $cache_file in
2865      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2866      *)                      . "./$cache_file";;
2867    esac
2868  fi
2869else
2870  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2871$as_echo "$as_me: creating cache $cache_file" >&6;}
2872  >$cache_file
2873fi
2874
2875# Check that the precious variables saved in the cache have kept the same
2876# value.
2877ac_cache_corrupted=false
2878for ac_var in $ac_precious_vars; do
2879  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2880  eval ac_new_set=\$ac_env_${ac_var}_set
2881  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2882  eval ac_new_val=\$ac_env_${ac_var}_value
2883  case $ac_old_set,$ac_new_set in
2884    set,)
2885      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2886$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2887      ac_cache_corrupted=: ;;
2888    ,set)
2889      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2890$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2891      ac_cache_corrupted=: ;;
2892    ,);;
2893    *)
2894      if test "x$ac_old_val" != "x$ac_new_val"; then
2895	# differences in whitespace do not lead to failure.
2896	ac_old_val_w=`echo x $ac_old_val`
2897	ac_new_val_w=`echo x $ac_new_val`
2898	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2899	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2900$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2901	  ac_cache_corrupted=:
2902	else
2903	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2904$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2905	  eval $ac_var=\$ac_old_val
2906	fi
2907	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2908$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2909	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2910$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2911      fi;;
2912  esac
2913  # Pass precious variables to config.status.
2914  if test "$ac_new_set" = set; then
2915    case $ac_new_val in
2916    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2917    *) ac_arg=$ac_var=$ac_new_val ;;
2918    esac
2919    case " $ac_configure_args " in
2920      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2921      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2922    esac
2923  fi
2924done
2925if $ac_cache_corrupted; then
2926  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2928  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2929$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2930  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2931fi
2932## -------------------- ##
2933## Main body of script. ##
2934## -------------------- ##
2935
2936ac_ext=c
2937ac_cpp='$CPP $CPPFLAGS'
2938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2940ac_compiler_gnu=$ac_cv_c_compiler_gnu
2941
2942
2943
2944ac_aux_dir=
2945for ac_dir in build-aux "$srcdir"/build-aux; do
2946  if test -f "$ac_dir/install-sh"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/install-sh -c"
2949    break
2950  elif test -f "$ac_dir/install.sh"; then
2951    ac_aux_dir=$ac_dir
2952    ac_install_sh="$ac_aux_dir/install.sh -c"
2953    break
2954  elif test -f "$ac_dir/shtool"; then
2955    ac_aux_dir=$ac_dir
2956    ac_install_sh="$ac_aux_dir/shtool install -c"
2957    break
2958  fi
2959done
2960if test -z "$ac_aux_dir"; then
2961  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2962fi
2963
2964# These three variables are undocumented and unsupported,
2965# and are intended to be withdrawn in a future Autoconf release.
2966# They can cause serious problems if a builder's source tree is in a directory
2967# whose full name contains unusual characters.
2968ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2969ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2970ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2971
2972
2973# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2974
2975#
2976# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2978#
2979# This code is free software; you can redistribute it and/or modify it
2980# under the terms of the GNU General Public License version 2 only, as
2981# published by the Free Software Foundation.  Oracle designates this
2982# particular file as subject to the "Classpath" exception as provided
2983# by Oracle in the LICENSE file that accompanied this code.
2984#
2985# This code is distributed in the hope that it will be useful, but WITHOUT
2986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2988# version 2 for more details (a copy is included in the LICENSE file that
2989# accompanied this code).
2990#
2991# You should have received a copy of the GNU General Public License version
2992# 2 along with this work; if not, write to the Free Software Foundation,
2993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2994#
2995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2996# or visit www.oracle.com if you need additional information or have any
2997# questions.
2998#
2999
3000#
3001# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3002#
3003# This program is free software; you can redistribute it and/or modify
3004# it under the terms of the GNU General Public License as published by
3005# the Free Software Foundation; either version 2 of the License, or
3006# (at your option) any later version.
3007#
3008# This program is distributed in the hope that it will be useful, but
3009# WITHOUT ANY WARRANTY; without even the implied warranty of
3010# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3011# General Public License for more details.
3012#
3013# You should have received a copy of the GNU General Public License
3014# along with this program; if not, write to the Free Software
3015# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3016#
3017# As a special exception to the GNU General Public License, if you
3018# distribute this file as part of a program that contains a
3019# configuration script generated by Autoconf, you may include it under
3020# the same distribution terms that you use for the rest of that program.
3021
3022# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3023# ----------------------------------
3024# PKG_PROG_PKG_CONFIG
3025
3026# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3027#
3028# Check to see whether a particular set of modules exists.  Similar
3029# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3030#
3031#
3032# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3033# this or PKG_CHECK_MODULES is called, or make sure to call
3034# PKG_CHECK_EXISTS manually
3035# --------------------------------------------------------------
3036
3037
3038
3039# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3040# ---------------------------------------------
3041# _PKG_CONFIG
3042
3043# _PKG_SHORT_ERRORS_SUPPORTED
3044# -----------------------------
3045# _PKG_SHORT_ERRORS_SUPPORTED
3046
3047
3048# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3049# [ACTION-IF-NOT-FOUND])
3050#
3051#
3052# Note that if there is a possibility the first call to
3053# PKG_CHECK_MODULES might not happen, you should be sure to include an
3054# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3055#
3056#
3057# --------------------------------------------------------------
3058# PKG_CHECK_MODULES
3059
3060
3061# Include these first...
3062#
3063# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3064# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3065#
3066# This code is free software; you can redistribute it and/or modify it
3067# under the terms of the GNU General Public License version 2 only, as
3068# published by the Free Software Foundation.  Oracle designates this
3069# particular file as subject to the "Classpath" exception as provided
3070# by Oracle in the LICENSE file that accompanied this code.
3071#
3072# This code is distributed in the hope that it will be useful, but WITHOUT
3073# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3074# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3075# version 2 for more details (a copy is included in the LICENSE file that
3076# accompanied this code).
3077#
3078# You should have received a copy of the GNU General Public License version
3079# 2 along with this work; if not, write to the Free Software Foundation,
3080# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3081#
3082# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3083# or visit www.oracle.com if you need additional information or have any
3084# questions.
3085#
3086
3087# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3088# If so, then append $1 to $2\
3089# Also set JVM_ARG_OK to true/false depending on outcome.
3090
3091
3092# This will make sure the given variable points to a full and proper
3093# path. This means:
3094# 1) There will be no spaces in the path. On posix platforms,
3095#    spaces in the path will result in an error. On Windows,
3096#    the path will be rewritten using short-style to be space-free.
3097# 2) The path will be absolute, and it will be in unix-style (on
3098#     cygwin).
3099# $1: The name of the variable to fix
3100
3101
3102# This will make sure the given variable points to a executable
3103# with a full and proper path. This means:
3104# 1) There will be no spaces in the path. On posix platforms,
3105#    spaces in the path will result in an error. On Windows,
3106#    the path will be rewritten using short-style to be space-free.
3107# 2) The path will be absolute, and it will be in unix-style (on
3108#     cygwin).
3109# Any arguments given to the executable is preserved.
3110# If the input variable does not have a directory specification, then
3111# it need to be in the PATH.
3112# $1: The name of the variable to fix
3113
3114
3115
3116
3117
3118
3119# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3120# $1: variable to check
3121# $2: executable name to print in warning (optional)
3122
3123
3124# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3125# Arguments as AC_PATH_PROG:
3126# $1: variable to set
3127# $2: executable name to look for
3128
3129
3130# Setup the most fundamental tools that relies on not much else to set up,
3131# but is used by much of the early bootstrap code.
3132
3133
3134# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3135
3136
3137
3138
3139
3140
3141
3142#%%% Simple tools %%%
3143
3144# Check if we have found a usable version of make
3145# $1: the path to a potential make binary (or empty)
3146# $2: the description on how we found this
3147
3148
3149# Goes looking for a usable version of GNU make.
3150
3151
3152
3153
3154
3155
3156# Check if build directory is on local disk. If not possible to determine,
3157# we prefer to claim it's local.
3158# Argument 1: directory to test
3159# Argument 2: what to do if it is on local disk
3160# Argument 3: what to do otherwise (remote disk or failure)
3161
3162
3163# Check that source files have basic read permissions set. This might
3164# not be the case in cygwin in certain conditions.
3165
3166
3167
3168
3169#
3170# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3171# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3172#
3173# This code is free software; you can redistribute it and/or modify it
3174# under the terms of the GNU General Public License version 2 only, as
3175# published by the Free Software Foundation.  Oracle designates this
3176# particular file as subject to the "Classpath" exception as provided
3177# by Oracle in the LICENSE file that accompanied this code.
3178#
3179# This code is distributed in the hope that it will be useful, but WITHOUT
3180# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3181# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3182# version 2 for more details (a copy is included in the LICENSE file that
3183# accompanied this code).
3184#
3185# You should have received a copy of the GNU General Public License version
3186# 2 along with this work; if not, write to the Free Software Foundation,
3187# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3188#
3189# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3190# or visit www.oracle.com if you need additional information or have any
3191# questions.
3192#
3193
3194
3195
3196
3197
3198# Helper function which possibly converts a path using DOS-style short mode.
3199# If so, the updated path is stored in $new_path.
3200# $1: The path to check
3201
3202
3203# Helper function which possibly converts a path using DOS-style short mode.
3204# If so, the updated path is stored in $new_path.
3205# $1: The path to check
3206
3207
3208# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3209# and could probably be heavily simplified. However, all changes in this
3210# area tend to need lot of testing in different scenarios, and in lack of
3211# proper unit testing, cleaning this up has not been deemed worth the effort
3212# at the moment.
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3223
3224
3225
3226
3227#
3228# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3229# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3230#
3231# This code is free software; you can redistribute it and/or modify it
3232# under the terms of the GNU General Public License version 2 only, as
3233# published by the Free Software Foundation.  Oracle designates this
3234# particular file as subject to the "Classpath" exception as provided
3235# by Oracle in the LICENSE file that accompanied this code.
3236#
3237# This code is distributed in the hope that it will be useful, but WITHOUT
3238# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3239# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3240# version 2 for more details (a copy is included in the LICENSE file that
3241# accompanied this code).
3242#
3243# You should have received a copy of the GNU General Public License version
3244# 2 along with this work; if not, write to the Free Software Foundation,
3245# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3246#
3247# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3248# or visit www.oracle.com if you need additional information or have any
3249# questions.
3250#
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262# ... then the rest
3263#
3264# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288# Execute the check given as argument, and verify the result
3289# If the Boot JDK was previously found, do nothing
3290# $1 A command line (typically autoconf macro) to execute
3291
3292
3293# Test: Is bootjdk explicitely set by command line arguments?
3294
3295
3296# Test: Is bootjdk available from builddeps?
3297
3298
3299# Test: Is $JAVA_HOME set?
3300
3301
3302# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3303
3304
3305# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3306
3307
3308# Look for a jdk in the given path. If there are multiple, try to select the newest.
3309# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3310# $1 = Path to directory containing jdk installations.
3311# $2 = String to append to the found JDK directory to get the proper JDK home
3312
3313
3314# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3315# environmental variable as base for where to look.
3316# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3317
3318
3319# Test: Is there a JDK installed in default, well-known locations?
3320
3321
3322# Check that a command-line tool in the Boot JDK is correct
3323# $1 = name of variable to assign
3324# $2 = name of binary
3325
3326
3327###############################################################################
3328#
3329# We need a Boot JDK to bootstrap the build.
3330#
3331
3332
3333
3334
3335
3336#
3337# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3338# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3339#
3340# This code is free software; you can redistribute it and/or modify it
3341# under the terms of the GNU General Public License version 2 only, as
3342# published by the Free Software Foundation.  Oracle designates this
3343# particular file as subject to the "Classpath" exception as provided
3344# by Oracle in the LICENSE file that accompanied this code.
3345#
3346# This code is distributed in the hope that it will be useful, but WITHOUT
3347# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3348# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3349# version 2 for more details (a copy is included in the LICENSE file that
3350# accompanied this code).
3351#
3352# You should have received a copy of the GNU General Public License version
3353# 2 along with this work; if not, write to the Free Software Foundation,
3354# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3355#
3356# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3357# or visit www.oracle.com if you need additional information or have any
3358# questions.
3359#
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380#
3381# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3383#
3384# This code is free software; you can redistribute it and/or modify it
3385# under the terms of the GNU General Public License version 2 only, as
3386# published by the Free Software Foundation.  Oracle designates this
3387# particular file as subject to the "Classpath" exception as provided
3388# by Oracle in the LICENSE file that accompanied this code.
3389#
3390# This code is distributed in the hope that it will be useful, but WITHOUT
3391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3393# version 2 for more details (a copy is included in the LICENSE file that
3394# accompanied this code).
3395#
3396# You should have received a copy of the GNU General Public License version
3397# 2 along with this work; if not, write to the Free Software Foundation,
3398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3399#
3400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3401# or visit www.oracle.com if you need additional information or have any
3402# questions.
3403#
3404
3405
3406
3407
3408
3409cygwin_help() {
3410    case $1 in
3411    unzip)
3412        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3413    zip)
3414        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3415    make)
3416        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3417    * )
3418       break ;;
3419    esac
3420}
3421
3422apt_help() {
3423    case $1 in
3424    devkit)
3425        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3426    openjdk)
3427        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3428    alsa)
3429        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3430    cups)
3431        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3432    freetype2)
3433        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3434    pulse)
3435        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3436    x11)
3437        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3438    ccache)
3439        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3440    * )
3441       break ;;
3442    esac
3443}
3444
3445yum_help() {
3446    case $1 in
3447    devkit)
3448        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3449    openjdk)
3450        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3451    alsa)
3452        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3453    cups)
3454        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3455    freetype2)
3456        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3457    pulse)
3458        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3459    x11)
3460        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3461    ccache)
3462        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3463    * )
3464       break ;;
3465    esac
3466}
3467
3468port_help() {
3469    PKGHANDLER_COMMAND=""
3470}
3471
3472pkgutil_help() {
3473    PKGHANDLER_COMMAND=""
3474}
3475
3476pkgadd_help() {
3477    PKGHANDLER_COMMAND=""
3478}
3479
3480
3481
3482#
3483# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3485#
3486# This code is free software; you can redistribute it and/or modify it
3487# under the terms of the GNU General Public License version 2 only, as
3488# published by the Free Software Foundation.  Oracle designates this
3489# particular file as subject to the "Classpath" exception as provided
3490# by Oracle in the LICENSE file that accompanied this code.
3491#
3492# This code is distributed in the hope that it will be useful, but WITHOUT
3493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3495# version 2 for more details (a copy is included in the LICENSE file that
3496# accompanied this code).
3497#
3498# You should have received a copy of the GNU General Public License version
3499# 2 along with this work; if not, write to the Free Software Foundation,
3500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3501#
3502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3503# or visit www.oracle.com if you need additional information or have any
3504# questions.
3505#
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516###############################################################################
3517#
3518# Should we build only OpenJDK even if closed sources are present?
3519#
3520
3521
3522
3523
3524###############################################################################
3525#
3526# Setup version numbers
3527#
3528
3529
3530
3531
3532
3533
3534# Support for customization of the build process. Some build files
3535# will include counterparts from this location, if they exist. This allows
3536# for a degree of customization of the build targets and the rules/recipes
3537# to create them
3538
3539# Check whether --with-custom-make-dir was given.
3540if test "${with_custom_make_dir+set}" = set; then :
3541  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3542fi
3543
3544
3545
3546#
3547# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3548# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3549#
3550# This code is free software; you can redistribute it and/or modify it
3551# under the terms of the GNU General Public License version 2 only, as
3552# published by the Free Software Foundation.  Oracle designates this
3553# particular file as subject to the "Classpath" exception as provided
3554# by Oracle in the LICENSE file that accompanied this code.
3555#
3556# This code is distributed in the hope that it will be useful, but WITHOUT
3557# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3558# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3559# version 2 for more details (a copy is included in the LICENSE file that
3560# accompanied this code).
3561#
3562# You should have received a copy of the GNU General Public License version
3563# 2 along with this work; if not, write to the Free Software Foundation,
3564# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3565#
3566# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3567# or visit www.oracle.com if you need additional information or have any
3568# questions.
3569#
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585#
3586# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3587# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3588#
3589# This code is free software; you can redistribute it and/or modify it
3590# under the terms of the GNU General Public License version 2 only, as
3591# published by the Free Software Foundation.  Oracle designates this
3592# particular file as subject to the "Classpath" exception as provided
3593# by Oracle in the LICENSE file that accompanied this code.
3594#
3595# This code is distributed in the hope that it will be useful, but WITHOUT
3596# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3597# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3598# version 2 for more details (a copy is included in the LICENSE file that
3599# accompanied this code).
3600#
3601# You should have received a copy of the GNU General Public License version
3602# 2 along with this work; if not, write to the Free Software Foundation,
3603# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3604#
3605# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3606# or visit www.oracle.com if you need additional information or have any
3607# questions.
3608#
3609
3610# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3611# Converts autoconf style CPU name to OpenJDK style, into
3612# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3613
3614
3615# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3616# Converts autoconf style OS name to OpenJDK style, into
3617# VAR_OS and VAR_OS_API.
3618
3619
3620# Expects $host_os $host_cpu $build_os and $build_cpu
3621# and $with_target_bits to have been setup!
3622#
3623# Translate the standard triplet(quadruplet) definition
3624# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3625# OPENJDK_BUILD_OS, etc.
3626
3627
3628# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3629# accordingly. Must be done after setting up build and target system, but before
3630# doing anything else with these values.
3631
3632
3633    # Setup the legacy variables, for controlling the old makefiles.
3634    #
3635
3636
3637
3638
3639#%%% Build and target systems %%%
3640
3641
3642
3643
3644# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3645# Add -mX to various FLAGS variables.
3646
3647
3648
3649
3650
3651
3652#
3653# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3655#
3656# This code is free software; you can redistribute it and/or modify it
3657# under the terms of the GNU General Public License version 2 only, as
3658# published by the Free Software Foundation.  Oracle designates this
3659# particular file as subject to the "Classpath" exception as provided
3660# by Oracle in the LICENSE file that accompanied this code.
3661#
3662# This code is distributed in the hope that it will be useful, but WITHOUT
3663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3665# version 2 for more details (a copy is included in the LICENSE file that
3666# accompanied this code).
3667#
3668# You should have received a copy of the GNU General Public License version
3669# 2 along with this work; if not, write to the Free Software Foundation,
3670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3671#
3672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3673# or visit www.oracle.com if you need additional information or have any
3674# questions.
3675#
3676
3677
3678
3679
3680
3681
3682
3683
3684#
3685# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3687#
3688# This code is free software; you can redistribute it and/or modify it
3689# under the terms of the GNU General Public License version 2 only, as
3690# published by the Free Software Foundation.  Oracle designates this
3691# particular file as subject to the "Classpath" exception as provided
3692# by Oracle in the LICENSE file that accompanied this code.
3693#
3694# This code is distributed in the hope that it will be useful, but WITHOUT
3695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3697# version 2 for more details (a copy is included in the LICENSE file that
3698# accompanied this code).
3699#
3700# You should have received a copy of the GNU General Public License version
3701# 2 along with this work; if not, write to the Free Software Foundation,
3702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3703#
3704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3705# or visit www.oracle.com if you need additional information or have any
3706# questions.
3707#
3708
3709# $1 = compiler to test (CC or CXX)
3710# $2 = human readable name of compiler (C or C++)
3711
3712
3713
3714
3715
3716# $1 = compiler to test (CC or CXX)
3717# $2 = human readable name of compiler (C or C++)
3718# $3 = list of compiler names to search for
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3733#                                   [RUN-IF-FALSE])
3734# ------------------------------------------------------------
3735# Check that the c and c++ compilers support an argument
3736
3737
3738
3739
3740# Setup the JTREG paths
3741
3742
3743#
3744# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3745# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3746#
3747# This code is free software; you can redistribute it and/or modify it
3748# under the terms of the GNU General Public License version 2 only, as
3749# published by the Free Software Foundation.  Oracle designates this
3750# particular file as subject to the "Classpath" exception as provided
3751# by Oracle in the LICENSE file that accompanied this code.
3752#
3753# This code is distributed in the hope that it will be useful, but WITHOUT
3754# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3755# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3756# version 2 for more details (a copy is included in the LICENSE file that
3757# accompanied this code).
3758#
3759# You should have received a copy of the GNU General Public License version
3760# 2 along with this work; if not, write to the Free Software Foundation,
3761# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3762#
3763# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3764# or visit www.oracle.com if you need additional information or have any
3765# questions.
3766#
3767
3768
3769
3770
3771
3772
3773
3774# Check if the VS env variables were setup prior to running configure.
3775# If not, then find vcvarsall.bat and run it automatically, and integrate
3776# the set env variables into the spec file.
3777
3778
3779
3780# Setup the DXSDK paths
3781
3782
3783
3784
3785
3786
3787# This line needs to be here, verbatim, after all includes and the dummy hook
3788# definitions. It is replaced with custom functionality when building
3789# custom sources.
3790#CUSTOM_AUTOCONF_INCLUDE
3791
3792# Do not change or remove the following line, it is needed for consistency checks:
3793DATE_WHEN_GENERATED=1372808067
3794
3795###############################################################################
3796#
3797# Initialization / Boot-strapping
3798#
3799# The bootstrapping process needs to solve the "chicken or the egg" problem,
3800# thus it jumps back and forth, each time gaining something needed later on.
3801#
3802###############################################################################
3803
3804# Basic initialization that must happen first of all
3805
3806# Save the original command line. This is passed to us by the wrapper configure script.
3807
3808DATE_WHEN_CONFIGURED=`LANG=C date`
3809
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3811$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3812{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3813$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3814
3815
3816
3817# Start with tools that do not need have cross compilation support
3818# and can be expected to be found in the default PATH. These tools are
3819# used by configure. Nor are these tools expected to be found in the
3820# devkit from the builddeps server either, since they are
3821# needed to download the devkit.
3822
3823# First are all the simple required tools.
3824
3825    for ac_prog in basename
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if test "${ac_cv_path_BASENAME+set}" = set; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $BASENAME in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857BASENAME=$ac_cv_path_BASENAME
3858if test -n "$BASENAME"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3860$as_echo "$BASENAME" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$BASENAME" && break
3868done
3869
3870
3871    if test "x$BASENAME" = x; then
3872        if test "xbasename" = x; then
3873          PROG_NAME=basename
3874        else
3875          PROG_NAME=basename
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in bash
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if test "${ac_cv_path_BASH+set}" = set; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $BASH in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916BASH=$ac_cv_path_BASH
3917if test -n "$BASH"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3919$as_echo "$BASH" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$BASH" && break
3927done
3928
3929
3930    if test "x$BASH" = x; then
3931        if test "xbash" = x; then
3932          PROG_NAME=bash
3933        else
3934          PROG_NAME=bash
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in cat
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if test "${ac_cv_path_CAT+set}" = set; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CAT in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CAT=$ac_cv_path_CAT
3976if test -n "$CAT"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3978$as_echo "$CAT" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CAT" && break
3986done
3987
3988
3989    if test "x$CAT" = x; then
3990        if test "xcat" = x; then
3991          PROG_NAME=cat
3992        else
3993          PROG_NAME=cat
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in chmod
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if test "${ac_cv_path_CHMOD+set}" = set; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CHMOD in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CHMOD=$ac_cv_path_CHMOD
4035if test -n "$CHMOD"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4037$as_echo "$CHMOD" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CHMOD" && break
4045done
4046
4047
4048    if test "x$CHMOD" = x; then
4049        if test "xchmod" = x; then
4050          PROG_NAME=chmod
4051        else
4052          PROG_NAME=chmod
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in cmp
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if test "${ac_cv_path_CMP+set}" = set; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $CMP in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093CMP=$ac_cv_path_CMP
4094if test -n "$CMP"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4096$as_echo "$CMP" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$CMP" && break
4104done
4105
4106
4107    if test "x$CMP" = x; then
4108        if test "xcmp" = x; then
4109          PROG_NAME=cmp
4110        else
4111          PROG_NAME=cmp
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in comm
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if test "${ac_cv_path_COMM+set}" = set; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $COMM in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152COMM=$ac_cv_path_COMM
4153if test -n "$COMM"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4155$as_echo "$COMM" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$COMM" && break
4163done
4164
4165
4166    if test "x$COMM" = x; then
4167        if test "xcomm" = x; then
4168          PROG_NAME=comm
4169        else
4170          PROG_NAME=comm
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in cp
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if test "${ac_cv_path_CP+set}" = set; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $CP in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211CP=$ac_cv_path_CP
4212if test -n "$CP"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4214$as_echo "$CP" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$CP" && break
4222done
4223
4224
4225    if test "x$CP" = x; then
4226        if test "xcp" = x; then
4227          PROG_NAME=cp
4228        else
4229          PROG_NAME=cp
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in cpio
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if test "${ac_cv_path_CPIO+set}" = set; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $CPIO in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270CPIO=$ac_cv_path_CPIO
4271if test -n "$CPIO"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4273$as_echo "$CPIO" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$CPIO" && break
4281done
4282
4283
4284    if test "x$CPIO" = x; then
4285        if test "xcpio" = x; then
4286          PROG_NAME=cpio
4287        else
4288          PROG_NAME=cpio
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in cut
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if test "${ac_cv_path_CUT+set}" = set; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $CUT in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329CUT=$ac_cv_path_CUT
4330if test -n "$CUT"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4332$as_echo "$CUT" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$CUT" && break
4340done
4341
4342
4343    if test "x$CUT" = x; then
4344        if test "xcut" = x; then
4345          PROG_NAME=cut
4346        else
4347          PROG_NAME=cut
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in date
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if test "${ac_cv_path_DATE+set}" = set; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $DATE in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388DATE=$ac_cv_path_DATE
4389if test -n "$DATE"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4391$as_echo "$DATE" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$DATE" && break
4399done
4400
4401
4402    if test "x$DATE" = x; then
4403        if test "xdate" = x; then
4404          PROG_NAME=date
4405        else
4406          PROG_NAME=date
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in gdiff diff
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if test "${ac_cv_path_DIFF+set}" = set; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $DIFF in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447DIFF=$ac_cv_path_DIFF
4448if test -n "$DIFF"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4450$as_echo "$DIFF" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$DIFF" && break
4458done
4459
4460
4461    if test "x$DIFF" = x; then
4462        if test "xgdiff diff" = x; then
4463          PROG_NAME=diff
4464        else
4465          PROG_NAME=gdiff diff
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in dirname
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if test "${ac_cv_path_DIRNAME+set}" = set; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $DIRNAME in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506DIRNAME=$ac_cv_path_DIRNAME
4507if test -n "$DIRNAME"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4509$as_echo "$DIRNAME" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$DIRNAME" && break
4517done
4518
4519
4520    if test "x$DIRNAME" = x; then
4521        if test "xdirname" = x; then
4522          PROG_NAME=dirname
4523        else
4524          PROG_NAME=dirname
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in echo
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if test "${ac_cv_path_ECHO+set}" = set; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $ECHO in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565ECHO=$ac_cv_path_ECHO
4566if test -n "$ECHO"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4568$as_echo "$ECHO" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$ECHO" && break
4576done
4577
4578
4579    if test "x$ECHO" = x; then
4580        if test "xecho" = x; then
4581          PROG_NAME=echo
4582        else
4583          PROG_NAME=echo
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in expr
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if test "${ac_cv_path_EXPR+set}" = set; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $EXPR in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624EXPR=$ac_cv_path_EXPR
4625if test -n "$EXPR"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4627$as_echo "$EXPR" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$EXPR" && break
4635done
4636
4637
4638    if test "x$EXPR" = x; then
4639        if test "xexpr" = x; then
4640          PROG_NAME=expr
4641        else
4642          PROG_NAME=expr
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in file
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_path_FILE+set}" = set; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $FILE in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683FILE=$ac_cv_path_FILE
4684if test -n "$FILE"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4686$as_echo "$FILE" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$FILE" && break
4694done
4695
4696
4697    if test "x$FILE" = x; then
4698        if test "xfile" = x; then
4699          PROG_NAME=file
4700        else
4701          PROG_NAME=file
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in find
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if test "${ac_cv_path_FIND+set}" = set; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $FIND in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742FIND=$ac_cv_path_FIND
4743if test -n "$FIND"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4745$as_echo "$FIND" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$FIND" && break
4753done
4754
4755
4756    if test "x$FIND" = x; then
4757        if test "xfind" = x; then
4758          PROG_NAME=find
4759        else
4760          PROG_NAME=find
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in head
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_path_HEAD+set}" = set; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $HEAD in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801HEAD=$ac_cv_path_HEAD
4802if test -n "$HEAD"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4804$as_echo "$HEAD" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$HEAD" && break
4812done
4813
4814
4815    if test "x$HEAD" = x; then
4816        if test "xhead" = x; then
4817          PROG_NAME=head
4818        else
4819          PROG_NAME=head
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in ln
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_path_LN+set}" = set; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $LN in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860LN=$ac_cv_path_LN
4861if test -n "$LN"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4863$as_echo "$LN" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$LN" && break
4871done
4872
4873
4874    if test "x$LN" = x; then
4875        if test "xln" = x; then
4876          PROG_NAME=ln
4877        else
4878          PROG_NAME=ln
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in ls
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_path_LS+set}" = set; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $LS in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919LS=$ac_cv_path_LS
4920if test -n "$LS"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4922$as_echo "$LS" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$LS" && break
4930done
4931
4932
4933    if test "x$LS" = x; then
4934        if test "xls" = x; then
4935          PROG_NAME=ls
4936        else
4937          PROG_NAME=ls
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in mkdir
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if test "${ac_cv_path_MKDIR+set}" = set; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $MKDIR in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978MKDIR=$ac_cv_path_MKDIR
4979if test -n "$MKDIR"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4981$as_echo "$MKDIR" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$MKDIR" && break
4989done
4990
4991
4992    if test "x$MKDIR" = x; then
4993        if test "xmkdir" = x; then
4994          PROG_NAME=mkdir
4995        else
4996          PROG_NAME=mkdir
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in mktemp
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if test "${ac_cv_path_MKTEMP+set}" = set; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $MKTEMP in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037MKTEMP=$ac_cv_path_MKTEMP
5038if test -n "$MKTEMP"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5040$as_echo "$MKTEMP" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$MKTEMP" && break
5048done
5049
5050
5051    if test "x$MKTEMP" = x; then
5052        if test "xmktemp" = x; then
5053          PROG_NAME=mktemp
5054        else
5055          PROG_NAME=mktemp
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in mv
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_path_MV+set}" = set; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $MV in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096MV=$ac_cv_path_MV
5097if test -n "$MV"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5099$as_echo "$MV" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$MV" && break
5107done
5108
5109
5110    if test "x$MV" = x; then
5111        if test "xmv" = x; then
5112          PROG_NAME=mv
5113        else
5114          PROG_NAME=mv
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in printf
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if test "${ac_cv_path_PRINTF+set}" = set; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $PRINTF in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155PRINTF=$ac_cv_path_PRINTF
5156if test -n "$PRINTF"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5158$as_echo "$PRINTF" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$PRINTF" && break
5166done
5167
5168
5169    if test "x$PRINTF" = x; then
5170        if test "xprintf" = x; then
5171          PROG_NAME=printf
5172        else
5173          PROG_NAME=printf
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in rm
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if test "${ac_cv_path_RM+set}" = set; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $RM in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214RM=$ac_cv_path_RM
5215if test -n "$RM"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5217$as_echo "$RM" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$RM" && break
5225done
5226
5227
5228    if test "x$RM" = x; then
5229        if test "xrm" = x; then
5230          PROG_NAME=rm
5231        else
5232          PROG_NAME=rm
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in sh
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if test "${ac_cv_path_SH+set}" = set; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $SH in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273SH=$ac_cv_path_SH
5274if test -n "$SH"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5276$as_echo "$SH" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$SH" && break
5284done
5285
5286
5287    if test "x$SH" = x; then
5288        if test "xsh" = x; then
5289          PROG_NAME=sh
5290        else
5291          PROG_NAME=sh
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in sort
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_SORT+set}" = set; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $SORT in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332SORT=$ac_cv_path_SORT
5333if test -n "$SORT"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5335$as_echo "$SORT" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$SORT" && break
5343done
5344
5345
5346    if test "x$SORT" = x; then
5347        if test "xsort" = x; then
5348          PROG_NAME=sort
5349        else
5350          PROG_NAME=sort
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in tail
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_path_TAIL+set}" = set; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TAIL in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TAIL=$ac_cv_path_TAIL
5392if test -n "$TAIL"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5394$as_echo "$TAIL" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TAIL" && break
5402done
5403
5404
5405    if test "x$TAIL" = x; then
5406        if test "xtail" = x; then
5407          PROG_NAME=tail
5408        else
5409          PROG_NAME=tail
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tar
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if test "${ac_cv_path_TAR+set}" = set; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TAR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TAR=$ac_cv_path_TAR
5451if test -n "$TAR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5453$as_echo "$TAR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TAR" && break
5461done
5462
5463
5464    if test "x$TAR" = x; then
5465        if test "xtar" = x; then
5466          PROG_NAME=tar
5467        else
5468          PROG_NAME=tar
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in tee
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if test "${ac_cv_path_TEE+set}" = set; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $TEE in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509TEE=$ac_cv_path_TEE
5510if test -n "$TEE"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5512$as_echo "$TEE" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$TEE" && break
5520done
5521
5522
5523    if test "x$TEE" = x; then
5524        if test "xtee" = x; then
5525          PROG_NAME=tee
5526        else
5527          PROG_NAME=tee
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in touch
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if test "${ac_cv_path_TOUCH+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $TOUCH in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568TOUCH=$ac_cv_path_TOUCH
5569if test -n "$TOUCH"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5571$as_echo "$TOUCH" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$TOUCH" && break
5579done
5580
5581
5582    if test "x$TOUCH" = x; then
5583        if test "xtouch" = x; then
5584          PROG_NAME=touch
5585        else
5586          PROG_NAME=touch
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in tr
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if test "${ac_cv_path_TR+set}" = set; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $TR in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627TR=$ac_cv_path_TR
5628if test -n "$TR"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5630$as_echo "$TR" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$TR" && break
5638done
5639
5640
5641    if test "x$TR" = x; then
5642        if test "xtr" = x; then
5643          PROG_NAME=tr
5644        else
5645          PROG_NAME=tr
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in uname
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if test "${ac_cv_path_UNAME+set}" = set; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $UNAME in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686UNAME=$ac_cv_path_UNAME
5687if test -n "$UNAME"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5689$as_echo "$UNAME" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$UNAME" && break
5697done
5698
5699
5700    if test "x$UNAME" = x; then
5701        if test "xuname" = x; then
5702          PROG_NAME=uname
5703        else
5704          PROG_NAME=uname
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in uniq
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if test "${ac_cv_path_UNIQ+set}" = set; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $UNIQ in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745UNIQ=$ac_cv_path_UNIQ
5746if test -n "$UNIQ"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5748$as_echo "$UNIQ" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$UNIQ" && break
5756done
5757
5758
5759    if test "x$UNIQ" = x; then
5760        if test "xuniq" = x; then
5761          PROG_NAME=uniq
5762        else
5763          PROG_NAME=uniq
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772    for ac_prog in wc
5773do
5774  # Extract the first word of "$ac_prog", so it can be a program name with args.
5775set dummy $ac_prog; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if test "${ac_cv_path_WC+set}" = set; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $WC in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5793    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804WC=$ac_cv_path_WC
5805if test -n "$WC"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5807$as_echo "$WC" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$WC" && break
5815done
5816
5817
5818    if test "x$WC" = x; then
5819        if test "xwc" = x; then
5820          PROG_NAME=wc
5821        else
5822          PROG_NAME=wc
5823        fi
5824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5825$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5826        as_fn_error $? "Cannot continue" "$LINENO" 5
5827    fi
5828
5829
5830
5831    for ac_prog in which
5832do
5833  # Extract the first word of "$ac_prog", so it can be a program name with args.
5834set dummy $ac_prog; ac_word=$2
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5836$as_echo_n "checking for $ac_word... " >&6; }
5837if test "${ac_cv_path_WHICH+set}" = set; then :
5838  $as_echo_n "(cached) " >&6
5839else
5840  case $WHICH in
5841  [\\/]* | ?:[\\/]*)
5842  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5843  ;;
5844  *)
5845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5846for as_dir in $PATH
5847do
5848  IFS=$as_save_IFS
5849  test -z "$as_dir" && as_dir=.
5850    for ac_exec_ext in '' $ac_executable_extensions; do
5851  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5852    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5854    break 2
5855  fi
5856done
5857  done
5858IFS=$as_save_IFS
5859
5860  ;;
5861esac
5862fi
5863WHICH=$ac_cv_path_WHICH
5864if test -n "$WHICH"; then
5865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5866$as_echo "$WHICH" >&6; }
5867else
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5869$as_echo "no" >&6; }
5870fi
5871
5872
5873  test -n "$WHICH" && break
5874done
5875
5876
5877    if test "x$WHICH" = x; then
5878        if test "xwhich" = x; then
5879          PROG_NAME=which
5880        else
5881          PROG_NAME=which
5882        fi
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5884$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5885        as_fn_error $? "Cannot continue" "$LINENO" 5
5886    fi
5887
5888
5889
5890    for ac_prog in xargs
5891do
5892  # Extract the first word of "$ac_prog", so it can be a program name with args.
5893set dummy $ac_prog; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if test "${ac_cv_path_XARGS+set}" = set; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $XARGS in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5911    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922XARGS=$ac_cv_path_XARGS
5923if test -n "$XARGS"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5925$as_echo "$XARGS" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932  test -n "$XARGS" && break
5933done
5934
5935
5936    if test "x$XARGS" = x; then
5937        if test "xxargs" = x; then
5938          PROG_NAME=xargs
5939        else
5940          PROG_NAME=xargs
5941        fi
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5943$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5944        as_fn_error $? "Cannot continue" "$LINENO" 5
5945    fi
5946
5947
5948
5949# Then required tools that require some special treatment.
5950for ac_prog in gawk mawk nawk awk
5951do
5952  # Extract the first word of "$ac_prog", so it can be a program name with args.
5953set dummy $ac_prog; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if test "${ac_cv_prog_AWK+set}" = set; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959  if test -n "$AWK"; then
5960  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965  IFS=$as_save_IFS
5966  test -z "$as_dir" && as_dir=.
5967    for ac_exec_ext in '' $ac_executable_extensions; do
5968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5969    ac_cv_prog_AWK="$ac_prog"
5970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971    break 2
5972  fi
5973done
5974  done
5975IFS=$as_save_IFS
5976
5977fi
5978fi
5979AWK=$ac_cv_prog_AWK
5980if test -n "$AWK"; then
5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5982$as_echo "$AWK" >&6; }
5983else
5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
5986fi
5987
5988
5989  test -n "$AWK" && break
5990done
5991
5992
5993    if test "x$AWK" = x; then
5994        if test "x" = x; then
5995          PROG_NAME=awk
5996        else
5997          PROG_NAME=
5998        fi
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6001        as_fn_error $? "Cannot continue" "$LINENO" 5
6002    fi
6003
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6005$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6006if test "${ac_cv_path_GREP+set}" = set; then :
6007  $as_echo_n "(cached) " >&6
6008else
6009  if test -z "$GREP"; then
6010  ac_path_GREP_found=false
6011  # Loop through the user's path and test for each of PROGNAME-LIST
6012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6014do
6015  IFS=$as_save_IFS
6016  test -z "$as_dir" && as_dir=.
6017    for ac_prog in grep ggrep; do
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6020      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6021# Check for GNU ac_path_GREP and select it if it is found.
6022  # Check for GNU $ac_path_GREP
6023case `"$ac_path_GREP" --version 2>&1` in
6024*GNU*)
6025  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6026*)
6027  ac_count=0
6028  $as_echo_n 0123456789 >"conftest.in"
6029  while :
6030  do
6031    cat "conftest.in" "conftest.in" >"conftest.tmp"
6032    mv "conftest.tmp" "conftest.in"
6033    cp "conftest.in" "conftest.nl"
6034    $as_echo 'GREP' >> "conftest.nl"
6035    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6036    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6037    as_fn_arith $ac_count + 1 && ac_count=$as_val
6038    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6039      # Best one so far, save it but keep looking for a better one
6040      ac_cv_path_GREP="$ac_path_GREP"
6041      ac_path_GREP_max=$ac_count
6042    fi
6043    # 10*(2^10) chars as input seems more than enough
6044    test $ac_count -gt 10 && break
6045  done
6046  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6047esac
6048
6049      $ac_path_GREP_found && break 3
6050    done
6051  done
6052  done
6053IFS=$as_save_IFS
6054  if test -z "$ac_cv_path_GREP"; then
6055    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6056  fi
6057else
6058  ac_cv_path_GREP=$GREP
6059fi
6060
6061fi
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6063$as_echo "$ac_cv_path_GREP" >&6; }
6064 GREP="$ac_cv_path_GREP"
6065
6066
6067
6068    if test "x$GREP" = x; then
6069        if test "x" = x; then
6070          PROG_NAME=grep
6071        else
6072          PROG_NAME=
6073        fi
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6075$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6076        as_fn_error $? "Cannot continue" "$LINENO" 5
6077    fi
6078
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6080$as_echo_n "checking for egrep... " >&6; }
6081if test "${ac_cv_path_EGREP+set}" = set; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6085   then ac_cv_path_EGREP="$GREP -E"
6086   else
6087     if test -z "$EGREP"; then
6088  ac_path_EGREP_found=false
6089  # Loop through the user's path and test for each of PROGNAME-LIST
6090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6092do
6093  IFS=$as_save_IFS
6094  test -z "$as_dir" && as_dir=.
6095    for ac_prog in egrep; do
6096    for ac_exec_ext in '' $ac_executable_extensions; do
6097      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6098      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6099# Check for GNU ac_path_EGREP and select it if it is found.
6100  # Check for GNU $ac_path_EGREP
6101case `"$ac_path_EGREP" --version 2>&1` in
6102*GNU*)
6103  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6104*)
6105  ac_count=0
6106  $as_echo_n 0123456789 >"conftest.in"
6107  while :
6108  do
6109    cat "conftest.in" "conftest.in" >"conftest.tmp"
6110    mv "conftest.tmp" "conftest.in"
6111    cp "conftest.in" "conftest.nl"
6112    $as_echo 'EGREP' >> "conftest.nl"
6113    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6114    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6115    as_fn_arith $ac_count + 1 && ac_count=$as_val
6116    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6117      # Best one so far, save it but keep looking for a better one
6118      ac_cv_path_EGREP="$ac_path_EGREP"
6119      ac_path_EGREP_max=$ac_count
6120    fi
6121    # 10*(2^10) chars as input seems more than enough
6122    test $ac_count -gt 10 && break
6123  done
6124  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6125esac
6126
6127      $ac_path_EGREP_found && break 3
6128    done
6129  done
6130  done
6131IFS=$as_save_IFS
6132  if test -z "$ac_cv_path_EGREP"; then
6133    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6134  fi
6135else
6136  ac_cv_path_EGREP=$EGREP
6137fi
6138
6139   fi
6140fi
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6142$as_echo "$ac_cv_path_EGREP" >&6; }
6143 EGREP="$ac_cv_path_EGREP"
6144
6145
6146
6147    if test "x$EGREP" = x; then
6148        if test "x" = x; then
6149          PROG_NAME=egrep
6150        else
6151          PROG_NAME=
6152        fi
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6154$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6155        as_fn_error $? "Cannot continue" "$LINENO" 5
6156    fi
6157
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6159$as_echo_n "checking for fgrep... " >&6; }
6160if test "${ac_cv_path_FGREP+set}" = set; then :
6161  $as_echo_n "(cached) " >&6
6162else
6163  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6164   then ac_cv_path_FGREP="$GREP -F"
6165   else
6166     if test -z "$FGREP"; then
6167  ac_path_FGREP_found=false
6168  # Loop through the user's path and test for each of PROGNAME-LIST
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_prog in fgrep; do
6175    for ac_exec_ext in '' $ac_executable_extensions; do
6176      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6177      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6178# Check for GNU ac_path_FGREP and select it if it is found.
6179  # Check for GNU $ac_path_FGREP
6180case `"$ac_path_FGREP" --version 2>&1` in
6181*GNU*)
6182  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6183*)
6184  ac_count=0
6185  $as_echo_n 0123456789 >"conftest.in"
6186  while :
6187  do
6188    cat "conftest.in" "conftest.in" >"conftest.tmp"
6189    mv "conftest.tmp" "conftest.in"
6190    cp "conftest.in" "conftest.nl"
6191    $as_echo 'FGREP' >> "conftest.nl"
6192    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6193    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6194    as_fn_arith $ac_count + 1 && ac_count=$as_val
6195    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6196      # Best one so far, save it but keep looking for a better one
6197      ac_cv_path_FGREP="$ac_path_FGREP"
6198      ac_path_FGREP_max=$ac_count
6199    fi
6200    # 10*(2^10) chars as input seems more than enough
6201    test $ac_count -gt 10 && break
6202  done
6203  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6204esac
6205
6206      $ac_path_FGREP_found && break 3
6207    done
6208  done
6209  done
6210IFS=$as_save_IFS
6211  if test -z "$ac_cv_path_FGREP"; then
6212    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6213  fi
6214else
6215  ac_cv_path_FGREP=$FGREP
6216fi
6217
6218   fi
6219fi
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6221$as_echo "$ac_cv_path_FGREP" >&6; }
6222 FGREP="$ac_cv_path_FGREP"
6223
6224
6225
6226    if test "x$FGREP" = x; then
6227        if test "x" = x; then
6228          PROG_NAME=fgrep
6229        else
6230          PROG_NAME=
6231        fi
6232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6233$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6234        as_fn_error $? "Cannot continue" "$LINENO" 5
6235    fi
6236
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6238$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6239if test "${ac_cv_path_SED+set}" = set; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6243     for ac_i in 1 2 3 4 5 6 7; do
6244       ac_script="$ac_script$as_nl$ac_script"
6245     done
6246     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6247     { ac_script=; unset ac_script;}
6248     if test -z "$SED"; then
6249  ac_path_SED_found=false
6250  # Loop through the user's path and test for each of PROGNAME-LIST
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_prog in sed gsed; do
6257    for ac_exec_ext in '' $ac_executable_extensions; do
6258      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6259      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6260# Check for GNU ac_path_SED and select it if it is found.
6261  # Check for GNU $ac_path_SED
6262case `"$ac_path_SED" --version 2>&1` in
6263*GNU*)
6264  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6265*)
6266  ac_count=0
6267  $as_echo_n 0123456789 >"conftest.in"
6268  while :
6269  do
6270    cat "conftest.in" "conftest.in" >"conftest.tmp"
6271    mv "conftest.tmp" "conftest.in"
6272    cp "conftest.in" "conftest.nl"
6273    $as_echo '' >> "conftest.nl"
6274    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6275    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6276    as_fn_arith $ac_count + 1 && ac_count=$as_val
6277    if test $ac_count -gt ${ac_path_SED_max-0}; then
6278      # Best one so far, save it but keep looking for a better one
6279      ac_cv_path_SED="$ac_path_SED"
6280      ac_path_SED_max=$ac_count
6281    fi
6282    # 10*(2^10) chars as input seems more than enough
6283    test $ac_count -gt 10 && break
6284  done
6285  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6286esac
6287
6288      $ac_path_SED_found && break 3
6289    done
6290  done
6291  done
6292IFS=$as_save_IFS
6293  if test -z "$ac_cv_path_SED"; then
6294    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6295  fi
6296else
6297  ac_cv_path_SED=$SED
6298fi
6299
6300fi
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6302$as_echo "$ac_cv_path_SED" >&6; }
6303 SED="$ac_cv_path_SED"
6304  rm -f conftest.sed
6305
6306
6307    if test "x$SED" = x; then
6308        if test "x" = x; then
6309          PROG_NAME=sed
6310        else
6311          PROG_NAME=
6312        fi
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6314$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6315        as_fn_error $? "Cannot continue" "$LINENO" 5
6316    fi
6317
6318
6319for ac_prog in nawk gawk awk
6320do
6321  # Extract the first word of "$ac_prog", so it can be a program name with args.
6322set dummy $ac_prog; ac_word=$2
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324$as_echo_n "checking for $ac_word... " >&6; }
6325if test "${ac_cv_path_NAWK+set}" = set; then :
6326  $as_echo_n "(cached) " >&6
6327else
6328  case $NAWK in
6329  [\\/]* | ?:[\\/]*)
6330  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6331  ;;
6332  *)
6333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334for as_dir in $PATH
6335do
6336  IFS=$as_save_IFS
6337  test -z "$as_dir" && as_dir=.
6338    for ac_exec_ext in '' $ac_executable_extensions; do
6339  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6340    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6342    break 2
6343  fi
6344done
6345  done
6346IFS=$as_save_IFS
6347
6348  ;;
6349esac
6350fi
6351NAWK=$ac_cv_path_NAWK
6352if test -n "$NAWK"; then
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6354$as_echo "$NAWK" >&6; }
6355else
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357$as_echo "no" >&6; }
6358fi
6359
6360
6361  test -n "$NAWK" && break
6362done
6363
6364
6365    if test "x$NAWK" = x; then
6366        if test "x" = x; then
6367          PROG_NAME=nawk
6368        else
6369          PROG_NAME=
6370        fi
6371        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6372$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6373        as_fn_error $? "Cannot continue" "$LINENO" 5
6374    fi
6375
6376
6377# Always force rm.
6378RM="$RM -f"
6379
6380# pwd behaves differently on various platforms and some don't support the -L flag.
6381# Always use the bash builtin pwd to get uniform behavior.
6382THEPWDCMD=pwd
6383
6384# These are not required on all platforms
6385# Extract the first word of "cygpath", so it can be a program name with args.
6386set dummy cygpath; ac_word=$2
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388$as_echo_n "checking for $ac_word... " >&6; }
6389if test "${ac_cv_path_CYGPATH+set}" = set; then :
6390  $as_echo_n "(cached) " >&6
6391else
6392  case $CYGPATH in
6393  [\\/]* | ?:[\\/]*)
6394  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6395  ;;
6396  *)
6397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398for as_dir in $PATH
6399do
6400  IFS=$as_save_IFS
6401  test -z "$as_dir" && as_dir=.
6402    for ac_exec_ext in '' $ac_executable_extensions; do
6403  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6404    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6406    break 2
6407  fi
6408done
6409  done
6410IFS=$as_save_IFS
6411
6412  ;;
6413esac
6414fi
6415CYGPATH=$ac_cv_path_CYGPATH
6416if test -n "$CYGPATH"; then
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6418$as_echo "$CYGPATH" >&6; }
6419else
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
6422fi
6423
6424
6425# Extract the first word of "readlink", so it can be a program name with args.
6426set dummy readlink; ac_word=$2
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6428$as_echo_n "checking for $ac_word... " >&6; }
6429if test "${ac_cv_path_READLINK+set}" = set; then :
6430  $as_echo_n "(cached) " >&6
6431else
6432  case $READLINK in
6433  [\\/]* | ?:[\\/]*)
6434  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6435  ;;
6436  *)
6437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438for as_dir in $PATH
6439do
6440  IFS=$as_save_IFS
6441  test -z "$as_dir" && as_dir=.
6442    for ac_exec_ext in '' $ac_executable_extensions; do
6443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6444    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6446    break 2
6447  fi
6448done
6449  done
6450IFS=$as_save_IFS
6451
6452  ;;
6453esac
6454fi
6455READLINK=$ac_cv_path_READLINK
6456if test -n "$READLINK"; then
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6458$as_echo "$READLINK" >&6; }
6459else
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
6462fi
6463
6464
6465# Extract the first word of "df", so it can be a program name with args.
6466set dummy df; ac_word=$2
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468$as_echo_n "checking for $ac_word... " >&6; }
6469if test "${ac_cv_path_DF+set}" = set; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  case $DF in
6473  [\\/]* | ?:[\\/]*)
6474  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6475  ;;
6476  *)
6477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478for as_dir in $PATH
6479do
6480  IFS=$as_save_IFS
6481  test -z "$as_dir" && as_dir=.
6482    for ac_exec_ext in '' $ac_executable_extensions; do
6483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6484    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486    break 2
6487  fi
6488done
6489  done
6490IFS=$as_save_IFS
6491
6492  ;;
6493esac
6494fi
6495DF=$ac_cv_path_DF
6496if test -n "$DF"; then
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6498$as_echo "$DF" >&6; }
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }
6502fi
6503
6504
6505# Extract the first word of "SetFile", so it can be a program name with args.
6506set dummy SetFile; ac_word=$2
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508$as_echo_n "checking for $ac_word... " >&6; }
6509if test "${ac_cv_path_SETFILE+set}" = set; then :
6510  $as_echo_n "(cached) " >&6
6511else
6512  case $SETFILE in
6513  [\\/]* | ?:[\\/]*)
6514  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6515  ;;
6516  *)
6517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518for as_dir in $PATH
6519do
6520  IFS=$as_save_IFS
6521  test -z "$as_dir" && as_dir=.
6522    for ac_exec_ext in '' $ac_executable_extensions; do
6523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6524    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526    break 2
6527  fi
6528done
6529  done
6530IFS=$as_save_IFS
6531
6532  ;;
6533esac
6534fi
6535SETFILE=$ac_cv_path_SETFILE
6536if test -n "$SETFILE"; then
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6538$as_echo "$SETFILE" >&6; }
6539else
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543
6544
6545
6546
6547# Now we can determine OpenJDK build and target platforms. This is required to
6548# have early on.
6549# Make sure we can run config.sub.
6550$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6551  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6552
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6554$as_echo_n "checking build system type... " >&6; }
6555if test "${ac_cv_build+set}" = set; then :
6556  $as_echo_n "(cached) " >&6
6557else
6558  ac_build_alias=$build_alias
6559test "x$ac_build_alias" = x &&
6560  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6561test "x$ac_build_alias" = x &&
6562  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6563ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6564  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6565
6566fi
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6568$as_echo "$ac_cv_build" >&6; }
6569case $ac_cv_build in
6570*-*-*) ;;
6571*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6572esac
6573build=$ac_cv_build
6574ac_save_IFS=$IFS; IFS='-'
6575set x $ac_cv_build
6576shift
6577build_cpu=$1
6578build_vendor=$2
6579shift; shift
6580# Remember, the first character of IFS is used to create $*,
6581# except with old shells:
6582build_os=$*
6583IFS=$ac_save_IFS
6584case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6585
6586
6587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6588$as_echo_n "checking host system type... " >&6; }
6589if test "${ac_cv_host+set}" = set; then :
6590  $as_echo_n "(cached) " >&6
6591else
6592  if test "x$host_alias" = x; then
6593  ac_cv_host=$ac_cv_build
6594else
6595  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6596    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6597fi
6598
6599fi
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6601$as_echo "$ac_cv_host" >&6; }
6602case $ac_cv_host in
6603*-*-*) ;;
6604*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6605esac
6606host=$ac_cv_host
6607ac_save_IFS=$IFS; IFS='-'
6608set x $ac_cv_host
6609shift
6610host_cpu=$1
6611host_vendor=$2
6612shift; shift
6613# Remember, the first character of IFS is used to create $*,
6614# except with old shells:
6615host_os=$*
6616IFS=$ac_save_IFS
6617case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6618
6619
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6621$as_echo_n "checking target system type... " >&6; }
6622if test "${ac_cv_target+set}" = set; then :
6623  $as_echo_n "(cached) " >&6
6624else
6625  if test "x$target_alias" = x; then
6626  ac_cv_target=$ac_cv_host
6627else
6628  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6629    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6630fi
6631
6632fi
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6634$as_echo "$ac_cv_target" >&6; }
6635case $ac_cv_target in
6636*-*-*) ;;
6637*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6638esac
6639target=$ac_cv_target
6640ac_save_IFS=$IFS; IFS='-'
6641set x $ac_cv_target
6642shift
6643target_cpu=$1
6644target_vendor=$2
6645shift; shift
6646# Remember, the first character of IFS is used to create $*,
6647# except with old shells:
6648target_os=$*
6649IFS=$ac_save_IFS
6650case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6651
6652
6653# The aliases save the names the user supplied, while $host etc.
6654# will get canonicalized.
6655test -n "$target_alias" &&
6656  test "$program_prefix$program_suffix$program_transform_name" = \
6657    NONENONEs,x,x, &&
6658  program_prefix=${target_alias}-
6659
6660# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6661# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6662# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6663# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6664# to use the configure naming style.
6665
6666
6667
6668
6669
6670    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6671    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6672    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6673    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6674    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6675    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6676
6677
6678
6679    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6680
6681  case "$build_os" in
6682    *linux*)
6683      VAR_OS=linux
6684      VAR_OS_API=posix
6685      VAR_OS_ENV=linux
6686      ;;
6687    *solaris*)
6688      VAR_OS=solaris
6689      VAR_OS_API=posix
6690      VAR_OS_ENV=solaris
6691      ;;
6692    *darwin*)
6693      VAR_OS=macosx
6694      VAR_OS_API=posix
6695      VAR_OS_ENV=macosx
6696      ;;
6697    *bsd*)
6698      VAR_OS=bsd
6699      VAR_OS_API=posix
6700      VAR_OS_ENV=bsd
6701      ;;
6702    *cygwin*)
6703      VAR_OS=windows
6704      VAR_OS_API=winapi
6705      VAR_OS_ENV=windows.cygwin
6706      ;;
6707    *mingw*)
6708      VAR_OS=windows
6709      VAR_OS_API=winapi
6710      VAR_OS_ENV=windows.msys
6711      ;;
6712    *)
6713      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6714      ;;
6715  esac
6716
6717
6718  # First argument is the cpu name from the trip/quad
6719  case "$build_cpu" in
6720    x86_64)
6721      VAR_CPU=x86_64
6722      VAR_CPU_ARCH=x86
6723      VAR_CPU_BITS=64
6724      VAR_CPU_ENDIAN=little
6725      ;;
6726    i?86)
6727      VAR_CPU=x86
6728      VAR_CPU_ARCH=x86
6729      VAR_CPU_BITS=32
6730      VAR_CPU_ENDIAN=little
6731      ;;
6732    arm*)
6733      VAR_CPU=arm
6734      VAR_CPU_ARCH=arm
6735      VAR_CPU_BITS=32
6736      VAR_CPU_ENDIAN=little
6737      ;;
6738    powerpc)
6739      VAR_CPU=ppc
6740      VAR_CPU_ARCH=ppc
6741      VAR_CPU_BITS=32
6742      VAR_CPU_ENDIAN=big
6743       ;;
6744    powerpc64)
6745      VAR_CPU=ppc64
6746      VAR_CPU_ARCH=ppc
6747      VAR_CPU_BITS=64
6748      VAR_CPU_ENDIAN=big
6749       ;;
6750    sparc)
6751      VAR_CPU=sparc
6752      VAR_CPU_ARCH=sparc
6753      VAR_CPU_BITS=32
6754      VAR_CPU_ENDIAN=big
6755       ;;
6756    sparcv9)
6757      VAR_CPU=sparcv9
6758      VAR_CPU_ARCH=sparc
6759      VAR_CPU_BITS=64
6760      VAR_CPU_ENDIAN=big
6761       ;;
6762    *)
6763      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6764      ;;
6765  esac
6766
6767    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6768    OPENJDK_BUILD_OS="$VAR_OS"
6769    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6770    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6771    OPENJDK_BUILD_CPU="$VAR_CPU"
6772    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6773    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6774    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6775
6776
6777
6778
6779
6780
6781
6782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6783$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6785$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6786
6787    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6788
6789  case "$host_os" in
6790    *linux*)
6791      VAR_OS=linux
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=linux
6794      ;;
6795    *solaris*)
6796      VAR_OS=solaris
6797      VAR_OS_API=posix
6798      VAR_OS_ENV=solaris
6799      ;;
6800    *darwin*)
6801      VAR_OS=macosx
6802      VAR_OS_API=posix
6803      VAR_OS_ENV=macosx
6804      ;;
6805    *bsd*)
6806      VAR_OS=bsd
6807      VAR_OS_API=posix
6808      VAR_OS_ENV=bsd
6809      ;;
6810    *cygwin*)
6811      VAR_OS=windows
6812      VAR_OS_API=winapi
6813      VAR_OS_ENV=windows.cygwin
6814      ;;
6815    *mingw*)
6816      VAR_OS=windows
6817      VAR_OS_API=winapi
6818      VAR_OS_ENV=windows.msys
6819      ;;
6820    *)
6821      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6822      ;;
6823  esac
6824
6825
6826  # First argument is the cpu name from the trip/quad
6827  case "$host_cpu" in
6828    x86_64)
6829      VAR_CPU=x86_64
6830      VAR_CPU_ARCH=x86
6831      VAR_CPU_BITS=64
6832      VAR_CPU_ENDIAN=little
6833      ;;
6834    i?86)
6835      VAR_CPU=x86
6836      VAR_CPU_ARCH=x86
6837      VAR_CPU_BITS=32
6838      VAR_CPU_ENDIAN=little
6839      ;;
6840    arm*)
6841      VAR_CPU=arm
6842      VAR_CPU_ARCH=arm
6843      VAR_CPU_BITS=32
6844      VAR_CPU_ENDIAN=little
6845      ;;
6846    powerpc)
6847      VAR_CPU=ppc
6848      VAR_CPU_ARCH=ppc
6849      VAR_CPU_BITS=32
6850      VAR_CPU_ENDIAN=big
6851       ;;
6852    powerpc64)
6853      VAR_CPU=ppc64
6854      VAR_CPU_ARCH=ppc
6855      VAR_CPU_BITS=64
6856      VAR_CPU_ENDIAN=big
6857       ;;
6858    sparc)
6859      VAR_CPU=sparc
6860      VAR_CPU_ARCH=sparc
6861      VAR_CPU_BITS=32
6862      VAR_CPU_ENDIAN=big
6863       ;;
6864    sparcv9)
6865      VAR_CPU=sparcv9
6866      VAR_CPU_ARCH=sparc
6867      VAR_CPU_BITS=64
6868      VAR_CPU_ENDIAN=big
6869       ;;
6870    *)
6871      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6872      ;;
6873  esac
6874
6875    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6876    OPENJDK_TARGET_OS="$VAR_OS"
6877    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6878    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6879    OPENJDK_TARGET_CPU="$VAR_CPU"
6880    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6881    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6882    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6883
6884
6885
6886
6887
6888
6889
6890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6891$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6893$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6894
6895
6896
6897# Check whether --with-target-bits was given.
6898if test "${with_target_bits+set}" = set; then :
6899  withval=$with_target_bits;
6900fi
6901
6902
6903  # We have three types of compiles:
6904  # native  == normal compilation, target system == build system
6905  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6906  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6907  #
6908  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6909    # We're doing a proper cross-compilation
6910    COMPILE_TYPE="cross"
6911  else
6912    COMPILE_TYPE="native"
6913  fi
6914
6915  if test "x$with_target_bits" != x; then
6916    if test "x$COMPILE_TYPE" = "xcross"; then
6917      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6918    fi
6919
6920    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6921      # A reduced build is requested
6922      COMPILE_TYPE="reduced"
6923      OPENJDK_TARGET_CPU_BITS=32
6924      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6925        OPENJDK_TARGET_CPU=x86
6926      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6927        OPENJDK_TARGET_CPU=sparc
6928      else
6929        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6930      fi
6931    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6932      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
6933    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6934      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6935$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6936    else
6937      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6938    fi
6939  fi
6940
6941
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6943$as_echo_n "checking compilation type... " >&6; }
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6945$as_echo "$COMPILE_TYPE" >&6; }
6946
6947
6948    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6949       REQUIRED_OS_NAME=SunOS
6950       REQUIRED_OS_VERSION=5.10
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6953       REQUIRED_OS_NAME=Linux
6954       REQUIRED_OS_VERSION=2.6
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6957        REQUIRED_OS_NAME=Windows
6958        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6959            REQUIRED_OS_VERSION=5.2
6960        else
6961            REQUIRED_OS_VERSION=5.1
6962        fi
6963    fi
6964    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6965        REQUIRED_OS_NAME=Darwin
6966        REQUIRED_OS_VERSION=11.2
6967    fi
6968
6969
6970
6971
6972
6973    # Also store the legacy naming of the cpu.
6974    # Ie i586 and amd64 instead of x86 and x86_64
6975    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6976    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6977      OPENJDK_TARGET_CPU_LEGACY="i586"
6978    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6979      # On all platforms except MacOSX replace x86_64 with amd64.
6980      OPENJDK_TARGET_CPU_LEGACY="amd64"
6981    fi
6982
6983
6984    # And the second legacy naming of the cpu.
6985    # Ie i386 and amd64 instead of x86 and x86_64.
6986    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6987    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6988      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6989    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6990      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6991    fi
6992
6993
6994    # This is the name of the cpu (but using i386 and amd64 instead of
6995    # x86 and x86_64, respectively), preceeded by a /, to be used when
6996    # locating libraries. On macosx, it's empty, though.
6997    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6998    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6999        OPENJDK_TARGET_CPU_LIBDIR=""
7000    fi
7001
7002
7003    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7004    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7005    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7006    OPENJDK_TARGET_CPU_ISADIR=""
7007    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7008      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7009          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7010      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7011          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7012      fi
7013    fi
7014
7015
7016    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7017    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7018    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7019      # On linux only, we replace x86 with i386.
7020      OPENJDK_TARGET_CPU_OSARCH="i386"
7021    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7022      # On all platforms except macosx, we replace x86_64 with amd64.
7023      OPENJDK_TARGET_CPU_OSARCH="amd64"
7024    fi
7025
7026
7027    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7028    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7029      OPENJDK_TARGET_CPU_JLI="i386"
7030    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7031      # On all platforms except macosx, we replace x86_64 with amd64.
7032      OPENJDK_TARGET_CPU_JLI="amd64"
7033    fi
7034    # Now setup the -D flags for building libjli.
7035    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7036    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7037      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7038        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7039      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7040        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7041      fi
7042    fi
7043
7044
7045    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7046    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7047        OPENJDK_TARGET_OS_API_DIR="solaris"
7048    fi
7049    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7050        OPENJDK_TARGET_OS_API_DIR="windows"
7051    fi
7052
7053
7054    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7055        A_LP64="LP64:="
7056        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7057        # unpack200.exe
7058        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7059            ADD_LP64="-D_LP64=1"
7060        fi
7061    fi
7062    LP64=$A_LP64
7063
7064
7065    if test "x$COMPILE_TYPE" = "xcross"; then
7066      # FIXME: ... or should this include reduced builds..?
7067      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7068    else
7069      DEFINE_CROSS_COMPILE_ARCH=""
7070    fi
7071
7072
7073    # ZERO_ARCHDEF is used to enable architecture-specific code
7074    case "${OPENJDK_TARGET_CPU}" in
7075      ppc*)    ZERO_ARCHDEF=PPC   ;;
7076      s390*)   ZERO_ARCHDEF=S390  ;;
7077      sparc*)  ZERO_ARCHDEF=SPARC ;;
7078      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7079      x86)     ZERO_ARCHDEF=IA32  ;;
7080      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7081    esac
7082
7083
7084
7085
7086
7087# Continue setting up basic stuff. Most remaining code require fundamental tools.
7088
7089# Locate the directory of this script.
7090SCRIPT="$0"
7091AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7092
7093# Where is the source? It is located two levels above the configure script.
7094CURDIR="$PWD"
7095cd "$AUTOCONF_DIR/../.."
7096SRC_ROOT="`$THEPWDCMD -L`"
7097
7098if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7099  PATH_SEP=";"
7100
7101  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7102  if test $SRC_ROOT_LENGTH -gt 100; then
7103      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7104  fi
7105
7106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7108$as_echo_n "checking cygwin release... " >&6; }
7109    CYGWIN_VERSION=`$UNAME -r`
7110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7111$as_echo "$CYGWIN_VERSION" >&6; }
7112    WINDOWS_ENV_VENDOR='cygwin'
7113    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7114
7115    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7116    if test "x$CYGWIN_VERSION_OK" = x; then
7117      { $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
7118$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;}
7119      as_fn_error $? "Cannot continue" "$LINENO" 5
7120    fi
7121    if test "x$CYGPATH" = x; then
7122        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7123    fi
7124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7125$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7126    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7127    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7128    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7129    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7131$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7132    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7133    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7134    if test "x$test_cygdrive_prefix" = x; then
7135        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7136    fi
7137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7139$as_echo_n "checking msys release... " >&6; }
7140    MSYS_VERSION=`$UNAME -r`
7141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7142$as_echo "$MSYS_VERSION" >&6; }
7143
7144    WINDOWS_ENV_VENDOR='msys'
7145    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7146
7147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7148$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7149    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7150    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7151
7152  windows_path="$MSYS_ROOT_PATH"
7153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7154    unix_path=`$CYGPATH -u "$windows_path"`
7155    MSYS_ROOT_PATH="$unix_path"
7156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7158    MSYS_ROOT_PATH="$unix_path"
7159  fi
7160
7161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7162$as_echo "$MSYS_ROOT_PATH" >&6; }
7163    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7164  else
7165    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7166  fi
7167
7168  # Test if windows or unix (cygwin/msys) find is first in path.
7169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7170$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7171  FIND_BINARY_OUTPUT=`find --version 2>&1`
7172  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7174$as_echo "unix style" >&6; }
7175  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7177$as_echo "Windows" >&6; }
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7179$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7180    { $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
7181$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7182    as_fn_error $? "Cannot continue" "$LINENO" 5
7183  else
7184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7185$as_echo "unknown" >&6; }
7186    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7187$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7188  fi
7189
7190else
7191  PATH_SEP=":"
7192fi
7193
7194
7195
7196cd "$CURDIR"
7197
7198
7199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7200
7201  # Input might be given as Windows format, start by converting to
7202  # unix format.
7203  path="$SRC_ROOT"
7204  new_path=`$CYGPATH -u "$path"`
7205
7206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7209  # "foo.exe" is OK but "foo" is an error.
7210  #
7211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7212  # It is also a way to make sure we got the proper file name for the real test later on.
7213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7214  if test "x$test_shortpath" = x; then
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7216$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7217    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7218  fi
7219
7220  # Call helper function which possibly converts this using DOS-style short mode.
7221  # If so, the updated path is stored in $new_path.
7222
7223  input_path="$new_path"
7224  # Check if we need to convert this using DOS-style short mode. If the path
7225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7226  # take no chances and rewrite it.
7227  # Note: m4 eats our [], so we need to use [ and ] instead.
7228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7229  if test "x$has_forbidden_chars" != x; then
7230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7234      # Going to short mode and back again did indeed matter. Since short mode is
7235      # case insensitive, let's make it lowercase to improve readability.
7236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7237      # Now convert it back to Unix-stile (cygpath)
7238      input_path=`$CYGPATH -u "$shortmode_path"`
7239      new_path="$input_path"
7240    fi
7241  fi
7242
7243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7244  if test "x$test_cygdrive_prefix" = x; then
7245    # As a simple fix, exclude /usr/bin since it's not a real path.
7246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7248      # a path prefixed by /cygdrive for fixpath to work.
7249      new_path="$CYGWIN_ROOT_PATH$input_path"
7250    fi
7251  fi
7252
7253
7254  if test "x$path" != "x$new_path"; then
7255    SRC_ROOT="$new_path"
7256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7257$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7258  fi
7259
7260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7261
7262  path="$SRC_ROOT"
7263  has_colon=`$ECHO $path | $GREP ^.:`
7264  new_path="$path"
7265  if test "x$has_colon" = x; then
7266    # Not in mixed or Windows style, start by that.
7267    new_path=`cmd //c echo $path`
7268  fi
7269
7270
7271  input_path="$new_path"
7272  # Check if we need to convert this using DOS-style short mode. If the path
7273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7274  # take no chances and rewrite it.
7275  # Note: m4 eats our [], so we need to use [ and ] instead.
7276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7277  if test "x$has_forbidden_chars" != x; then
7278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7280  fi
7281
7282
7283  windows_path="$new_path"
7284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7285    unix_path=`$CYGPATH -u "$windows_path"`
7286    new_path="$unix_path"
7287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7289    new_path="$unix_path"
7290  fi
7291
7292  if test "x$path" != "x$new_path"; then
7293    SRC_ROOT="$new_path"
7294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7295$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7296  fi
7297
7298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7300
7301  else
7302    # We're on a posix platform. Hooray! :)
7303    path="$SRC_ROOT"
7304    has_space=`$ECHO "$path" | $GREP " "`
7305    if test "x$has_space" != x; then
7306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7307$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7308      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7309    fi
7310
7311    # Use eval to expand a potential ~
7312    eval path="$path"
7313    if test ! -f "$path" && test ! -d "$path"; then
7314      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7315    fi
7316
7317    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7318  fi
7319
7320
7321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7322
7323  # Input might be given as Windows format, start by converting to
7324  # unix format.
7325  path="$CURDIR"
7326  new_path=`$CYGPATH -u "$path"`
7327
7328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7331  # "foo.exe" is OK but "foo" is an error.
7332  #
7333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7334  # It is also a way to make sure we got the proper file name for the real test later on.
7335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7336  if test "x$test_shortpath" = x; then
7337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7338$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7339    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7340  fi
7341
7342  # Call helper function which possibly converts this using DOS-style short mode.
7343  # If so, the updated path is stored in $new_path.
7344
7345  input_path="$new_path"
7346  # Check if we need to convert this using DOS-style short mode. If the path
7347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7348  # take no chances and rewrite it.
7349  # Note: m4 eats our [], so we need to use [ and ] instead.
7350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7351  if test "x$has_forbidden_chars" != x; then
7352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7356      # Going to short mode and back again did indeed matter. Since short mode is
7357      # case insensitive, let's make it lowercase to improve readability.
7358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7359      # Now convert it back to Unix-stile (cygpath)
7360      input_path=`$CYGPATH -u "$shortmode_path"`
7361      new_path="$input_path"
7362    fi
7363  fi
7364
7365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7366  if test "x$test_cygdrive_prefix" = x; then
7367    # As a simple fix, exclude /usr/bin since it's not a real path.
7368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7370      # a path prefixed by /cygdrive for fixpath to work.
7371      new_path="$CYGWIN_ROOT_PATH$input_path"
7372    fi
7373  fi
7374
7375
7376  if test "x$path" != "x$new_path"; then
7377    CURDIR="$new_path"
7378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7379$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7380  fi
7381
7382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7383
7384  path="$CURDIR"
7385  has_colon=`$ECHO $path | $GREP ^.:`
7386  new_path="$path"
7387  if test "x$has_colon" = x; then
7388    # Not in mixed or Windows style, start by that.
7389    new_path=`cmd //c echo $path`
7390  fi
7391
7392
7393  input_path="$new_path"
7394  # Check if we need to convert this using DOS-style short mode. If the path
7395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7396  # take no chances and rewrite it.
7397  # Note: m4 eats our [], so we need to use [ and ] instead.
7398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7399  if test "x$has_forbidden_chars" != x; then
7400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7402  fi
7403
7404
7405  windows_path="$new_path"
7406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7407    unix_path=`$CYGPATH -u "$windows_path"`
7408    new_path="$unix_path"
7409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7411    new_path="$unix_path"
7412  fi
7413
7414  if test "x$path" != "x$new_path"; then
7415    CURDIR="$new_path"
7416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7417$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7418  fi
7419
7420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7422
7423  else
7424    # We're on a posix platform. Hooray! :)
7425    path="$CURDIR"
7426    has_space=`$ECHO "$path" | $GREP " "`
7427    if test "x$has_space" != x; then
7428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7429$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7431    fi
7432
7433    # Use eval to expand a potential ~
7434    eval path="$path"
7435    if test ! -f "$path" && test ! -d "$path"; then
7436      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7437    fi
7438
7439    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7440  fi
7441
7442
7443if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7444    # Add extra search paths on solaris for utilities like ar and as etc...
7445    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7446fi
7447
7448# You can force the sys-root if the sys-root encoded into the cross compiler tools
7449# is not correct.
7450
7451# Check whether --with-sys-root was given.
7452if test "${with_sys_root+set}" = set; then :
7453  withval=$with_sys_root;
7454fi
7455
7456
7457if test "x$with_sys_root" != x; then
7458  SYS_ROOT=$with_sys_root
7459else
7460  SYS_ROOT=/
7461fi
7462
7463
7464
7465# Check whether --with-tools-dir was given.
7466if test "${with_tools_dir+set}" = set; then :
7467  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7468fi
7469
7470
7471
7472# Check whether --with-devkit was given.
7473if test "${with_devkit+set}" = set; then :
7474  withval=$with_devkit;
7475    if test "x$with_sys_root" != x; then
7476      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7477    fi
7478    if test "x$with_tools_dir" != x; then
7479      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7480    fi
7481    TOOLS_DIR=$with_devkit/bin
7482    if test -d "$with_devkit/$host_alias/libc"; then
7483      SYS_ROOT=$with_devkit/$host_alias/libc
7484    elif test -d "$with_devkit/$host/sys-root"; then
7485      SYS_ROOT=$with_devkit/$host/sys-root
7486    fi
7487
7488fi
7489
7490
7491
7492
7493# Setup default logging of stdout and stderr to build.log in the output root.
7494BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7495BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7496BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7497
7498
7499
7500
7501
7502# Check if it's a pure open build or if custom sources are to be used.
7503
7504  # Check whether --enable-openjdk-only was given.
7505if test "${enable_openjdk_only+set}" = set; then :
7506  enableval=$enable_openjdk_only;
7507else
7508  enable_openjdk_only="no"
7509fi
7510
7511
7512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7513$as_echo_n "checking for presence of closed sources... " >&6; }
7514  if test -d "$SRC_ROOT/jdk/src/closed"; then
7515    CLOSED_SOURCE_PRESENT=yes
7516  else
7517    CLOSED_SOURCE_PRESENT=no
7518  fi
7519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7520$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7521
7522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7523$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7524  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7526$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7527
7528  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7529    OPENJDK=true
7530    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7531      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7532$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7533    fi
7534  else
7535    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7536      OPENJDK=true
7537    else
7538      OPENJDK=false
7539    fi
7540  fi
7541
7542  if test "x$OPENJDK" = "xtrue"; then
7543    SET_OPENJDK="OPENJDK=true"
7544  fi
7545
7546
7547
7548
7549# These are needed to be able to create a configuration name (and thus the output directory)
7550
7551###############################################################################
7552#
7553# Check which variant of the JDK that we want to build.
7554# Currently we have:
7555#    normal:   standard edition
7556# but the custom make system may add other variants
7557#
7558# Effectively the JDK variant gives a name to a specific set of
7559# modules to compile into the JDK. In the future, these modules
7560# might even be Jigsaw modules.
7561#
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7563$as_echo_n "checking which variant of the JDK to build... " >&6; }
7564
7565# Check whether --with-jdk-variant was given.
7566if test "${with_jdk_variant+set}" = set; then :
7567  withval=$with_jdk_variant;
7568fi
7569
7570
7571if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7572    JDK_VARIANT="normal"
7573else
7574    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7575fi
7576
7577
7578
7579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7580$as_echo "$JDK_VARIANT" >&6; }
7581
7582
7583###############################################################################
7584#
7585# Check which interpreter of the JVM we want to build.
7586# Currently we have:
7587#    template: Template interpreter (the default)
7588#    cpp     : C++ interpreter
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7590$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7591
7592# Check whether --with-jvm-interpreter was given.
7593if test "${with_jvm_interpreter+set}" = set; then :
7594  withval=$with_jvm_interpreter;
7595fi
7596
7597
7598if test "x$with_jvm_interpreter" = x; then
7599     with_jvm_interpreter="template"
7600fi
7601
7602JVM_INTERPRETER="$with_jvm_interpreter"
7603
7604if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7605   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7606fi
7607
7608
7609
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7611$as_echo "$with_jvm_interpreter" >&6; }
7612
7613
7614
7615###############################################################################
7616#
7617# Check which variants of the JVM that we want to build.
7618# Currently we have:
7619#    server: normal interpreter and a tiered C1/C2 compiler
7620#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7621#    minimal1: reduced form of client with optional VM services and features stripped out
7622#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7623#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7624#    zero: no machine code interpreter, no compiler
7625#    zeroshark: zero interpreter and shark/llvm compiler backend
7626#    core: interpreter only, no compiler (only works on some platforms)
7627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7628$as_echo_n "checking which variants of the JVM to build... " >&6; }
7629
7630# Check whether --with-jvm-variants was given.
7631if test "${with_jvm_variants+set}" = set; then :
7632  withval=$with_jvm_variants;
7633fi
7634
7635
7636if test "x$with_jvm_variants" = x; then
7637     with_jvm_variants="server"
7638fi
7639
7640JVM_VARIANTS=",$with_jvm_variants,"
7641TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7642
7643if test "x$TEST_VARIANTS" != "x,"; then
7644   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7645fi
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7647$as_echo "$with_jvm_variants" >&6; }
7648
7649JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7650JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7651JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7652JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7653JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7654JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7655JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7656
7657if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7658    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7659        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7660    fi
7661fi
7662if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7663    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7664        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7665    fi
7666fi
7667if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7668    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7669        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7670    fi
7671fi
7672
7673# Replace the commas with AND for use in the build directory name.
7674ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7675COUNT_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/' -e 's/core,/1/'`
7676if test "x$COUNT_VARIANTS" != "x,1"; then
7677    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7678else
7679    BUILDING_MULTIPLE_JVM_VARIANTS=no
7680fi
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691INCLUDE_SA=true
7692if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7693    INCLUDE_SA=false
7694fi
7695if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7696    INCLUDE_SA=false
7697fi
7698if test "x$VAR_CPU" = xppc64 ; then
7699    INCLUDE_SA=false
7700fi
7701
7702
7703if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7704   MACOSX_UNIVERSAL="true"
7705fi
7706
7707
7708
7709
7710
7711###############################################################################
7712#
7713# Set the debug level
7714#    release: no debug information, all optimizations, no asserts.
7715#    fastdebug: debug information (-g), all optimizations, all asserts
7716#    slowdebug: debug information (-g), no optimizations, all asserts
7717#
7718DEBUG_LEVEL="release"
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7720$as_echo_n "checking which debug level to use... " >&6; }
7721# Check whether --enable-debug was given.
7722if test "${enable_debug+set}" = set; then :
7723  enableval=$enable_debug;
7724        ENABLE_DEBUG="${enableval}"
7725        DEBUG_LEVEL="fastdebug"
7726
7727else
7728  ENABLE_DEBUG="no"
7729fi
7730
7731
7732
7733# Check whether --with-debug-level was given.
7734if test "${with_debug_level+set}" = set; then :
7735  withval=$with_debug_level;
7736        DEBUG_LEVEL="${withval}"
7737        if test "x$ENABLE_DEBUG" = xyes; then
7738			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7739        fi
7740
7741fi
7742
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7744$as_echo "$DEBUG_LEVEL" >&6; }
7745
7746if test "x$DEBUG_LEVEL" != xrelease && \
7747   test "x$DEBUG_LEVEL" != xfastdebug && \
7748   test "x$DEBUG_LEVEL" != xslowdebug; then
7749   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7750fi
7751
7752
7753###############################################################################
7754#
7755# Setup legacy vars/targets and new vars to deal with different debug levels.
7756#
7757
7758case $DEBUG_LEVEL in
7759      release )
7760          VARIANT="OPT"
7761          FASTDEBUG="false"
7762          DEBUG_CLASSFILES="false"
7763          BUILD_VARIANT_RELEASE=""
7764          HOTSPOT_DEBUG_LEVEL="product"
7765          HOTSPOT_EXPORT="product"
7766           ;;
7767      fastdebug )
7768          VARIANT="DBG"
7769          FASTDEBUG="true"
7770          DEBUG_CLASSFILES="true"
7771          BUILD_VARIANT_RELEASE="-fastdebug"
7772          HOTSPOT_DEBUG_LEVEL="fastdebug"
7773          HOTSPOT_EXPORT="fastdebug"
7774           ;;
7775      slowdebug )
7776          VARIANT="DBG"
7777          FASTDEBUG="false"
7778          DEBUG_CLASSFILES="true"
7779          BUILD_VARIANT_RELEASE="-debug"
7780          HOTSPOT_DEBUG_LEVEL="jvmg"
7781          HOTSPOT_EXPORT="debug"
7782           ;;
7783esac
7784
7785#####
7786# Generate the legacy makefile targets for hotspot.
7787# The hotspot api for selecting the build artifacts, really, needs to be improved.
7788# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7789# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7790# But until then ...
7791HOTSPOT_TARGET=""
7792
7793if test "x$JVM_VARIANT_SERVER" = xtrue; then
7794    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7795fi
7796
7797if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7798    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7799fi
7800
7801if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7802    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7803fi
7804
7805if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7806    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7807fi
7808
7809if test "x$JVM_VARIANT_ZERO" = xtrue; then
7810    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7811fi
7812
7813if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7814    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7815fi
7816
7817if test "x$JVM_VARIANT_CORE" = xtrue; then
7818    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
7819fi
7820
7821HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7822
7823# On Macosx universal binaries are produced, but they only contain
7824# 64 bit intel. This invalidates control of which jvms are built
7825# from configure, but only server is valid anyway. Fix this
7826# when hotspot makefiles are rewritten.
7827if test "x$MACOSX_UNIVERSAL" = xtrue; then
7828    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7829fi
7830
7831#####
7832
7833
7834
7835
7836
7837
7838
7839
7840# With basic setup done, call the custom early hook.
7841
7842
7843# To properly create a configuration name, we need to have the OpenJDK target
7844# and options (variants and debug level) parsed.
7845
7846
7847
7848# Check whether --with-conf-name was given.
7849if test "${with_conf_name+set}" = set; then :
7850  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7851fi
7852
7853
7854# Test from where we are running configure, in or outside of src root.
7855if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7856        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7857        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7858    # We are running configure from the src root.
7859    # Create a default ./build/target-variant-debuglevel output root.
7860    if test "x${CONF_NAME}" = x; then
7861        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7862    fi
7863    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7864    $MKDIR -p "$OUTPUT_ROOT"
7865    if test ! -d "$OUTPUT_ROOT"; then
7866        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7867    fi
7868else
7869    # We are running configure from outside of the src dir.
7870    # Then use the current directory as output dir!
7871    # If configuration is situated in normal build directory, just use the build
7872    # directory name as configuration name, otherwise use the complete path.
7873    if test "x${CONF_NAME}" = x; then
7874        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7875    fi
7876    OUTPUT_ROOT="$CURDIR"
7877
7878    # WARNING: This might be a bad thing to do. You need to be sure you want to
7879    # have a configuration in this directory. Do some sanity checks!
7880
7881    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7882      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7883      # other files
7884      files_present=`$LS $OUTPUT_ROOT`
7885      # Configure has already touched config.log and confdefs.h in the current dir when this check
7886      # is performed.
7887      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7888                                             | $TR -d '\n'`
7889      if test "x$filtered_files" != x; then
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7891$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7893$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7894        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7895$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7896        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7897$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7898        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7899$as_echo "$as_me: seriously mess up just about everything." >&6;}
7900        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7901$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7902        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7903$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7904        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7905      fi
7906    fi
7907fi
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7909$as_echo_n "checking what configuration name to use... " >&6; }
7910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7911$as_echo "$CONF_NAME" >&6; }
7912
7913
7914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7915
7916  # Input might be given as Windows format, start by converting to
7917  # unix format.
7918  path="$OUTPUT_ROOT"
7919  new_path=`$CYGPATH -u "$path"`
7920
7921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7924  # "foo.exe" is OK but "foo" is an error.
7925  #
7926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7927  # It is also a way to make sure we got the proper file name for the real test later on.
7928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7929  if test "x$test_shortpath" = x; then
7930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7931$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7932    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7933  fi
7934
7935  # Call helper function which possibly converts this using DOS-style short mode.
7936  # If so, the updated path is stored in $new_path.
7937
7938  input_path="$new_path"
7939  # Check if we need to convert this using DOS-style short mode. If the path
7940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7941  # take no chances and rewrite it.
7942  # Note: m4 eats our [], so we need to use [ and ] instead.
7943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7944  if test "x$has_forbidden_chars" != x; then
7945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7949      # Going to short mode and back again did indeed matter. Since short mode is
7950      # case insensitive, let's make it lowercase to improve readability.
7951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7952      # Now convert it back to Unix-stile (cygpath)
7953      input_path=`$CYGPATH -u "$shortmode_path"`
7954      new_path="$input_path"
7955    fi
7956  fi
7957
7958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7959  if test "x$test_cygdrive_prefix" = x; then
7960    # As a simple fix, exclude /usr/bin since it's not a real path.
7961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7963      # a path prefixed by /cygdrive for fixpath to work.
7964      new_path="$CYGWIN_ROOT_PATH$input_path"
7965    fi
7966  fi
7967
7968
7969  if test "x$path" != "x$new_path"; then
7970    OUTPUT_ROOT="$new_path"
7971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7972$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7973  fi
7974
7975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7976
7977  path="$OUTPUT_ROOT"
7978  has_colon=`$ECHO $path | $GREP ^.:`
7979  new_path="$path"
7980  if test "x$has_colon" = x; then
7981    # Not in mixed or Windows style, start by that.
7982    new_path=`cmd //c echo $path`
7983  fi
7984
7985
7986  input_path="$new_path"
7987  # Check if we need to convert this using DOS-style short mode. If the path
7988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7989  # take no chances and rewrite it.
7990  # Note: m4 eats our [], so we need to use [ and ] instead.
7991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7992  if test "x$has_forbidden_chars" != x; then
7993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7995  fi
7996
7997
7998  windows_path="$new_path"
7999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8000    unix_path=`$CYGPATH -u "$windows_path"`
8001    new_path="$unix_path"
8002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8004    new_path="$unix_path"
8005  fi
8006
8007  if test "x$path" != "x$new_path"; then
8008    OUTPUT_ROOT="$new_path"
8009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8010$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8011  fi
8012
8013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8015
8016  else
8017    # We're on a posix platform. Hooray! :)
8018    path="$OUTPUT_ROOT"
8019    has_space=`$ECHO "$path" | $GREP " "`
8020    if test "x$has_space" != x; then
8021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8022$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8024    fi
8025
8026    # Use eval to expand a potential ~
8027    eval path="$path"
8028    if test ! -f "$path" && test ! -d "$path"; then
8029      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8030    fi
8031
8032    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8033  fi
8034
8035
8036SPEC=$OUTPUT_ROOT/spec.gmk
8037
8038CONF_NAME=$CONF_NAME
8039
8040OUTPUT_ROOT=$OUTPUT_ROOT
8041
8042
8043# Most of the probed defines are put into config.h
8044ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8045
8046# The spec.gmk file contains all variables for the make system.
8047ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8048
8049# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8050ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8051
8052# The bootcycle-spec.gmk file contains support for boot cycle builds.
8053ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8054
8055# The compare.sh is used to compare the build output to other builds.
8056ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8057
8058# Spec.sh is currently used by compare-objects.sh
8059ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8060
8061# The generated Makefile knows where the spec.gmk is and where the source is.
8062# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8063# which will look for generated configurations
8064ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8065
8066
8067# Save the arguments given to us
8068echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8069
8070
8071# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8072
8073    for ac_prog in apt-get yum port pkgutil pkgadd
8074do
8075  # Extract the first word of "$ac_prog", so it can be a program name with args.
8076set dummy $ac_prog; ac_word=$2
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  if test -n "$PKGHANDLER"; then
8083  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8084else
8085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8086for as_dir in $PATH
8087do
8088  IFS=$as_save_IFS
8089  test -z "$as_dir" && as_dir=.
8090    for ac_exec_ext in '' $ac_executable_extensions; do
8091  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8092    ac_cv_prog_PKGHANDLER="$ac_prog"
8093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8094    break 2
8095  fi
8096done
8097  done
8098IFS=$as_save_IFS
8099
8100fi
8101fi
8102PKGHANDLER=$ac_cv_prog_PKGHANDLER
8103if test -n "$PKGHANDLER"; then
8104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8105$as_echo "$PKGHANDLER" >&6; }
8106else
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8108$as_echo "no" >&6; }
8109fi
8110
8111
8112  test -n "$PKGHANDLER" && break
8113done
8114
8115
8116
8117# Setup tools that requires more complex handling, or that is not needed by the configure script.
8118
8119
8120  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8121  if test "x$MAKE" != x; then
8122    # User has supplied a make, test it.
8123    if test ! -f "$MAKE"; then
8124      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8125    fi
8126
8127  MAKE_CANDIDATE=""$MAKE""
8128  DESCRIPTION="user supplied MAKE=$MAKE"
8129  if test "x$MAKE_CANDIDATE" != x; then
8130    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8131$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8132    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8133    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8134    if test "x$IS_GNU_MAKE" = x; then
8135      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8136$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8137    else
8138      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8139      if test "x$IS_MODERN_MAKE" = x; then
8140        { $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
8141$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;}
8142      else
8143        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8144          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8145            MAKE_EXPECTED_ENV='cygwin'
8146          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8147            MAKE_EXPECTED_ENV='msys'
8148          else
8149            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8150          fi
8151          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8152          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8153        else
8154          # Not relevant for non-Windows
8155          IS_MAKE_CORRECT_ENV=true
8156        fi
8157        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8158          { $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
8159$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;}
8160        else
8161          FOUND_MAKE=$MAKE_CANDIDATE
8162
8163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8164
8165  # First separate the path from the arguments. This will split at the first
8166  # space.
8167  complete="$FOUND_MAKE"
8168  path="${complete%% *}"
8169  tmp="$complete EOL"
8170  arguments="${tmp#* }"
8171
8172  # Input might be given as Windows format, start by converting to
8173  # unix format.
8174  new_path=`$CYGPATH -u "$path"`
8175
8176  # Now try to locate executable using which
8177  new_path=`$WHICH "$new_path" 2> /dev/null`
8178  # bat and cmd files are not always considered executable in cygwin causing which
8179  # to not find them
8180  if test "x$new_path" = x \
8181           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8182           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8183    new_path=`$CYGPATH -u "$path"`
8184  fi
8185  if test "x$new_path" = x; then
8186    # Oops. Which didn't find the executable.
8187    # The splitting of arguments from the executable at a space might have been incorrect,
8188    # since paths with space are more likely in Windows. Give it another try with the whole
8189    # argument.
8190    path="$complete"
8191    arguments="EOL"
8192    new_path=`$CYGPATH -u "$path"`
8193    new_path=`$WHICH "$new_path" 2> /dev/null`
8194    # bat and cmd files are not always considered executable in cygwin causing which
8195    # to not find them
8196    if test "x$new_path" = x \
8197             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8198             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8199      new_path=`$CYGPATH -u "$path"`
8200    fi
8201    if test "x$new_path" = x; then
8202      # It's still not found. Now this is an unrecoverable error.
8203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8205      has_space=`$ECHO "$complete" | $GREP " "`
8206      if test "x$has_space" != x; then
8207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8209      fi
8210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8211    fi
8212  fi
8213
8214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8217  # "foo.exe" is OK but "foo" is an error.
8218  #
8219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8220  # It is also a way to make sure we got the proper file name for the real test later on.
8221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8222  if test "x$test_shortpath" = x; then
8223    # Short path failed, file does not exist as specified.
8224    # Try adding .exe or .cmd
8225    if test -f "${new_path}.exe"; then
8226       input_to_shortpath="${new_path}.exe"
8227    elif test -f "${new_path}.cmd"; then
8228       input_to_shortpath="${new_path}.cmd"
8229    else
8230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8234      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8235    fi
8236  else
8237    input_to_shortpath="$new_path"
8238  fi
8239
8240  # Call helper function which possibly converts this using DOS-style short mode.
8241  # If so, the updated path is stored in $new_path.
8242  new_path="$input_to_shortpath"
8243
8244  input_path="$input_to_shortpath"
8245  # Check if we need to convert this using DOS-style short mode. If the path
8246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8247  # take no chances and rewrite it.
8248  # Note: m4 eats our [], so we need to use [ and ] instead.
8249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8250  if test "x$has_forbidden_chars" != x; then
8251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8255      # Going to short mode and back again did indeed matter. Since short mode is
8256      # case insensitive, let's make it lowercase to improve readability.
8257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8258      # Now convert it back to Unix-stile (cygpath)
8259      input_path=`$CYGPATH -u "$shortmode_path"`
8260      new_path="$input_path"
8261    fi
8262  fi
8263
8264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8265  if test "x$test_cygdrive_prefix" = x; then
8266    # As a simple fix, exclude /usr/bin since it's not a real path.
8267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8269      # a path prefixed by /cygdrive for fixpath to work.
8270      new_path="$CYGWIN_ROOT_PATH$input_path"
8271    fi
8272  fi
8273
8274  # remove trailing .exe if any
8275  new_path="${new_path/%.exe/}"
8276
8277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8278
8279  # First separate the path from the arguments. This will split at the first
8280  # space.
8281  complete="$FOUND_MAKE"
8282  path="${complete%% *}"
8283  tmp="$complete EOL"
8284  arguments="${tmp#* }"
8285
8286  # Input might be given as Windows format, start by converting to
8287  # unix format.
8288  new_path="$path"
8289
8290  windows_path="$new_path"
8291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8292    unix_path=`$CYGPATH -u "$windows_path"`
8293    new_path="$unix_path"
8294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8296    new_path="$unix_path"
8297  fi
8298
8299
8300  # Now try to locate executable using which
8301  new_path=`$WHICH "$new_path" 2> /dev/null`
8302
8303  if test "x$new_path" = x; then
8304    # Oops. Which didn't find the executable.
8305    # The splitting of arguments from the executable at a space might have been incorrect,
8306    # since paths with space are more likely in Windows. Give it another try with the whole
8307    # argument.
8308    path="$complete"
8309    arguments="EOL"
8310    new_path="$path"
8311
8312  windows_path="$new_path"
8313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8314    unix_path=`$CYGPATH -u "$windows_path"`
8315    new_path="$unix_path"
8316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8318    new_path="$unix_path"
8319  fi
8320
8321
8322    new_path=`$WHICH "$new_path" 2> /dev/null`
8323
8324    if test "x$new_path" = x; then
8325      # It's still not found. Now this is an unrecoverable error.
8326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8328      has_space=`$ECHO "$complete" | $GREP " "`
8329      if test "x$has_space" != x; then
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8332      fi
8333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8334    fi
8335  fi
8336
8337  # Now new_path has a complete unix path to the binary
8338  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8339    # Keep paths in /bin as-is, but remove trailing .exe if any
8340    new_path="${new_path/%.exe/}"
8341    # Do not save /bin paths to all_fixpath_prefixes!
8342  else
8343    # Not in mixed or Windows style, start by that.
8344    new_path=`cmd //c echo $new_path`
8345
8346  input_path="$new_path"
8347  # Check if we need to convert this using DOS-style short mode. If the path
8348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8349  # take no chances and rewrite it.
8350  # Note: m4 eats our [], so we need to use [ and ] instead.
8351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8352  if test "x$has_forbidden_chars" != x; then
8353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8355  fi
8356
8357    # Output is in $new_path
8358
8359  windows_path="$new_path"
8360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8361    unix_path=`$CYGPATH -u "$windows_path"`
8362    new_path="$unix_path"
8363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8365    new_path="$unix_path"
8366  fi
8367
8368    # remove trailing .exe if any
8369    new_path="${new_path/%.exe/}"
8370
8371    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8372    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8373  fi
8374
8375  else
8376    # We're on a posix platform. Hooray! :)
8377    # First separate the path from the arguments. This will split at the first
8378    # space.
8379    complete="$FOUND_MAKE"
8380    path="${complete%% *}"
8381    tmp="$complete EOL"
8382    arguments="${tmp#* }"
8383
8384    # Cannot rely on the command "which" here since it doesn't always work.
8385    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8386    if test -z "$is_absolute_path"; then
8387      # Path to executable is not absolute. Find it.
8388      IFS_save="$IFS"
8389      IFS=:
8390      for p in $PATH; do
8391        if test -f "$p/$path" && test -x "$p/$path"; then
8392          new_path="$p/$path"
8393          break
8394        fi
8395      done
8396      IFS="$IFS_save"
8397    else
8398      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8399$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8400      new_path="$path"
8401    fi
8402
8403    if test "x$new_path" = x; then
8404        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8405$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8406        has_space=`$ECHO "$complete" | $GREP " "`
8407        if test "x$has_space" != x; then
8408          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8409$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8410        fi
8411        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8412      fi
8413  fi
8414
8415      # Now join together the path and the arguments once again
8416      if test "x$arguments" != xEOL; then
8417        new_complete="$new_path ${arguments% *}"
8418      else
8419        new_complete="$new_path"
8420      fi
8421
8422  if test "x$complete" != "x$new_complete"; then
8423      FOUND_MAKE="$new_complete"
8424      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8425$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8426    fi
8427
8428        fi
8429      fi
8430    fi
8431  fi
8432
8433    if test "x$FOUND_MAKE" = x; then
8434      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8435    fi
8436  else
8437    # Try our hardest to locate a correct version of GNU make
8438    for ac_prog in gmake
8439do
8440  # Extract the first word of "$ac_prog", so it can be a program name with args.
8441set dummy $ac_prog; ac_word=$2
8442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8443$as_echo_n "checking for $ac_word... " >&6; }
8444if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8445  $as_echo_n "(cached) " >&6
8446else
8447  case $CHECK_GMAKE in
8448  [\\/]* | ?:[\\/]*)
8449  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8450  ;;
8451  *)
8452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8453for as_dir in $PATH
8454do
8455  IFS=$as_save_IFS
8456  test -z "$as_dir" && as_dir=.
8457    for ac_exec_ext in '' $ac_executable_extensions; do
8458  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8459    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8461    break 2
8462  fi
8463done
8464  done
8465IFS=$as_save_IFS
8466
8467  ;;
8468esac
8469fi
8470CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8471if test -n "$CHECK_GMAKE"; then
8472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8473$as_echo "$CHECK_GMAKE" >&6; }
8474else
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476$as_echo "no" >&6; }
8477fi
8478
8479
8480  test -n "$CHECK_GMAKE" && break
8481done
8482
8483
8484  MAKE_CANDIDATE=""$CHECK_GMAKE""
8485  DESCRIPTION="gmake in PATH"
8486  if test "x$MAKE_CANDIDATE" != x; then
8487    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8488$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8489    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8490    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8491    if test "x$IS_GNU_MAKE" = x; then
8492      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8493$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8494    else
8495      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8496      if test "x$IS_MODERN_MAKE" = x; then
8497        { $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
8498$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;}
8499      else
8500        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8501          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8502            MAKE_EXPECTED_ENV='cygwin'
8503          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8504            MAKE_EXPECTED_ENV='msys'
8505          else
8506            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8507          fi
8508          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8509          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8510        else
8511          # Not relevant for non-Windows
8512          IS_MAKE_CORRECT_ENV=true
8513        fi
8514        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8515          { $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
8516$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;}
8517        else
8518          FOUND_MAKE=$MAKE_CANDIDATE
8519
8520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8521
8522  # First separate the path from the arguments. This will split at the first
8523  # space.
8524  complete="$FOUND_MAKE"
8525  path="${complete%% *}"
8526  tmp="$complete EOL"
8527  arguments="${tmp#* }"
8528
8529  # Input might be given as Windows format, start by converting to
8530  # unix format.
8531  new_path=`$CYGPATH -u "$path"`
8532
8533  # Now try to locate executable using which
8534  new_path=`$WHICH "$new_path" 2> /dev/null`
8535  # bat and cmd files are not always considered executable in cygwin causing which
8536  # to not find them
8537  if test "x$new_path" = x \
8538           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8539           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8540    new_path=`$CYGPATH -u "$path"`
8541  fi
8542  if test "x$new_path" = x; then
8543    # Oops. Which didn't find the executable.
8544    # The splitting of arguments from the executable at a space might have been incorrect,
8545    # since paths with space are more likely in Windows. Give it another try with the whole
8546    # argument.
8547    path="$complete"
8548    arguments="EOL"
8549    new_path=`$CYGPATH -u "$path"`
8550    new_path=`$WHICH "$new_path" 2> /dev/null`
8551    # bat and cmd files are not always considered executable in cygwin causing which
8552    # to not find them
8553    if test "x$new_path" = x \
8554             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8555             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8556      new_path=`$CYGPATH -u "$path"`
8557    fi
8558    if test "x$new_path" = x; then
8559      # It's still not found. Now this is an unrecoverable error.
8560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8561$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8562      has_space=`$ECHO "$complete" | $GREP " "`
8563      if test "x$has_space" != x; then
8564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8566      fi
8567      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8568    fi
8569  fi
8570
8571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8574  # "foo.exe" is OK but "foo" is an error.
8575  #
8576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8577  # It is also a way to make sure we got the proper file name for the real test later on.
8578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8579  if test "x$test_shortpath" = x; then
8580    # Short path failed, file does not exist as specified.
8581    # Try adding .exe or .cmd
8582    if test -f "${new_path}.exe"; then
8583       input_to_shortpath="${new_path}.exe"
8584    elif test -f "${new_path}.cmd"; then
8585       input_to_shortpath="${new_path}.cmd"
8586    else
8587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8588$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8592    fi
8593  else
8594    input_to_shortpath="$new_path"
8595  fi
8596
8597  # Call helper function which possibly converts this using DOS-style short mode.
8598  # If so, the updated path is stored in $new_path.
8599  new_path="$input_to_shortpath"
8600
8601  input_path="$input_to_shortpath"
8602  # Check if we need to convert this using DOS-style short mode. If the path
8603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8604  # take no chances and rewrite it.
8605  # Note: m4 eats our [], so we need to use [ and ] instead.
8606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8607  if test "x$has_forbidden_chars" != x; then
8608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8612      # Going to short mode and back again did indeed matter. Since short mode is
8613      # case insensitive, let's make it lowercase to improve readability.
8614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8615      # Now convert it back to Unix-stile (cygpath)
8616      input_path=`$CYGPATH -u "$shortmode_path"`
8617      new_path="$input_path"
8618    fi
8619  fi
8620
8621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8622  if test "x$test_cygdrive_prefix" = x; then
8623    # As a simple fix, exclude /usr/bin since it's not a real path.
8624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8626      # a path prefixed by /cygdrive for fixpath to work.
8627      new_path="$CYGWIN_ROOT_PATH$input_path"
8628    fi
8629  fi
8630
8631  # remove trailing .exe if any
8632  new_path="${new_path/%.exe/}"
8633
8634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8635
8636  # First separate the path from the arguments. This will split at the first
8637  # space.
8638  complete="$FOUND_MAKE"
8639  path="${complete%% *}"
8640  tmp="$complete EOL"
8641  arguments="${tmp#* }"
8642
8643  # Input might be given as Windows format, start by converting to
8644  # unix format.
8645  new_path="$path"
8646
8647  windows_path="$new_path"
8648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8649    unix_path=`$CYGPATH -u "$windows_path"`
8650    new_path="$unix_path"
8651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8653    new_path="$unix_path"
8654  fi
8655
8656
8657  # Now try to locate executable using which
8658  new_path=`$WHICH "$new_path" 2> /dev/null`
8659
8660  if test "x$new_path" = x; then
8661    # Oops. Which didn't find the executable.
8662    # The splitting of arguments from the executable at a space might have been incorrect,
8663    # since paths with space are more likely in Windows. Give it another try with the whole
8664    # argument.
8665    path="$complete"
8666    arguments="EOL"
8667    new_path="$path"
8668
8669  windows_path="$new_path"
8670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8671    unix_path=`$CYGPATH -u "$windows_path"`
8672    new_path="$unix_path"
8673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8675    new_path="$unix_path"
8676  fi
8677
8678
8679    new_path=`$WHICH "$new_path" 2> /dev/null`
8680
8681    if test "x$new_path" = x; then
8682      # It's still not found. Now this is an unrecoverable error.
8683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8685      has_space=`$ECHO "$complete" | $GREP " "`
8686      if test "x$has_space" != x; then
8687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8689      fi
8690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8691    fi
8692  fi
8693
8694  # Now new_path has a complete unix path to the binary
8695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8696    # Keep paths in /bin as-is, but remove trailing .exe if any
8697    new_path="${new_path/%.exe/}"
8698    # Do not save /bin paths to all_fixpath_prefixes!
8699  else
8700    # Not in mixed or Windows style, start by that.
8701    new_path=`cmd //c echo $new_path`
8702
8703  input_path="$new_path"
8704  # Check if we need to convert this using DOS-style short mode. If the path
8705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8706  # take no chances and rewrite it.
8707  # Note: m4 eats our [], so we need to use [ and ] instead.
8708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8709  if test "x$has_forbidden_chars" != x; then
8710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8712  fi
8713
8714    # Output is in $new_path
8715
8716  windows_path="$new_path"
8717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8718    unix_path=`$CYGPATH -u "$windows_path"`
8719    new_path="$unix_path"
8720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8722    new_path="$unix_path"
8723  fi
8724
8725    # remove trailing .exe if any
8726    new_path="${new_path/%.exe/}"
8727
8728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8730  fi
8731
8732  else
8733    # We're on a posix platform. Hooray! :)
8734    # First separate the path from the arguments. This will split at the first
8735    # space.
8736    complete="$FOUND_MAKE"
8737    path="${complete%% *}"
8738    tmp="$complete EOL"
8739    arguments="${tmp#* }"
8740
8741    # Cannot rely on the command "which" here since it doesn't always work.
8742    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8743    if test -z "$is_absolute_path"; then
8744      # Path to executable is not absolute. Find it.
8745      IFS_save="$IFS"
8746      IFS=:
8747      for p in $PATH; do
8748        if test -f "$p/$path" && test -x "$p/$path"; then
8749          new_path="$p/$path"
8750          break
8751        fi
8752      done
8753      IFS="$IFS_save"
8754    else
8755      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8756$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8757      new_path="$path"
8758    fi
8759
8760    if test "x$new_path" = x; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8763        has_space=`$ECHO "$complete" | $GREP " "`
8764        if test "x$has_space" != x; then
8765          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8767        fi
8768        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8769      fi
8770  fi
8771
8772      # Now join together the path and the arguments once again
8773      if test "x$arguments" != xEOL; then
8774        new_complete="$new_path ${arguments% *}"
8775      else
8776        new_complete="$new_path"
8777      fi
8778
8779  if test "x$complete" != "x$new_complete"; then
8780      FOUND_MAKE="$new_complete"
8781      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8782$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8783    fi
8784
8785        fi
8786      fi
8787    fi
8788  fi
8789
8790
8791    if test "x$FOUND_MAKE" = x; then
8792      for ac_prog in make
8793do
8794  # Extract the first word of "$ac_prog", so it can be a program name with args.
8795set dummy $ac_prog; ac_word=$2
8796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8797$as_echo_n "checking for $ac_word... " >&6; }
8798if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8799  $as_echo_n "(cached) " >&6
8800else
8801  case $CHECK_MAKE in
8802  [\\/]* | ?:[\\/]*)
8803  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8804  ;;
8805  *)
8806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8807for as_dir in $PATH
8808do
8809  IFS=$as_save_IFS
8810  test -z "$as_dir" && as_dir=.
8811    for ac_exec_ext in '' $ac_executable_extensions; do
8812  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8813    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8815    break 2
8816  fi
8817done
8818  done
8819IFS=$as_save_IFS
8820
8821  ;;
8822esac
8823fi
8824CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8825if test -n "$CHECK_MAKE"; then
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8827$as_echo "$CHECK_MAKE" >&6; }
8828else
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8830$as_echo "no" >&6; }
8831fi
8832
8833
8834  test -n "$CHECK_MAKE" && break
8835done
8836
8837
8838  MAKE_CANDIDATE=""$CHECK_MAKE""
8839  DESCRIPTION="make in PATH"
8840  if test "x$MAKE_CANDIDATE" != x; then
8841    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8842$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8843    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8844    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8845    if test "x$IS_GNU_MAKE" = x; then
8846      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8847$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8848    else
8849      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8850      if test "x$IS_MODERN_MAKE" = x; then
8851        { $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
8852$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;}
8853      else
8854        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8855          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8856            MAKE_EXPECTED_ENV='cygwin'
8857          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8858            MAKE_EXPECTED_ENV='msys'
8859          else
8860            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8861          fi
8862          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8863          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8864        else
8865          # Not relevant for non-Windows
8866          IS_MAKE_CORRECT_ENV=true
8867        fi
8868        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8869          { $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
8870$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;}
8871        else
8872          FOUND_MAKE=$MAKE_CANDIDATE
8873
8874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8875
8876  # First separate the path from the arguments. This will split at the first
8877  # space.
8878  complete="$FOUND_MAKE"
8879  path="${complete%% *}"
8880  tmp="$complete EOL"
8881  arguments="${tmp#* }"
8882
8883  # Input might be given as Windows format, start by converting to
8884  # unix format.
8885  new_path=`$CYGPATH -u "$path"`
8886
8887  # Now try to locate executable using which
8888  new_path=`$WHICH "$new_path" 2> /dev/null`
8889  # bat and cmd files are not always considered executable in cygwin causing which
8890  # to not find them
8891  if test "x$new_path" = x \
8892           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8893           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8894    new_path=`$CYGPATH -u "$path"`
8895  fi
8896  if test "x$new_path" = x; then
8897    # Oops. Which didn't find the executable.
8898    # The splitting of arguments from the executable at a space might have been incorrect,
8899    # since paths with space are more likely in Windows. Give it another try with the whole
8900    # argument.
8901    path="$complete"
8902    arguments="EOL"
8903    new_path=`$CYGPATH -u "$path"`
8904    new_path=`$WHICH "$new_path" 2> /dev/null`
8905    # bat and cmd files are not always considered executable in cygwin causing which
8906    # to not find them
8907    if test "x$new_path" = x \
8908             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8909             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8910      new_path=`$CYGPATH -u "$path"`
8911    fi
8912    if test "x$new_path" = x; then
8913      # It's still not found. Now this is an unrecoverable error.
8914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8916      has_space=`$ECHO "$complete" | $GREP " "`
8917      if test "x$has_space" != x; then
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8920      fi
8921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8922    fi
8923  fi
8924
8925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8928  # "foo.exe" is OK but "foo" is an error.
8929  #
8930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8931  # It is also a way to make sure we got the proper file name for the real test later on.
8932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8933  if test "x$test_shortpath" = x; then
8934    # Short path failed, file does not exist as specified.
8935    # Try adding .exe or .cmd
8936    if test -f "${new_path}.exe"; then
8937       input_to_shortpath="${new_path}.exe"
8938    elif test -f "${new_path}.cmd"; then
8939       input_to_shortpath="${new_path}.cmd"
8940    else
8941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8945      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8946    fi
8947  else
8948    input_to_shortpath="$new_path"
8949  fi
8950
8951  # Call helper function which possibly converts this using DOS-style short mode.
8952  # If so, the updated path is stored in $new_path.
8953  new_path="$input_to_shortpath"
8954
8955  input_path="$input_to_shortpath"
8956  # Check if we need to convert this using DOS-style short mode. If the path
8957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8958  # take no chances and rewrite it.
8959  # Note: m4 eats our [], so we need to use [ and ] instead.
8960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8961  if test "x$has_forbidden_chars" != x; then
8962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8966      # Going to short mode and back again did indeed matter. Since short mode is
8967      # case insensitive, let's make it lowercase to improve readability.
8968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8969      # Now convert it back to Unix-stile (cygpath)
8970      input_path=`$CYGPATH -u "$shortmode_path"`
8971      new_path="$input_path"
8972    fi
8973  fi
8974
8975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8976  if test "x$test_cygdrive_prefix" = x; then
8977    # As a simple fix, exclude /usr/bin since it's not a real path.
8978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8980      # a path prefixed by /cygdrive for fixpath to work.
8981      new_path="$CYGWIN_ROOT_PATH$input_path"
8982    fi
8983  fi
8984
8985  # remove trailing .exe if any
8986  new_path="${new_path/%.exe/}"
8987
8988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8989
8990  # First separate the path from the arguments. This will split at the first
8991  # space.
8992  complete="$FOUND_MAKE"
8993  path="${complete%% *}"
8994  tmp="$complete EOL"
8995  arguments="${tmp#* }"
8996
8997  # Input might be given as Windows format, start by converting to
8998  # unix format.
8999  new_path="$path"
9000
9001  windows_path="$new_path"
9002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9003    unix_path=`$CYGPATH -u "$windows_path"`
9004    new_path="$unix_path"
9005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9007    new_path="$unix_path"
9008  fi
9009
9010
9011  # Now try to locate executable using which
9012  new_path=`$WHICH "$new_path" 2> /dev/null`
9013
9014  if test "x$new_path" = x; then
9015    # Oops. Which didn't find the executable.
9016    # The splitting of arguments from the executable at a space might have been incorrect,
9017    # since paths with space are more likely in Windows. Give it another try with the whole
9018    # argument.
9019    path="$complete"
9020    arguments="EOL"
9021    new_path="$path"
9022
9023  windows_path="$new_path"
9024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9025    unix_path=`$CYGPATH -u "$windows_path"`
9026    new_path="$unix_path"
9027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9029    new_path="$unix_path"
9030  fi
9031
9032
9033    new_path=`$WHICH "$new_path" 2> /dev/null`
9034
9035    if test "x$new_path" = x; then
9036      # It's still not found. Now this is an unrecoverable error.
9037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9039      has_space=`$ECHO "$complete" | $GREP " "`
9040      if test "x$has_space" != x; then
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9043      fi
9044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9045    fi
9046  fi
9047
9048  # Now new_path has a complete unix path to the binary
9049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9050    # Keep paths in /bin as-is, but remove trailing .exe if any
9051    new_path="${new_path/%.exe/}"
9052    # Do not save /bin paths to all_fixpath_prefixes!
9053  else
9054    # Not in mixed or Windows style, start by that.
9055    new_path=`cmd //c echo $new_path`
9056
9057  input_path="$new_path"
9058  # Check if we need to convert this using DOS-style short mode. If the path
9059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9060  # take no chances and rewrite it.
9061  # Note: m4 eats our [], so we need to use [ and ] instead.
9062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9063  if test "x$has_forbidden_chars" != x; then
9064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9066  fi
9067
9068    # Output is in $new_path
9069
9070  windows_path="$new_path"
9071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9072    unix_path=`$CYGPATH -u "$windows_path"`
9073    new_path="$unix_path"
9074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9076    new_path="$unix_path"
9077  fi
9078
9079    # remove trailing .exe if any
9080    new_path="${new_path/%.exe/}"
9081
9082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9084  fi
9085
9086  else
9087    # We're on a posix platform. Hooray! :)
9088    # First separate the path from the arguments. This will split at the first
9089    # space.
9090    complete="$FOUND_MAKE"
9091    path="${complete%% *}"
9092    tmp="$complete EOL"
9093    arguments="${tmp#* }"
9094
9095    # Cannot rely on the command "which" here since it doesn't always work.
9096    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9097    if test -z "$is_absolute_path"; then
9098      # Path to executable is not absolute. Find it.
9099      IFS_save="$IFS"
9100      IFS=:
9101      for p in $PATH; do
9102        if test -f "$p/$path" && test -x "$p/$path"; then
9103          new_path="$p/$path"
9104          break
9105        fi
9106      done
9107      IFS="$IFS_save"
9108    else
9109      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9110$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9111      new_path="$path"
9112    fi
9113
9114    if test "x$new_path" = x; then
9115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9116$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9117        has_space=`$ECHO "$complete" | $GREP " "`
9118        if test "x$has_space" != x; then
9119          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9121        fi
9122        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9123      fi
9124  fi
9125
9126      # Now join together the path and the arguments once again
9127      if test "x$arguments" != xEOL; then
9128        new_complete="$new_path ${arguments% *}"
9129      else
9130        new_complete="$new_path"
9131      fi
9132
9133  if test "x$complete" != "x$new_complete"; then
9134      FOUND_MAKE="$new_complete"
9135      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9136$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9137    fi
9138
9139        fi
9140      fi
9141    fi
9142  fi
9143
9144    fi
9145
9146    if test "x$FOUND_MAKE" = x; then
9147      if test "x$TOOLS_DIR" != x; then
9148        # We have a tools-dir, check that as well before giving up.
9149        OLD_PATH=$PATH
9150        PATH=$TOOLS_DIR:$PATH
9151        for ac_prog in gmake
9152do
9153  # Extract the first word of "$ac_prog", so it can be a program name with args.
9154set dummy $ac_prog; ac_word=$2
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9156$as_echo_n "checking for $ac_word... " >&6; }
9157if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9158  $as_echo_n "(cached) " >&6
9159else
9160  case $CHECK_TOOLSDIR_GMAKE in
9161  [\\/]* | ?:[\\/]*)
9162  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9163  ;;
9164  *)
9165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9166for as_dir in $PATH
9167do
9168  IFS=$as_save_IFS
9169  test -z "$as_dir" && as_dir=.
9170    for ac_exec_ext in '' $ac_executable_extensions; do
9171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9172    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9174    break 2
9175  fi
9176done
9177  done
9178IFS=$as_save_IFS
9179
9180  ;;
9181esac
9182fi
9183CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9184if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9186$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9187else
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
9190fi
9191
9192
9193  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9194done
9195
9196
9197  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9198  DESCRIPTION="gmake in tools-dir"
9199  if test "x$MAKE_CANDIDATE" != x; then
9200    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9201$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9202    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9203    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9204    if test "x$IS_GNU_MAKE" = x; then
9205      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9206$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9207    else
9208      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9209      if test "x$IS_MODERN_MAKE" = x; then
9210        { $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
9211$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;}
9212      else
9213        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9214          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9215            MAKE_EXPECTED_ENV='cygwin'
9216          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9217            MAKE_EXPECTED_ENV='msys'
9218          else
9219            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9220          fi
9221          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9222          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9223        else
9224          # Not relevant for non-Windows
9225          IS_MAKE_CORRECT_ENV=true
9226        fi
9227        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9228          { $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
9229$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;}
9230        else
9231          FOUND_MAKE=$MAKE_CANDIDATE
9232
9233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9234
9235  # First separate the path from the arguments. This will split at the first
9236  # space.
9237  complete="$FOUND_MAKE"
9238  path="${complete%% *}"
9239  tmp="$complete EOL"
9240  arguments="${tmp#* }"
9241
9242  # Input might be given as Windows format, start by converting to
9243  # unix format.
9244  new_path=`$CYGPATH -u "$path"`
9245
9246  # Now try to locate executable using which
9247  new_path=`$WHICH "$new_path" 2> /dev/null`
9248  # bat and cmd files are not always considered executable in cygwin causing which
9249  # to not find them
9250  if test "x$new_path" = x \
9251           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9252           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9253    new_path=`$CYGPATH -u "$path"`
9254  fi
9255  if test "x$new_path" = x; then
9256    # Oops. Which didn't find the executable.
9257    # The splitting of arguments from the executable at a space might have been incorrect,
9258    # since paths with space are more likely in Windows. Give it another try with the whole
9259    # argument.
9260    path="$complete"
9261    arguments="EOL"
9262    new_path=`$CYGPATH -u "$path"`
9263    new_path=`$WHICH "$new_path" 2> /dev/null`
9264    # bat and cmd files are not always considered executable in cygwin causing which
9265    # to not find them
9266    if test "x$new_path" = x \
9267             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9268             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9269      new_path=`$CYGPATH -u "$path"`
9270    fi
9271    if test "x$new_path" = x; then
9272      # It's still not found. Now this is an unrecoverable error.
9273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9275      has_space=`$ECHO "$complete" | $GREP " "`
9276      if test "x$has_space" != x; then
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9279      fi
9280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9281    fi
9282  fi
9283
9284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9287  # "foo.exe" is OK but "foo" is an error.
9288  #
9289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9290  # It is also a way to make sure we got the proper file name for the real test later on.
9291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9292  if test "x$test_shortpath" = x; then
9293    # Short path failed, file does not exist as specified.
9294    # Try adding .exe or .cmd
9295    if test -f "${new_path}.exe"; then
9296       input_to_shortpath="${new_path}.exe"
9297    elif test -f "${new_path}.cmd"; then
9298       input_to_shortpath="${new_path}.cmd"
9299    else
9300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9301$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9304      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9305    fi
9306  else
9307    input_to_shortpath="$new_path"
9308  fi
9309
9310  # Call helper function which possibly converts this using DOS-style short mode.
9311  # If so, the updated path is stored in $new_path.
9312  new_path="$input_to_shortpath"
9313
9314  input_path="$input_to_shortpath"
9315  # Check if we need to convert this using DOS-style short mode. If the path
9316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9317  # take no chances and rewrite it.
9318  # Note: m4 eats our [], so we need to use [ and ] instead.
9319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9320  if test "x$has_forbidden_chars" != x; then
9321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9325      # Going to short mode and back again did indeed matter. Since short mode is
9326      # case insensitive, let's make it lowercase to improve readability.
9327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9328      # Now convert it back to Unix-stile (cygpath)
9329      input_path=`$CYGPATH -u "$shortmode_path"`
9330      new_path="$input_path"
9331    fi
9332  fi
9333
9334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9335  if test "x$test_cygdrive_prefix" = x; then
9336    # As a simple fix, exclude /usr/bin since it's not a real path.
9337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9339      # a path prefixed by /cygdrive for fixpath to work.
9340      new_path="$CYGWIN_ROOT_PATH$input_path"
9341    fi
9342  fi
9343
9344  # remove trailing .exe if any
9345  new_path="${new_path/%.exe/}"
9346
9347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9348
9349  # First separate the path from the arguments. This will split at the first
9350  # space.
9351  complete="$FOUND_MAKE"
9352  path="${complete%% *}"
9353  tmp="$complete EOL"
9354  arguments="${tmp#* }"
9355
9356  # Input might be given as Windows format, start by converting to
9357  # unix format.
9358  new_path="$path"
9359
9360  windows_path="$new_path"
9361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9362    unix_path=`$CYGPATH -u "$windows_path"`
9363    new_path="$unix_path"
9364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9366    new_path="$unix_path"
9367  fi
9368
9369
9370  # Now try to locate executable using which
9371  new_path=`$WHICH "$new_path" 2> /dev/null`
9372
9373  if test "x$new_path" = x; then
9374    # Oops. Which didn't find the executable.
9375    # The splitting of arguments from the executable at a space might have been incorrect,
9376    # since paths with space are more likely in Windows. Give it another try with the whole
9377    # argument.
9378    path="$complete"
9379    arguments="EOL"
9380    new_path="$path"
9381
9382  windows_path="$new_path"
9383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9384    unix_path=`$CYGPATH -u "$windows_path"`
9385    new_path="$unix_path"
9386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9388    new_path="$unix_path"
9389  fi
9390
9391
9392    new_path=`$WHICH "$new_path" 2> /dev/null`
9393
9394    if test "x$new_path" = x; then
9395      # It's still not found. Now this is an unrecoverable error.
9396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9397$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9398      has_space=`$ECHO "$complete" | $GREP " "`
9399      if test "x$has_space" != x; then
9400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9402      fi
9403      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9404    fi
9405  fi
9406
9407  # Now new_path has a complete unix path to the binary
9408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9409    # Keep paths in /bin as-is, but remove trailing .exe if any
9410    new_path="${new_path/%.exe/}"
9411    # Do not save /bin paths to all_fixpath_prefixes!
9412  else
9413    # Not in mixed or Windows style, start by that.
9414    new_path=`cmd //c echo $new_path`
9415
9416  input_path="$new_path"
9417  # Check if we need to convert this using DOS-style short mode. If the path
9418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9419  # take no chances and rewrite it.
9420  # Note: m4 eats our [], so we need to use [ and ] instead.
9421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9422  if test "x$has_forbidden_chars" != x; then
9423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9425  fi
9426
9427    # Output is in $new_path
9428
9429  windows_path="$new_path"
9430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9431    unix_path=`$CYGPATH -u "$windows_path"`
9432    new_path="$unix_path"
9433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9435    new_path="$unix_path"
9436  fi
9437
9438    # remove trailing .exe if any
9439    new_path="${new_path/%.exe/}"
9440
9441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9443  fi
9444
9445  else
9446    # We're on a posix platform. Hooray! :)
9447    # First separate the path from the arguments. This will split at the first
9448    # space.
9449    complete="$FOUND_MAKE"
9450    path="${complete%% *}"
9451    tmp="$complete EOL"
9452    arguments="${tmp#* }"
9453
9454    # Cannot rely on the command "which" here since it doesn't always work.
9455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9456    if test -z "$is_absolute_path"; then
9457      # Path to executable is not absolute. Find it.
9458      IFS_save="$IFS"
9459      IFS=:
9460      for p in $PATH; do
9461        if test -f "$p/$path" && test -x "$p/$path"; then
9462          new_path="$p/$path"
9463          break
9464        fi
9465      done
9466      IFS="$IFS_save"
9467    else
9468      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9469$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9470      new_path="$path"
9471    fi
9472
9473    if test "x$new_path" = x; then
9474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9475$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9476        has_space=`$ECHO "$complete" | $GREP " "`
9477        if test "x$has_space" != x; then
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9480        fi
9481        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9482      fi
9483  fi
9484
9485      # Now join together the path and the arguments once again
9486      if test "x$arguments" != xEOL; then
9487        new_complete="$new_path ${arguments% *}"
9488      else
9489        new_complete="$new_path"
9490      fi
9491
9492  if test "x$complete" != "x$new_complete"; then
9493      FOUND_MAKE="$new_complete"
9494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9495$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9496    fi
9497
9498        fi
9499      fi
9500    fi
9501  fi
9502
9503        if test "x$FOUND_MAKE" = x; then
9504          for ac_prog in make
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $CHECK_TOOLSDIR_MAKE in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9525    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9537if test -n "$CHECK_TOOLSDIR_MAKE"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9539$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$CHECK_TOOLSDIR_MAKE" && break
9547done
9548
9549
9550  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9551  DESCRIPTION="make in tools-dir"
9552  if test "x$MAKE_CANDIDATE" != x; then
9553    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9554$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9555    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9556    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9557    if test "x$IS_GNU_MAKE" = x; then
9558      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9559$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9560    else
9561      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9562      if test "x$IS_MODERN_MAKE" = x; then
9563        { $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
9564$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;}
9565      else
9566        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9567          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9568            MAKE_EXPECTED_ENV='cygwin'
9569          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9570            MAKE_EXPECTED_ENV='msys'
9571          else
9572            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9573          fi
9574          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9575          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9576        else
9577          # Not relevant for non-Windows
9578          IS_MAKE_CORRECT_ENV=true
9579        fi
9580        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9581          { $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
9582$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;}
9583        else
9584          FOUND_MAKE=$MAKE_CANDIDATE
9585
9586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9587
9588  # First separate the path from the arguments. This will split at the first
9589  # space.
9590  complete="$FOUND_MAKE"
9591  path="${complete%% *}"
9592  tmp="$complete EOL"
9593  arguments="${tmp#* }"
9594
9595  # Input might be given as Windows format, start by converting to
9596  # unix format.
9597  new_path=`$CYGPATH -u "$path"`
9598
9599  # Now try to locate executable using which
9600  new_path=`$WHICH "$new_path" 2> /dev/null`
9601  # bat and cmd files are not always considered executable in cygwin causing which
9602  # to not find them
9603  if test "x$new_path" = x \
9604           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9605           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9606    new_path=`$CYGPATH -u "$path"`
9607  fi
9608  if test "x$new_path" = x; then
9609    # Oops. Which didn't find the executable.
9610    # The splitting of arguments from the executable at a space might have been incorrect,
9611    # since paths with space are more likely in Windows. Give it another try with the whole
9612    # argument.
9613    path="$complete"
9614    arguments="EOL"
9615    new_path=`$CYGPATH -u "$path"`
9616    new_path=`$WHICH "$new_path" 2> /dev/null`
9617    # bat and cmd files are not always considered executable in cygwin causing which
9618    # to not find them
9619    if test "x$new_path" = x \
9620             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9621             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9622      new_path=`$CYGPATH -u "$path"`
9623    fi
9624    if test "x$new_path" = x; then
9625      # It's still not found. Now this is an unrecoverable error.
9626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9627$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9628      has_space=`$ECHO "$complete" | $GREP " "`
9629      if test "x$has_space" != x; then
9630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9632      fi
9633      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9634    fi
9635  fi
9636
9637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9640  # "foo.exe" is OK but "foo" is an error.
9641  #
9642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9643  # It is also a way to make sure we got the proper file name for the real test later on.
9644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9645  if test "x$test_shortpath" = x; then
9646    # Short path failed, file does not exist as specified.
9647    # Try adding .exe or .cmd
9648    if test -f "${new_path}.exe"; then
9649       input_to_shortpath="${new_path}.exe"
9650    elif test -f "${new_path}.cmd"; then
9651       input_to_shortpath="${new_path}.cmd"
9652    else
9653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9654$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9657      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9658    fi
9659  else
9660    input_to_shortpath="$new_path"
9661  fi
9662
9663  # Call helper function which possibly converts this using DOS-style short mode.
9664  # If so, the updated path is stored in $new_path.
9665  new_path="$input_to_shortpath"
9666
9667  input_path="$input_to_shortpath"
9668  # Check if we need to convert this using DOS-style short mode. If the path
9669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9670  # take no chances and rewrite it.
9671  # Note: m4 eats our [], so we need to use [ and ] instead.
9672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9673  if test "x$has_forbidden_chars" != x; then
9674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9678      # Going to short mode and back again did indeed matter. Since short mode is
9679      # case insensitive, let's make it lowercase to improve readability.
9680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9681      # Now convert it back to Unix-stile (cygpath)
9682      input_path=`$CYGPATH -u "$shortmode_path"`
9683      new_path="$input_path"
9684    fi
9685  fi
9686
9687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9688  if test "x$test_cygdrive_prefix" = x; then
9689    # As a simple fix, exclude /usr/bin since it's not a real path.
9690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9692      # a path prefixed by /cygdrive for fixpath to work.
9693      new_path="$CYGWIN_ROOT_PATH$input_path"
9694    fi
9695  fi
9696
9697  # remove trailing .exe if any
9698  new_path="${new_path/%.exe/}"
9699
9700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9701
9702  # First separate the path from the arguments. This will split at the first
9703  # space.
9704  complete="$FOUND_MAKE"
9705  path="${complete%% *}"
9706  tmp="$complete EOL"
9707  arguments="${tmp#* }"
9708
9709  # Input might be given as Windows format, start by converting to
9710  # unix format.
9711  new_path="$path"
9712
9713  windows_path="$new_path"
9714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9715    unix_path=`$CYGPATH -u "$windows_path"`
9716    new_path="$unix_path"
9717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9719    new_path="$unix_path"
9720  fi
9721
9722
9723  # Now try to locate executable using which
9724  new_path=`$WHICH "$new_path" 2> /dev/null`
9725
9726  if test "x$new_path" = x; then
9727    # Oops. Which didn't find the executable.
9728    # The splitting of arguments from the executable at a space might have been incorrect,
9729    # since paths with space are more likely in Windows. Give it another try with the whole
9730    # argument.
9731    path="$complete"
9732    arguments="EOL"
9733    new_path="$path"
9734
9735  windows_path="$new_path"
9736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9737    unix_path=`$CYGPATH -u "$windows_path"`
9738    new_path="$unix_path"
9739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9741    new_path="$unix_path"
9742  fi
9743
9744
9745    new_path=`$WHICH "$new_path" 2> /dev/null`
9746
9747    if test "x$new_path" = x; then
9748      # It's still not found. Now this is an unrecoverable error.
9749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9751      has_space=`$ECHO "$complete" | $GREP " "`
9752      if test "x$has_space" != x; then
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9755      fi
9756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9757    fi
9758  fi
9759
9760  # Now new_path has a complete unix path to the binary
9761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9762    # Keep paths in /bin as-is, but remove trailing .exe if any
9763    new_path="${new_path/%.exe/}"
9764    # Do not save /bin paths to all_fixpath_prefixes!
9765  else
9766    # Not in mixed or Windows style, start by that.
9767    new_path=`cmd //c echo $new_path`
9768
9769  input_path="$new_path"
9770  # Check if we need to convert this using DOS-style short mode. If the path
9771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9772  # take no chances and rewrite it.
9773  # Note: m4 eats our [], so we need to use [ and ] instead.
9774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9775  if test "x$has_forbidden_chars" != x; then
9776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9778  fi
9779
9780    # Output is in $new_path
9781
9782  windows_path="$new_path"
9783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9784    unix_path=`$CYGPATH -u "$windows_path"`
9785    new_path="$unix_path"
9786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9788    new_path="$unix_path"
9789  fi
9790
9791    # remove trailing .exe if any
9792    new_path="${new_path/%.exe/}"
9793
9794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9796  fi
9797
9798  else
9799    # We're on a posix platform. Hooray! :)
9800    # First separate the path from the arguments. This will split at the first
9801    # space.
9802    complete="$FOUND_MAKE"
9803    path="${complete%% *}"
9804    tmp="$complete EOL"
9805    arguments="${tmp#* }"
9806
9807    # Cannot rely on the command "which" here since it doesn't always work.
9808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9809    if test -z "$is_absolute_path"; then
9810      # Path to executable is not absolute. Find it.
9811      IFS_save="$IFS"
9812      IFS=:
9813      for p in $PATH; do
9814        if test -f "$p/$path" && test -x "$p/$path"; then
9815          new_path="$p/$path"
9816          break
9817        fi
9818      done
9819      IFS="$IFS_save"
9820    else
9821      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9822$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9823      new_path="$path"
9824    fi
9825
9826    if test "x$new_path" = x; then
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9829        has_space=`$ECHO "$complete" | $GREP " "`
9830        if test "x$has_space" != x; then
9831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9833        fi
9834        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9835      fi
9836  fi
9837
9838      # Now join together the path and the arguments once again
9839      if test "x$arguments" != xEOL; then
9840        new_complete="$new_path ${arguments% *}"
9841      else
9842        new_complete="$new_path"
9843      fi
9844
9845  if test "x$complete" != "x$new_complete"; then
9846      FOUND_MAKE="$new_complete"
9847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9848$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9849    fi
9850
9851        fi
9852      fi
9853    fi
9854  fi
9855
9856        fi
9857        PATH=$OLD_PATH
9858      fi
9859    fi
9860
9861    if test "x$FOUND_MAKE" = x; then
9862      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
9863    fi
9864  fi
9865
9866  MAKE=$FOUND_MAKE
9867
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9869$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9870
9871
9872
9873    # Test if find supports -delete
9874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9875$as_echo_n "checking if find supports -delete... " >&6; }
9876    FIND_DELETE="-delete"
9877
9878    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9879
9880    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9881
9882    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9883    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9884        # No, it does not.
9885        rm $DELETEDIR/TestIfFindSupportsDelete
9886        FIND_DELETE="-exec rm \{\} \+"
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889    else
9890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9891$as_echo "yes" >&6; }
9892    fi
9893    rmdir $DELETEDIR
9894
9895
9896
9897# These tools might not be installed by default,
9898# need hint on how to install them.
9899
9900    for ac_prog in unzip
9901do
9902  # Extract the first word of "$ac_prog", so it can be a program name with args.
9903set dummy $ac_prog; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if test "${ac_cv_path_UNZIP+set}" = set; then :
9907  $as_echo_n "(cached) " >&6
9908else
9909  case $UNZIP in
9910  [\\/]* | ?:[\\/]*)
9911  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9912  ;;
9913  *)
9914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917  IFS=$as_save_IFS
9918  test -z "$as_dir" && as_dir=.
9919    for ac_exec_ext in '' $ac_executable_extensions; do
9920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9921    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923    break 2
9924  fi
9925done
9926  done
9927IFS=$as_save_IFS
9928
9929  ;;
9930esac
9931fi
9932UNZIP=$ac_cv_path_UNZIP
9933if test -n "$UNZIP"; then
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9935$as_echo "$UNZIP" >&6; }
9936else
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942  test -n "$UNZIP" && break
9943done
9944
9945
9946    if test "x$UNZIP" = x; then
9947        if test "xunzip" = x; then
9948          PROG_NAME=unzip
9949        else
9950          PROG_NAME=unzip
9951        fi
9952        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9953$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9954        as_fn_error $? "Cannot continue" "$LINENO" 5
9955    fi
9956
9957
9958
9959    for ac_prog in zip
9960do
9961  # Extract the first word of "$ac_prog", so it can be a program name with args.
9962set dummy $ac_prog; ac_word=$2
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9964$as_echo_n "checking for $ac_word... " >&6; }
9965if test "${ac_cv_path_ZIP+set}" = set; then :
9966  $as_echo_n "(cached) " >&6
9967else
9968  case $ZIP in
9969  [\\/]* | ?:[\\/]*)
9970  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9971  ;;
9972  *)
9973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9974for as_dir in $PATH
9975do
9976  IFS=$as_save_IFS
9977  test -z "$as_dir" && as_dir=.
9978    for ac_exec_ext in '' $ac_executable_extensions; do
9979  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9980    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9982    break 2
9983  fi
9984done
9985  done
9986IFS=$as_save_IFS
9987
9988  ;;
9989esac
9990fi
9991ZIP=$ac_cv_path_ZIP
9992if test -n "$ZIP"; then
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9994$as_echo "$ZIP" >&6; }
9995else
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
9998fi
9999
10000
10001  test -n "$ZIP" && break
10002done
10003
10004
10005    if test "x$ZIP" = x; then
10006        if test "xzip" = x; then
10007          PROG_NAME=zip
10008        else
10009          PROG_NAME=zip
10010        fi
10011        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10012$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10013        as_fn_error $? "Cannot continue" "$LINENO" 5
10014    fi
10015
10016
10017
10018# Non-required basic tools
10019
10020# Extract the first word of "ldd", so it can be a program name with args.
10021set dummy ldd; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if test "${ac_cv_path_LDD+set}" = set; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $LDD in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10030  ;;
10031  *)
10032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035  IFS=$as_save_IFS
10036  test -z "$as_dir" && as_dir=.
10037    for ac_exec_ext in '' $ac_executable_extensions; do
10038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10039    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041    break 2
10042  fi
10043done
10044  done
10045IFS=$as_save_IFS
10046
10047  ;;
10048esac
10049fi
10050LDD=$ac_cv_path_LDD
10051if test -n "$LDD"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10053$as_echo "$LDD" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060if test "x$LDD" = "x"; then
10061    # List shared lib dependencies is used for
10062    # debug output and checking for forbidden dependencies.
10063    # We can build without it.
10064    LDD="true"
10065fi
10066# Extract the first word of "otool", so it can be a program name with args.
10067set dummy otool; ac_word=$2
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10069$as_echo_n "checking for $ac_word... " >&6; }
10070if test "${ac_cv_path_OTOOL+set}" = set; then :
10071  $as_echo_n "(cached) " >&6
10072else
10073  case $OTOOL in
10074  [\\/]* | ?:[\\/]*)
10075  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10076  ;;
10077  *)
10078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10079for as_dir in $PATH
10080do
10081  IFS=$as_save_IFS
10082  test -z "$as_dir" && as_dir=.
10083    for ac_exec_ext in '' $ac_executable_extensions; do
10084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10085    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10087    break 2
10088  fi
10089done
10090  done
10091IFS=$as_save_IFS
10092
10093  ;;
10094esac
10095fi
10096OTOOL=$ac_cv_path_OTOOL
10097if test -n "$OTOOL"; then
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10099$as_echo "$OTOOL" >&6; }
10100else
10101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
10103fi
10104
10105
10106if test "x$OTOOL" = "x"; then
10107   OTOOL="true"
10108fi
10109for ac_prog in readelf greadelf
10110do
10111  # Extract the first word of "$ac_prog", so it can be a program name with args.
10112set dummy $ac_prog; ac_word=$2
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114$as_echo_n "checking for $ac_word... " >&6; }
10115if test "${ac_cv_path_READELF+set}" = set; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  case $READELF in
10119  [\\/]* | ?:[\\/]*)
10120  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10121  ;;
10122  *)
10123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124for as_dir in $PATH
10125do
10126  IFS=$as_save_IFS
10127  test -z "$as_dir" && as_dir=.
10128    for ac_exec_ext in '' $ac_executable_extensions; do
10129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10130    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132    break 2
10133  fi
10134done
10135  done
10136IFS=$as_save_IFS
10137
10138  ;;
10139esac
10140fi
10141READELF=$ac_cv_path_READELF
10142if test -n "$READELF"; then
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10144$as_echo "$READELF" >&6; }
10145else
10146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147$as_echo "no" >&6; }
10148fi
10149
10150
10151  test -n "$READELF" && break
10152done
10153
10154# Extract the first word of "hg", so it can be a program name with args.
10155set dummy hg; ac_word=$2
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10157$as_echo_n "checking for $ac_word... " >&6; }
10158if test "${ac_cv_path_HG+set}" = set; then :
10159  $as_echo_n "(cached) " >&6
10160else
10161  case $HG in
10162  [\\/]* | ?:[\\/]*)
10163  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10164  ;;
10165  *)
10166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10167for as_dir in $PATH
10168do
10169  IFS=$as_save_IFS
10170  test -z "$as_dir" && as_dir=.
10171    for ac_exec_ext in '' $ac_executable_extensions; do
10172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10173    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10175    break 2
10176  fi
10177done
10178  done
10179IFS=$as_save_IFS
10180
10181  ;;
10182esac
10183fi
10184HG=$ac_cv_path_HG
10185if test -n "$HG"; then
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10187$as_echo "$HG" >&6; }
10188else
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
10191fi
10192
10193
10194# Extract the first word of "stat", so it can be a program name with args.
10195set dummy stat; ac_word=$2
10196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197$as_echo_n "checking for $ac_word... " >&6; }
10198if test "${ac_cv_path_STAT+set}" = set; then :
10199  $as_echo_n "(cached) " >&6
10200else
10201  case $STAT in
10202  [\\/]* | ?:[\\/]*)
10203  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10204  ;;
10205  *)
10206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207for as_dir in $PATH
10208do
10209  IFS=$as_save_IFS
10210  test -z "$as_dir" && as_dir=.
10211    for ac_exec_ext in '' $ac_executable_extensions; do
10212  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10213    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215    break 2
10216  fi
10217done
10218  done
10219IFS=$as_save_IFS
10220
10221  ;;
10222esac
10223fi
10224STAT=$ac_cv_path_STAT
10225if test -n "$STAT"; then
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10227$as_echo "$STAT" >&6; }
10228else
10229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230$as_echo "no" >&6; }
10231fi
10232
10233
10234# Extract the first word of "time", so it can be a program name with args.
10235set dummy time; ac_word=$2
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237$as_echo_n "checking for $ac_word... " >&6; }
10238if test "${ac_cv_path_TIME+set}" = set; then :
10239  $as_echo_n "(cached) " >&6
10240else
10241  case $TIME in
10242  [\\/]* | ?:[\\/]*)
10243  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10244  ;;
10245  *)
10246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247for as_dir in $PATH
10248do
10249  IFS=$as_save_IFS
10250  test -z "$as_dir" && as_dir=.
10251    for ac_exec_ext in '' $ac_executable_extensions; do
10252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10253    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255    break 2
10256  fi
10257done
10258  done
10259IFS=$as_save_IFS
10260
10261  ;;
10262esac
10263fi
10264TIME=$ac_cv_path_TIME
10265if test -n "$TIME"; then
10266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10267$as_echo "$TIME" >&6; }
10268else
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
10271fi
10272
10273
10274
10275if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10276
10277    for ac_prog in comm
10278do
10279  # Extract the first word of "$ac_prog", so it can be a program name with args.
10280set dummy $ac_prog; ac_word=$2
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282$as_echo_n "checking for $ac_word... " >&6; }
10283if test "${ac_cv_path_COMM+set}" = set; then :
10284  $as_echo_n "(cached) " >&6
10285else
10286  case $COMM in
10287  [\\/]* | ?:[\\/]*)
10288  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10289  ;;
10290  *)
10291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292for as_dir in $PATH
10293do
10294  IFS=$as_save_IFS
10295  test -z "$as_dir" && as_dir=.
10296    for ac_exec_ext in '' $ac_executable_extensions; do
10297  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10298    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300    break 2
10301  fi
10302done
10303  done
10304IFS=$as_save_IFS
10305
10306  ;;
10307esac
10308fi
10309COMM=$ac_cv_path_COMM
10310if test -n "$COMM"; then
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10312$as_echo "$COMM" >&6; }
10313else
10314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
10316fi
10317
10318
10319  test -n "$COMM" && break
10320done
10321
10322
10323    if test "x$COMM" = x; then
10324        if test "xcomm" = x; then
10325          PROG_NAME=comm
10326        else
10327          PROG_NAME=comm
10328        fi
10329        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10330$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10331        as_fn_error $? "Cannot continue" "$LINENO" 5
10332    fi
10333
10334
10335fi
10336
10337if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10338
10339    for ac_prog in xattr
10340do
10341  # Extract the first word of "$ac_prog", so it can be a program name with args.
10342set dummy $ac_prog; ac_word=$2
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344$as_echo_n "checking for $ac_word... " >&6; }
10345if test "${ac_cv_path_XATTR+set}" = set; then :
10346  $as_echo_n "(cached) " >&6
10347else
10348  case $XATTR in
10349  [\\/]* | ?:[\\/]*)
10350  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10351  ;;
10352  *)
10353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10360    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368  ;;
10369esac
10370fi
10371XATTR=$ac_cv_path_XATTR
10372if test -n "$XATTR"; then
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10374$as_echo "$XATTR" >&6; }
10375else
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378fi
10379
10380
10381  test -n "$XATTR" && break
10382done
10383
10384
10385    if test "x$XATTR" = x; then
10386        if test "xxattr" = x; then
10387          PROG_NAME=xattr
10388        else
10389          PROG_NAME=xattr
10390        fi
10391        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10392$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10393        as_fn_error $? "Cannot continue" "$LINENO" 5
10394    fi
10395
10396
10397  # Extract the first word of "codesign", so it can be a program name with args.
10398set dummy codesign; ac_word=$2
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10400$as_echo_n "checking for $ac_word... " >&6; }
10401if test "${ac_cv_path_CODESIGN+set}" = set; then :
10402  $as_echo_n "(cached) " >&6
10403else
10404  case $CODESIGN in
10405  [\\/]* | ?:[\\/]*)
10406  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10407  ;;
10408  *)
10409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10410for as_dir in $PATH
10411do
10412  IFS=$as_save_IFS
10413  test -z "$as_dir" && as_dir=.
10414    for ac_exec_ext in '' $ac_executable_extensions; do
10415  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10416    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10418    break 2
10419  fi
10420done
10421  done
10422IFS=$as_save_IFS
10423
10424  ;;
10425esac
10426fi
10427CODESIGN=$ac_cv_path_CODESIGN
10428if test -n "$CODESIGN"; then
10429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10430$as_echo "$CODESIGN" >&6; }
10431else
10432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10433$as_echo "no" >&6; }
10434fi
10435
10436
10437  if test "x$CODESIGN" != "x"; then
10438    # Verify that the openjdk_codesign certificate is present
10439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10440$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10441    rm -f codesign-testfile
10442    touch codesign-testfile
10443    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10444    rm -f codesign-testfile
10445    if test "x$CODESIGN" = x; then
10446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448    else
10449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10450$as_echo "yes" >&6; }
10451    fi
10452  fi
10453fi
10454
10455
10456# Check if pkg-config is available.
10457
10458
10459if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10460	if test -n "$ac_tool_prefix"; then
10461  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10462set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10464$as_echo_n "checking for $ac_word... " >&6; }
10465if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10466  $as_echo_n "(cached) " >&6
10467else
10468  case $PKG_CONFIG in
10469  [\\/]* | ?:[\\/]*)
10470  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10471  ;;
10472  *)
10473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10474for as_dir in $PATH
10475do
10476  IFS=$as_save_IFS
10477  test -z "$as_dir" && as_dir=.
10478    for ac_exec_ext in '' $ac_executable_extensions; do
10479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10480    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10482    break 2
10483  fi
10484done
10485  done
10486IFS=$as_save_IFS
10487
10488  ;;
10489esac
10490fi
10491PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10492if test -n "$PKG_CONFIG"; then
10493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10494$as_echo "$PKG_CONFIG" >&6; }
10495else
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
10498fi
10499
10500
10501fi
10502if test -z "$ac_cv_path_PKG_CONFIG"; then
10503  ac_pt_PKG_CONFIG=$PKG_CONFIG
10504  # Extract the first word of "pkg-config", so it can be a program name with args.
10505set dummy pkg-config; ac_word=$2
10506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10507$as_echo_n "checking for $ac_word... " >&6; }
10508if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10509  $as_echo_n "(cached) " >&6
10510else
10511  case $ac_pt_PKG_CONFIG in
10512  [\\/]* | ?:[\\/]*)
10513  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10514  ;;
10515  *)
10516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10517for as_dir in $PATH
10518do
10519  IFS=$as_save_IFS
10520  test -z "$as_dir" && as_dir=.
10521    for ac_exec_ext in '' $ac_executable_extensions; do
10522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10523    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10525    break 2
10526  fi
10527done
10528  done
10529IFS=$as_save_IFS
10530
10531  ;;
10532esac
10533fi
10534ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10535if test -n "$ac_pt_PKG_CONFIG"; then
10536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10537$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10538else
10539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
10541fi
10542
10543  if test "x$ac_pt_PKG_CONFIG" = x; then
10544    PKG_CONFIG=""
10545  else
10546    case $cross_compiling:$ac_tool_warned in
10547yes:)
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10550ac_tool_warned=yes ;;
10551esac
10552    PKG_CONFIG=$ac_pt_PKG_CONFIG
10553  fi
10554else
10555  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10556fi
10557
10558fi
10559if test -n "$PKG_CONFIG"; then
10560	_pkg_min_version=0.9.0
10561	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10562$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10563	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10564		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10565$as_echo "yes" >&6; }
10566	else
10567		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
10569		PKG_CONFIG=""
10570	fi
10571
10572fi
10573
10574# After basic tools have been setup, we can check build os specific details.
10575
10576###############################################################################
10577
10578# Note that this is the build platform OS version!
10579
10580OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10581OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10582OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10583OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10584
10585
10586
10587
10588
10589# Setup builddeps, for automatic downloading of tools we need.
10590# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10591# boot-jdk setup, but we need to have basic tools setup first.
10592
10593
10594# Check whether --with-builddeps-conf was given.
10595if test "${with_builddeps_conf+set}" = set; then :
10596  withval=$with_builddeps_conf;
10597fi
10598
10599
10600
10601# Check whether --with-builddeps-server was given.
10602if test "${with_builddeps_server+set}" = set; then :
10603  withval=$with_builddeps_server;
10604fi
10605
10606
10607
10608# Check whether --with-builddeps-dir was given.
10609if test "${with_builddeps_dir+set}" = set; then :
10610  withval=$with_builddeps_dir;
10611else
10612  with_builddeps_dir=/localhome/builddeps
10613fi
10614
10615
10616
10617# Check whether --with-builddeps-group was given.
10618if test "${with_builddeps_group+set}" = set; then :
10619  withval=$with_builddeps_group;
10620fi
10621
10622
10623
10624
10625    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10626        if test "x$with_builddeps_conf" != x; then
10627            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10628$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10629            builddepsfile=$with_builddeps_conf
10630            if test -s $builddepsfile; then
10631                . $builddepsfile
10632                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10633$as_echo "loaded!" >&6; }
10634            else
10635               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10636           fi
10637        else
10638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10639$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10640            builddepsfile=`mktemp`
10641            touch $builddepsfile
10642            # Put all found confs into a single file.
10643            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10644            # Source the file to acquire the variables
10645            if test -s $builddepsfile; then
10646                . $builddepsfile
10647                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10648$as_echo "found at least one!" >&6; }
10649            else
10650               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10651           fi
10652        fi
10653        # Create build and target names that use _ instead of "-" and ".".
10654        # This is necessary to use them in variable names.
10655        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10656        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10657        # Extract rewrite information for build and target
10658        eval rewritten_build=\${REWRITE_${build_var}}
10659        if test "x$rewritten_build" = x; then
10660            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10661            echo Build stays the same $rewritten_build
10662        else
10663            echo Rewriting build for builddeps into $rewritten_build
10664        fi
10665        eval rewritten_target=\${REWRITE_${target_var}}
10666        if test "x$rewritten_target" = x; then
10667            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10668            echo Target stays the same $rewritten_target
10669        else
10670            echo Rewriting target for builddeps into $rewritten_target
10671        fi
10672        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10673        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10674    fi
10675    for ac_prog in 7z unzip
10676do
10677  # Extract the first word of "$ac_prog", so it can be a program name with args.
10678set dummy $ac_prog; ac_word=$2
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10680$as_echo_n "checking for $ac_word... " >&6; }
10681if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10682  $as_echo_n "(cached) " >&6
10683else
10684  if test -n "$BDEPS_UNZIP"; then
10685  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10686else
10687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10688for as_dir in $PATH
10689do
10690  IFS=$as_save_IFS
10691  test -z "$as_dir" && as_dir=.
10692    for ac_exec_ext in '' $ac_executable_extensions; do
10693  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10694    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10696    break 2
10697  fi
10698done
10699  done
10700IFS=$as_save_IFS
10701
10702fi
10703fi
10704BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10705if test -n "$BDEPS_UNZIP"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10707$as_echo "$BDEPS_UNZIP" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714  test -n "$BDEPS_UNZIP" && break
10715done
10716
10717    if test "x$BDEPS_UNZIP" = x7z; then
10718        BDEPS_UNZIP="7z x"
10719    fi
10720
10721    for ac_prog in wget lftp ftp
10722do
10723  # Extract the first word of "$ac_prog", so it can be a program name with args.
10724set dummy $ac_prog; ac_word=$2
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10726$as_echo_n "checking for $ac_word... " >&6; }
10727if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10728  $as_echo_n "(cached) " >&6
10729else
10730  if test -n "$BDEPS_FTP"; then
10731  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10732else
10733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734for as_dir in $PATH
10735do
10736  IFS=$as_save_IFS
10737  test -z "$as_dir" && as_dir=.
10738    for ac_exec_ext in '' $ac_executable_extensions; do
10739  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10740    ac_cv_prog_BDEPS_FTP="$ac_prog"
10741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742    break 2
10743  fi
10744done
10745  done
10746IFS=$as_save_IFS
10747
10748fi
10749fi
10750BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10751if test -n "$BDEPS_FTP"; then
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10753$as_echo "$BDEPS_FTP" >&6; }
10754else
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757fi
10758
10759
10760  test -n "$BDEPS_FTP" && break
10761done
10762
10763
10764
10765###############################################################################
10766#
10767# Determine OpenJDK variants, options and version numbers.
10768#
10769###############################################################################
10770
10771# We need build & target for this.
10772
10773
10774###############################################################################
10775#
10776# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10777# We always build headless support.
10778#
10779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10780$as_echo_n "checking headful support... " >&6; }
10781# Check whether --enable-headful was given.
10782if test "${enable_headful+set}" = set; then :
10783  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10784else
10785  SUPPORT_HEADFUL=yes
10786fi
10787
10788
10789SUPPORT_HEADLESS=yes
10790BUILD_HEADLESS="BUILD_HEADLESS:=true"
10791
10792if test "x$SUPPORT_HEADFUL" = xyes; then
10793    # We are building both headful and headless.
10794    headful_msg="inlude support for both headful and headless"
10795fi
10796
10797if test "x$SUPPORT_HEADFUL" = xno; then
10798    # Thus we are building headless only.
10799    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10800    headful_msg="headless only"
10801fi
10802
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10804$as_echo "$headful_msg" >&6; }
10805
10806
10807
10808
10809
10810# Control wether Hotspot runs Queens test after build.
10811# Check whether --enable-hotspot-test-in-build was given.
10812if test "${enable_hotspot_test_in_build+set}" = set; then :
10813  enableval=$enable_hotspot_test_in_build;
10814else
10815  enable_hotspot_test_in_build=no
10816fi
10817
10818if test "x$enable_hotspot_test_in_build" = "xyes"; then
10819    TEST_IN_BUILD=true
10820else
10821    TEST_IN_BUILD=false
10822fi
10823
10824
10825###############################################################################
10826#
10827# Choose cacerts source file
10828#
10829
10830# Check whether --with-cacerts-file was given.
10831if test "${with_cacerts_file+set}" = set; then :
10832  withval=$with_cacerts_file;
10833fi
10834
10835if test "x$with_cacerts_file" != x; then
10836    CACERTS_FILE=$with_cacerts_file
10837else
10838    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10839fi
10840
10841
10842###############################################################################
10843#
10844# Enable or disable unlimited crypto
10845#
10846# Check whether --enable-unlimited-crypto was given.
10847if test "${enable_unlimited_crypto+set}" = set; then :
10848  enableval=$enable_unlimited_crypto;
10849else
10850  enable_unlimited_crypto=no
10851fi
10852
10853if test "x$enable_unlimited_crypto" = "xyes"; then
10854    UNLIMITED_CRYPTO=true
10855else
10856    UNLIMITED_CRYPTO=false
10857fi
10858
10859
10860###############################################################################
10861#
10862# Enable or disable the elliptic curve crypto implementation
10863#
10864
10865
10866###############################################################################
10867#
10868# Compress jars
10869#
10870COMPRESS_JARS=false
10871
10872
10873
10874
10875# Source the version numbers
10876. $AUTOCONF_DIR/version-numbers
10877
10878# Get the settings from parameters
10879
10880# Check whether --with-milestone was given.
10881if test "${with_milestone+set}" = set; then :
10882  withval=$with_milestone;
10883fi
10884
10885if test "x$with_milestone" = xyes; then
10886  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10887elif test "x$with_milestone" != x; then
10888    MILESTONE="$with_milestone"
10889fi
10890if test "x$MILESTONE" = x; then
10891  MILESTONE=internal
10892fi
10893
10894
10895# Check whether --with-update-version was given.
10896if test "${with_update_version+set}" = set; then :
10897  withval=$with_update_version;
10898fi
10899
10900if test "x$with_update_version" = xyes; then
10901  as_fn_error $? "Update version must have a value" "$LINENO" 5
10902elif test "x$with_update_version" != x; then
10903  JDK_UPDATE_VERSION="$with_update_version"
10904fi
10905
10906
10907# Check whether --with-build-number was given.
10908if test "${with_build_number+set}" = set; then :
10909  withval=$with_build_number;
10910fi
10911
10912if test "x$with_build_number" = xyes; then
10913  as_fn_error $? "Build number must have a value" "$LINENO" 5
10914elif test "x$with_build_number" != x; then
10915  JDK_BUILD_NUMBER="$with_build_number"
10916fi
10917if test "x$JDK_BUILD_NUMBER" = x; then
10918  JDK_BUILD_NUMBER=b00
10919fi
10920
10921
10922# Check whether --with-user-release-suffix was given.
10923if test "${with_user_release_suffix+set}" = set; then :
10924  withval=$with_user_release_suffix;
10925fi
10926
10927if test "x$with_user_release_suffix" = xyes; then
10928  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10929elif test "x$with_user_release_suffix" != x; then
10930  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10931else
10932  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10933  # Avoid [:alnum:] since it depends on the locale.
10934  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10935  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10936fi
10937
10938
10939# Now set the JDK version, milestone, build number etc.
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954COPYRIGHT_YEAR=`date +'%Y'`
10955
10956
10957if test "x$JDK_UPDATE_VERSION" != x; then
10958  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10959else
10960  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10961fi
10962
10963
10964COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10965
10966
10967
10968###############################################################################
10969#
10970# Setup BootJDK, used to bootstrap the build.
10971#
10972###############################################################################
10973
10974
10975BOOT_JDK_FOUND=no
10976
10977# Check whether --with-boot-jdk was given.
10978if test "${with_boot_jdk+set}" = set; then :
10979  withval=$with_boot_jdk;
10980fi
10981
10982
10983# We look for the Boot JDK through various means, going from more certain to
10984# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10985# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10986# must check if this is indeed valid; otherwise we'll continue looking.
10987
10988# Test: Is bootjdk explicitely set by command line arguments?
10989
10990  if test "x$BOOT_JDK_FOUND" = xno; then
10991    # Now execute the test
10992
10993if test "x$with_boot_jdk" != x; then
10994    BOOT_JDK=$with_boot_jdk
10995    BOOT_JDK_FOUND=maybe
10996    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10997$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10998fi
10999
11000
11001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11003      # Do we have a bin/java?
11004      if test ! -x "$BOOT_JDK/bin/java"; then
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11007        BOOT_JDK_FOUND=no
11008      else
11009        # Do we have a bin/javac?
11010        if test ! -x "$BOOT_JDK/bin/javac"; then
11011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11015          BOOT_JDK_FOUND=no
11016        else
11017          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11018          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11021            BOOT_JDK_FOUND=no
11022          else
11023            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11025
11026            # Extra M4 quote needed to protect [] in grep expression.
11027            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11028            if test "x$FOUND_VERSION_78" = x; then
11029              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11031              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11032$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11033              BOOT_JDK_FOUND=no
11034            else
11035              # We're done! :-)
11036              BOOT_JDK_FOUND=yes
11037
11038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11039
11040  # Input might be given as Windows format, start by converting to
11041  # unix format.
11042  path="$BOOT_JDK"
11043  new_path=`$CYGPATH -u "$path"`
11044
11045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11048  # "foo.exe" is OK but "foo" is an error.
11049  #
11050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11051  # It is also a way to make sure we got the proper file name for the real test later on.
11052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11053  if test "x$test_shortpath" = x; then
11054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11055$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11056    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11057  fi
11058
11059  # Call helper function which possibly converts this using DOS-style short mode.
11060  # If so, the updated path is stored in $new_path.
11061
11062  input_path="$new_path"
11063  # Check if we need to convert this using DOS-style short mode. If the path
11064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11065  # take no chances and rewrite it.
11066  # Note: m4 eats our [], so we need to use [ and ] instead.
11067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11068  if test "x$has_forbidden_chars" != x; then
11069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11073      # Going to short mode and back again did indeed matter. Since short mode is
11074      # case insensitive, let's make it lowercase to improve readability.
11075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11076      # Now convert it back to Unix-stile (cygpath)
11077      input_path=`$CYGPATH -u "$shortmode_path"`
11078      new_path="$input_path"
11079    fi
11080  fi
11081
11082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11083  if test "x$test_cygdrive_prefix" = x; then
11084    # As a simple fix, exclude /usr/bin since it's not a real path.
11085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11087      # a path prefixed by /cygdrive for fixpath to work.
11088      new_path="$CYGWIN_ROOT_PATH$input_path"
11089    fi
11090  fi
11091
11092
11093  if test "x$path" != "x$new_path"; then
11094    BOOT_JDK="$new_path"
11095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11097  fi
11098
11099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11100
11101  path="$BOOT_JDK"
11102  has_colon=`$ECHO $path | $GREP ^.:`
11103  new_path="$path"
11104  if test "x$has_colon" = x; then
11105    # Not in mixed or Windows style, start by that.
11106    new_path=`cmd //c echo $path`
11107  fi
11108
11109
11110  input_path="$new_path"
11111  # Check if we need to convert this using DOS-style short mode. If the path
11112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11113  # take no chances and rewrite it.
11114  # Note: m4 eats our [], so we need to use [ and ] instead.
11115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11116  if test "x$has_forbidden_chars" != x; then
11117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11119  fi
11120
11121
11122  windows_path="$new_path"
11123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11124    unix_path=`$CYGPATH -u "$windows_path"`
11125    new_path="$unix_path"
11126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11128    new_path="$unix_path"
11129  fi
11130
11131  if test "x$path" != "x$new_path"; then
11132    BOOT_JDK="$new_path"
11133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11135  fi
11136
11137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11139
11140  else
11141    # We're on a posix platform. Hooray! :)
11142    path="$BOOT_JDK"
11143    has_space=`$ECHO "$path" | $GREP " "`
11144    if test "x$has_space" != x; then
11145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11146$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11147      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11148    fi
11149
11150    # Use eval to expand a potential ~
11151    eval path="$path"
11152    if test ! -f "$path" && test ! -d "$path"; then
11153      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11154    fi
11155
11156    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11157  fi
11158
11159              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11160$as_echo_n "checking for Boot JDK... " >&6; }
11161              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11162$as_echo "$BOOT_JDK" >&6; }
11163              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11164$as_echo_n "checking Boot JDK version... " >&6; }
11165              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11167$as_echo "$BOOT_JDK_VERSION" >&6; }
11168            fi # end check jdk version
11169          fi # end check rt.jar
11170        fi # end check javac
11171      fi # end check java
11172    fi # end check boot jdk found
11173  fi
11174
11175if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11176  # Having specified an argument which is incorrect will produce an instant failure;
11177  # we should not go on looking
11178  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11179fi
11180
11181# Test: Is bootjdk available from builddeps?
11182
11183  if test "x$BOOT_JDK_FOUND" = xno; then
11184    # Now execute the test
11185
11186
11187
11188    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11189        # Source the builddeps file again, to make sure it uses the latest variables!
11190        . $builddepsfile
11191        # Look for a target and build machine specific resource!
11192        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11193        if test "x$resource" = x; then
11194            # Ok, lets instead look for a target specific resource
11195            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11196        fi
11197        if test "x$resource" = x; then
11198            # Ok, lets instead look for a build specific resource
11199            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11200        fi
11201        if test "x$resource" = x; then
11202            # Ok, lets instead look for a generic resource
11203            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11204            resource=${builddep_bootjdk}
11205        fi
11206        if test "x$resource" != x; then
11207            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11208$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11209	    # If the resource in the builddeps.conf file is an existing directory,
11210	    # for example /java/linux/cups
11211	    if test -d ${resource}; then
11212	       depdir=${resource}
11213	    else
11214
11215# bootjdk is for example mymodule
11216# $resource is for example libs/general/libmymod_1_2_3.zip
11217# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11218# $with_builddeps_dir is for example /localhome/builddeps
11219# depdir is the name of the variable into which we store the depdir, eg MYMOD
11220# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11221# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11222    filename=`basename $resource`
11223    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11224    filebase=${filename%%.*}
11225    extension=${filename#*.}
11226    installdir=$with_builddeps_dir/$filebase
11227    if test ! -f $installdir/$filename.unpacked; then
11228        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11229$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11230        if test ! -d $installdir; then
11231            mkdir -p $installdir
11232        fi
11233        if test ! -d $installdir; then
11234            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11235        fi
11236        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11237        touch $tmpfile
11238        if test ! -f $tmpfile; then
11239            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11240        fi
11241
11242    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11243    # $tmpfile is the local file name for the downloaded file.
11244    VALID_TOOL=no
11245    if test "x$BDEPS_FTP" = xwget; then
11246       VALID_TOOL=yes
11247       wget -O $tmpfile $with_builddeps_server/$resource
11248    fi
11249    if test "x$BDEPS_FTP" = xlftp; then
11250       VALID_TOOL=yes
11251       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11252    fi
11253    if test "x$BDEPS_FTP" = xftp; then
11254        VALID_TOOL=yes
11255        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11256        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11257        FTPUSERPWD=${FTPSERVER%%@*}
11258        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11259            FTPUSER=${userpwd%%:*}
11260            FTPPWD=${userpwd#*@}
11261            FTPSERVER=${FTPSERVER#*@}
11262        else
11263            FTPUSER=ftp
11264            FTPPWD=ftp
11265        fi
11266        # the "pass" command does not work on some
11267        # ftp clients (read ftp.exe) but if it works,
11268        # passive mode is better!
11269        (\
11270            echo "user $FTPUSER $FTPPWD"        ;\
11271            echo "pass"                         ;\
11272            echo "bin"                          ;\
11273            echo "get $FTPPATH $tmpfile"              ;\
11274        ) | ftp -in $FTPSERVER
11275    fi
11276    if test "x$VALID_TOOL" != xyes; then
11277       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11278    fi
11279
11280        mv $tmpfile $installdir/$filename
11281        if test ! -s $installdir/$filename; then
11282            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11283        fi
11284        case "$extension" in
11285            zip)  echo "Unzipping $installdir/$filename..."
11286               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11287            ;;
11288            tar.gz) echo "Untaring $installdir/$filename..."
11289               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11290            ;;
11291            tgz) echo "Untaring $installdir/$filename..."
11292               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11293            ;;
11294            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11295            ;;
11296        esac
11297    fi
11298    if test -f $installdir/$filename.unpacked; then
11299        depdir=$installdir
11300    fi
11301
11302	    fi
11303            # Source the builddeps file again, because in the previous command, the depdir
11304            # was updated to point at the current build dependency install directory.
11305            . $builddepsfile
11306            # Now extract variables from the builddeps.conf files.
11307            theroot=${builddep_bootjdk_ROOT}
11308            thecflags=${builddep_bootjdk_CFLAGS}
11309            thelibs=${builddep_bootjdk_LIBS}
11310            if test "x$depdir" = x; then
11311                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11312            fi
11313            BOOT_JDK=$depdir
11314            if test "x$theroot" != x; then
11315               BOOT_JDK="$theroot"
11316            fi
11317            if test "x$thecflags" != x; then
11318               BOOT_JDK_CFLAGS="$thecflags"
11319            fi
11320            if test "x$thelibs" != x; then
11321               BOOT_JDK_LIBS="$thelibs"
11322            fi
11323            BOOT_JDK_FOUND=maybe
11324            else BOOT_JDK_FOUND=no
11325
11326        fi
11327        else BOOT_JDK_FOUND=no
11328
11329    fi
11330
11331
11332
11333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11335      # Do we have a bin/java?
11336      if test ! -x "$BOOT_JDK/bin/java"; then
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11339        BOOT_JDK_FOUND=no
11340      else
11341        # Do we have a bin/javac?
11342        if test ! -x "$BOOT_JDK/bin/javac"; then
11343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11347          BOOT_JDK_FOUND=no
11348        else
11349          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11350          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11353            BOOT_JDK_FOUND=no
11354          else
11355            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11357
11358            # Extra M4 quote needed to protect [] in grep expression.
11359            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11360            if test "x$FOUND_VERSION_78" = x; then
11361              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11363              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11364$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11365              BOOT_JDK_FOUND=no
11366            else
11367              # We're done! :-)
11368              BOOT_JDK_FOUND=yes
11369
11370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11371
11372  # Input might be given as Windows format, start by converting to
11373  # unix format.
11374  path="$BOOT_JDK"
11375  new_path=`$CYGPATH -u "$path"`
11376
11377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11380  # "foo.exe" is OK but "foo" is an error.
11381  #
11382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11383  # It is also a way to make sure we got the proper file name for the real test later on.
11384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11385  if test "x$test_shortpath" = x; then
11386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11389  fi
11390
11391  # Call helper function which possibly converts this using DOS-style short mode.
11392  # If so, the updated path is stored in $new_path.
11393
11394  input_path="$new_path"
11395  # Check if we need to convert this using DOS-style short mode. If the path
11396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11397  # take no chances and rewrite it.
11398  # Note: m4 eats our [], so we need to use [ and ] instead.
11399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11400  if test "x$has_forbidden_chars" != x; then
11401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11405      # Going to short mode and back again did indeed matter. Since short mode is
11406      # case insensitive, let's make it lowercase to improve readability.
11407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11408      # Now convert it back to Unix-stile (cygpath)
11409      input_path=`$CYGPATH -u "$shortmode_path"`
11410      new_path="$input_path"
11411    fi
11412  fi
11413
11414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11415  if test "x$test_cygdrive_prefix" = x; then
11416    # As a simple fix, exclude /usr/bin since it's not a real path.
11417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11419      # a path prefixed by /cygdrive for fixpath to work.
11420      new_path="$CYGWIN_ROOT_PATH$input_path"
11421    fi
11422  fi
11423
11424
11425  if test "x$path" != "x$new_path"; then
11426    BOOT_JDK="$new_path"
11427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11429  fi
11430
11431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11432
11433  path="$BOOT_JDK"
11434  has_colon=`$ECHO $path | $GREP ^.:`
11435  new_path="$path"
11436  if test "x$has_colon" = x; then
11437    # Not in mixed or Windows style, start by that.
11438    new_path=`cmd //c echo $path`
11439  fi
11440
11441
11442  input_path="$new_path"
11443  # Check if we need to convert this using DOS-style short mode. If the path
11444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11445  # take no chances and rewrite it.
11446  # Note: m4 eats our [], so we need to use [ and ] instead.
11447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11448  if test "x$has_forbidden_chars" != x; then
11449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11451  fi
11452
11453
11454  windows_path="$new_path"
11455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11456    unix_path=`$CYGPATH -u "$windows_path"`
11457    new_path="$unix_path"
11458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11460    new_path="$unix_path"
11461  fi
11462
11463  if test "x$path" != "x$new_path"; then
11464    BOOT_JDK="$new_path"
11465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11467  fi
11468
11469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11471
11472  else
11473    # We're on a posix platform. Hooray! :)
11474    path="$BOOT_JDK"
11475    has_space=`$ECHO "$path" | $GREP " "`
11476    if test "x$has_space" != x; then
11477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11480    fi
11481
11482    # Use eval to expand a potential ~
11483    eval path="$path"
11484    if test ! -f "$path" && test ! -d "$path"; then
11485      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11486    fi
11487
11488    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11489  fi
11490
11491              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11492$as_echo_n "checking for Boot JDK... " >&6; }
11493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11494$as_echo "$BOOT_JDK" >&6; }
11495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11496$as_echo_n "checking Boot JDK version... " >&6; }
11497              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11499$as_echo "$BOOT_JDK_VERSION" >&6; }
11500            fi # end check jdk version
11501          fi # end check rt.jar
11502        fi # end check javac
11503      fi # end check java
11504    fi # end check boot jdk found
11505  fi
11506
11507
11508# Test: Is $JAVA_HOME set?
11509
11510  if test "x$BOOT_JDK_FOUND" = xno; then
11511    # Now execute the test
11512
11513    if test "x$JAVA_HOME" != x; then
11514        JAVA_HOME_PROCESSED="$JAVA_HOME"
11515
11516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11517
11518  # Input might be given as Windows format, start by converting to
11519  # unix format.
11520  path="$JAVA_HOME_PROCESSED"
11521  new_path=`$CYGPATH -u "$path"`
11522
11523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11526  # "foo.exe" is OK but "foo" is an error.
11527  #
11528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11529  # It is also a way to make sure we got the proper file name for the real test later on.
11530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11531  if test "x$test_shortpath" = x; then
11532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11533$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11534    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11535  fi
11536
11537  # Call helper function which possibly converts this using DOS-style short mode.
11538  # If so, the updated path is stored in $new_path.
11539
11540  input_path="$new_path"
11541  # Check if we need to convert this using DOS-style short mode. If the path
11542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11543  # take no chances and rewrite it.
11544  # Note: m4 eats our [], so we need to use [ and ] instead.
11545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11546  if test "x$has_forbidden_chars" != x; then
11547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11551      # Going to short mode and back again did indeed matter. Since short mode is
11552      # case insensitive, let's make it lowercase to improve readability.
11553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11554      # Now convert it back to Unix-stile (cygpath)
11555      input_path=`$CYGPATH -u "$shortmode_path"`
11556      new_path="$input_path"
11557    fi
11558  fi
11559
11560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11561  if test "x$test_cygdrive_prefix" = x; then
11562    # As a simple fix, exclude /usr/bin since it's not a real path.
11563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11565      # a path prefixed by /cygdrive for fixpath to work.
11566      new_path="$CYGWIN_ROOT_PATH$input_path"
11567    fi
11568  fi
11569
11570
11571  if test "x$path" != "x$new_path"; then
11572    JAVA_HOME_PROCESSED="$new_path"
11573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11574$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11575  fi
11576
11577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11578
11579  path="$JAVA_HOME_PROCESSED"
11580  has_colon=`$ECHO $path | $GREP ^.:`
11581  new_path="$path"
11582  if test "x$has_colon" = x; then
11583    # Not in mixed or Windows style, start by that.
11584    new_path=`cmd //c echo $path`
11585  fi
11586
11587
11588  input_path="$new_path"
11589  # Check if we need to convert this using DOS-style short mode. If the path
11590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11591  # take no chances and rewrite it.
11592  # Note: m4 eats our [], so we need to use [ and ] instead.
11593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11594  if test "x$has_forbidden_chars" != x; then
11595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11597  fi
11598
11599
11600  windows_path="$new_path"
11601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11602    unix_path=`$CYGPATH -u "$windows_path"`
11603    new_path="$unix_path"
11604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11606    new_path="$unix_path"
11607  fi
11608
11609  if test "x$path" != "x$new_path"; then
11610    JAVA_HOME_PROCESSED="$new_path"
11611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11612$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11613  fi
11614
11615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11617
11618  else
11619    # We're on a posix platform. Hooray! :)
11620    path="$JAVA_HOME_PROCESSED"
11621    has_space=`$ECHO "$path" | $GREP " "`
11622    if test "x$has_space" != x; then
11623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11624$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11626    fi
11627
11628    # Use eval to expand a potential ~
11629    eval path="$path"
11630    if test ! -f "$path" && test ! -d "$path"; then
11631      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11632    fi
11633
11634    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11635  fi
11636
11637        if test ! -d "$JAVA_HOME_PROCESSED"; then
11638            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11639$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11640        else
11641          # Aha, the user has set a JAVA_HOME
11642          # let us use that as the Boot JDK.
11643          BOOT_JDK="$JAVA_HOME_PROCESSED"
11644          BOOT_JDK_FOUND=maybe
11645          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11646$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11647        fi
11648    fi
11649
11650
11651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11653      # Do we have a bin/java?
11654      if test ! -x "$BOOT_JDK/bin/java"; then
11655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11657        BOOT_JDK_FOUND=no
11658      else
11659        # Do we have a bin/javac?
11660        if test ! -x "$BOOT_JDK/bin/javac"; then
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11665          BOOT_JDK_FOUND=no
11666        else
11667          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11668          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11671            BOOT_JDK_FOUND=no
11672          else
11673            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11675
11676            # Extra M4 quote needed to protect [] in grep expression.
11677            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11678            if test "x$FOUND_VERSION_78" = x; then
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11681              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11682$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11683              BOOT_JDK_FOUND=no
11684            else
11685              # We're done! :-)
11686              BOOT_JDK_FOUND=yes
11687
11688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11689
11690  # Input might be given as Windows format, start by converting to
11691  # unix format.
11692  path="$BOOT_JDK"
11693  new_path=`$CYGPATH -u "$path"`
11694
11695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11698  # "foo.exe" is OK but "foo" is an error.
11699  #
11700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11701  # It is also a way to make sure we got the proper file name for the real test later on.
11702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11703  if test "x$test_shortpath" = x; then
11704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11707  fi
11708
11709  # Call helper function which possibly converts this using DOS-style short mode.
11710  # If so, the updated path is stored in $new_path.
11711
11712  input_path="$new_path"
11713  # Check if we need to convert this using DOS-style short mode. If the path
11714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11715  # take no chances and rewrite it.
11716  # Note: m4 eats our [], so we need to use [ and ] instead.
11717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11718  if test "x$has_forbidden_chars" != x; then
11719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11723      # Going to short mode and back again did indeed matter. Since short mode is
11724      # case insensitive, let's make it lowercase to improve readability.
11725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11726      # Now convert it back to Unix-stile (cygpath)
11727      input_path=`$CYGPATH -u "$shortmode_path"`
11728      new_path="$input_path"
11729    fi
11730  fi
11731
11732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11733  if test "x$test_cygdrive_prefix" = x; then
11734    # As a simple fix, exclude /usr/bin since it's not a real path.
11735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11737      # a path prefixed by /cygdrive for fixpath to work.
11738      new_path="$CYGWIN_ROOT_PATH$input_path"
11739    fi
11740  fi
11741
11742
11743  if test "x$path" != "x$new_path"; then
11744    BOOT_JDK="$new_path"
11745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11747  fi
11748
11749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11750
11751  path="$BOOT_JDK"
11752  has_colon=`$ECHO $path | $GREP ^.:`
11753  new_path="$path"
11754  if test "x$has_colon" = x; then
11755    # Not in mixed or Windows style, start by that.
11756    new_path=`cmd //c echo $path`
11757  fi
11758
11759
11760  input_path="$new_path"
11761  # Check if we need to convert this using DOS-style short mode. If the path
11762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11763  # take no chances and rewrite it.
11764  # Note: m4 eats our [], so we need to use [ and ] instead.
11765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11766  if test "x$has_forbidden_chars" != x; then
11767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11769  fi
11770
11771
11772  windows_path="$new_path"
11773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11774    unix_path=`$CYGPATH -u "$windows_path"`
11775    new_path="$unix_path"
11776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11778    new_path="$unix_path"
11779  fi
11780
11781  if test "x$path" != "x$new_path"; then
11782    BOOT_JDK="$new_path"
11783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11785  fi
11786
11787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11789
11790  else
11791    # We're on a posix platform. Hooray! :)
11792    path="$BOOT_JDK"
11793    has_space=`$ECHO "$path" | $GREP " "`
11794    if test "x$has_space" != x; then
11795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11798    fi
11799
11800    # Use eval to expand a potential ~
11801    eval path="$path"
11802    if test ! -f "$path" && test ! -d "$path"; then
11803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11804    fi
11805
11806    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11807  fi
11808
11809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11810$as_echo_n "checking for Boot JDK... " >&6; }
11811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11812$as_echo "$BOOT_JDK" >&6; }
11813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11814$as_echo_n "checking Boot JDK version... " >&6; }
11815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11817$as_echo "$BOOT_JDK_VERSION" >&6; }
11818            fi # end check jdk version
11819          fi # end check rt.jar
11820        fi # end check javac
11821      fi # end check java
11822    fi # end check boot jdk found
11823  fi
11824
11825
11826# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11827
11828  if test "x$BOOT_JDK_FOUND" = xno; then
11829    # Now execute the test
11830
11831    if test -x /usr/libexec/java_home; then
11832        BOOT_JDK=`/usr/libexec/java_home`
11833        BOOT_JDK_FOUND=maybe
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11835$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11836    fi
11837
11838
11839    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11840    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11841      # Do we have a bin/java?
11842      if test ! -x "$BOOT_JDK/bin/java"; then
11843        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11845        BOOT_JDK_FOUND=no
11846      else
11847        # Do we have a bin/javac?
11848        if test ! -x "$BOOT_JDK/bin/javac"; then
11849          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11851          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11852$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11853          BOOT_JDK_FOUND=no
11854        else
11855          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11856          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11859            BOOT_JDK_FOUND=no
11860          else
11861            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11863
11864            # Extra M4 quote needed to protect [] in grep expression.
11865            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11866            if test "x$FOUND_VERSION_78" = x; then
11867              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11870$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11871              BOOT_JDK_FOUND=no
11872            else
11873              # We're done! :-)
11874              BOOT_JDK_FOUND=yes
11875
11876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11877
11878  # Input might be given as Windows format, start by converting to
11879  # unix format.
11880  path="$BOOT_JDK"
11881  new_path=`$CYGPATH -u "$path"`
11882
11883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11886  # "foo.exe" is OK but "foo" is an error.
11887  #
11888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11889  # It is also a way to make sure we got the proper file name for the real test later on.
11890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11891  if test "x$test_shortpath" = x; then
11892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11894    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11895  fi
11896
11897  # Call helper function which possibly converts this using DOS-style short mode.
11898  # If so, the updated path is stored in $new_path.
11899
11900  input_path="$new_path"
11901  # Check if we need to convert this using DOS-style short mode. If the path
11902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11903  # take no chances and rewrite it.
11904  # Note: m4 eats our [], so we need to use [ and ] instead.
11905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11906  if test "x$has_forbidden_chars" != x; then
11907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11911      # Going to short mode and back again did indeed matter. Since short mode is
11912      # case insensitive, let's make it lowercase to improve readability.
11913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11914      # Now convert it back to Unix-stile (cygpath)
11915      input_path=`$CYGPATH -u "$shortmode_path"`
11916      new_path="$input_path"
11917    fi
11918  fi
11919
11920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11921  if test "x$test_cygdrive_prefix" = x; then
11922    # As a simple fix, exclude /usr/bin since it's not a real path.
11923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11925      # a path prefixed by /cygdrive for fixpath to work.
11926      new_path="$CYGWIN_ROOT_PATH$input_path"
11927    fi
11928  fi
11929
11930
11931  if test "x$path" != "x$new_path"; then
11932    BOOT_JDK="$new_path"
11933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11935  fi
11936
11937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11938
11939  path="$BOOT_JDK"
11940  has_colon=`$ECHO $path | $GREP ^.:`
11941  new_path="$path"
11942  if test "x$has_colon" = x; then
11943    # Not in mixed or Windows style, start by that.
11944    new_path=`cmd //c echo $path`
11945  fi
11946
11947
11948  input_path="$new_path"
11949  # Check if we need to convert this using DOS-style short mode. If the path
11950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11951  # take no chances and rewrite it.
11952  # Note: m4 eats our [], so we need to use [ and ] instead.
11953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11954  if test "x$has_forbidden_chars" != x; then
11955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11957  fi
11958
11959
11960  windows_path="$new_path"
11961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11962    unix_path=`$CYGPATH -u "$windows_path"`
11963    new_path="$unix_path"
11964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11966    new_path="$unix_path"
11967  fi
11968
11969  if test "x$path" != "x$new_path"; then
11970    BOOT_JDK="$new_path"
11971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11973  fi
11974
11975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11977
11978  else
11979    # We're on a posix platform. Hooray! :)
11980    path="$BOOT_JDK"
11981    has_space=`$ECHO "$path" | $GREP " "`
11982    if test "x$has_space" != x; then
11983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11985      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11986    fi
11987
11988    # Use eval to expand a potential ~
11989    eval path="$path"
11990    if test ! -f "$path" && test ! -d "$path"; then
11991      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11992    fi
11993
11994    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11995  fi
11996
11997              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11998$as_echo_n "checking for Boot JDK... " >&6; }
11999              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12000$as_echo "$BOOT_JDK" >&6; }
12001              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12002$as_echo_n "checking Boot JDK version... " >&6; }
12003              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12005$as_echo "$BOOT_JDK_VERSION" >&6; }
12006            fi # end check jdk version
12007          fi # end check rt.jar
12008        fi # end check javac
12009      fi # end check java
12010    fi # end check boot jdk found
12011  fi
12012
12013
12014# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12015
12016  if test "x$BOOT_JDK_FOUND" = xno; then
12017    # Now execute the test
12018
12019    # Extract the first word of "javac", so it can be a program name with args.
12020set dummy javac; ac_word=$2
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12022$as_echo_n "checking for $ac_word... " >&6; }
12023if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12024  $as_echo_n "(cached) " >&6
12025else
12026  case $JAVAC_CHECK in
12027  [\\/]* | ?:[\\/]*)
12028  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12029  ;;
12030  *)
12031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_exec_ext in '' $ac_executable_extensions; do
12037  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12038    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12040    break 2
12041  fi
12042done
12043  done
12044IFS=$as_save_IFS
12045
12046  ;;
12047esac
12048fi
12049JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12050if test -n "$JAVAC_CHECK"; then
12051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12052$as_echo "$JAVAC_CHECK" >&6; }
12053else
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055$as_echo "no" >&6; }
12056fi
12057
12058
12059    # Extract the first word of "java", so it can be a program name with args.
12060set dummy java; ac_word=$2
12061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12062$as_echo_n "checking for $ac_word... " >&6; }
12063if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12064  $as_echo_n "(cached) " >&6
12065else
12066  case $JAVA_CHECK in
12067  [\\/]* | ?:[\\/]*)
12068  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12069  ;;
12070  *)
12071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12072for as_dir in $PATH
12073do
12074  IFS=$as_save_IFS
12075  test -z "$as_dir" && as_dir=.
12076    for ac_exec_ext in '' $ac_executable_extensions; do
12077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12078    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12080    break 2
12081  fi
12082done
12083  done
12084IFS=$as_save_IFS
12085
12086  ;;
12087esac
12088fi
12089JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12090if test -n "$JAVA_CHECK"; then
12091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12092$as_echo "$JAVA_CHECK" >&6; }
12093else
12094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12095$as_echo "no" >&6; }
12096fi
12097
12098
12099    BINARY="$JAVAC_CHECK"
12100    if test "x$JAVAC_CHECK" = x; then
12101        BINARY="$JAVA_CHECK"
12102    fi
12103    if test "x$BINARY" != x; then
12104        # So there is a java(c) binary, it might be part of a JDK.
12105        # Lets find the JDK/JRE directory by following symbolic links.
12106        # Linux/GNU systems often have links from /usr/bin/java to
12107        # /etc/alternatives/java to the real JDK binary.
12108
12109    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12110        # Follow a chain of symbolic links. Use readlink
12111        # where it exists, else fall back to horribly
12112        # complicated shell code.
12113        if test "x$READLINK_TESTED" != yes; then
12114            # On MacOSX there is a readlink tool with a different
12115            # purpose than the GNU readlink tool. Check the found readlink.
12116            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12117            if test "x$ISGNU" = x; then
12118                 # A readlink that we do not know how to use.
12119                 # Are there other non-GNU readlinks out there?
12120                 READLINK_TESTED=yes
12121                 READLINK=
12122            fi
12123        fi
12124
12125        if test "x$READLINK" != x; then
12126            BINARY=`$READLINK -f $BINARY`
12127        else
12128            # Save the current directory for restoring afterwards
12129            STARTDIR=$PWD
12130            COUNTER=0
12131            sym_link_dir=`$DIRNAME $BINARY`
12132            sym_link_file=`$BASENAME $BINARY`
12133            cd $sym_link_dir
12134            # Use -P flag to resolve symlinks in directories.
12135            cd `$THEPWDCMD -P`
12136            sym_link_dir=`$THEPWDCMD -P`
12137            # Resolve file symlinks
12138            while test $COUNTER -lt 20; do
12139                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12140                if test "x$ISLINK" == x; then
12141                    # This is not a symbolic link! We are done!
12142                    break
12143                fi
12144                # Again resolve directory symlinks since the target of the just found
12145                # link could be in a different directory
12146                cd `$DIRNAME $ISLINK`
12147                sym_link_dir=`$THEPWDCMD -P`
12148                sym_link_file=`$BASENAME $ISLINK`
12149                let COUNTER=COUNTER+1
12150            done
12151            cd $STARTDIR
12152            BINARY=$sym_link_dir/$sym_link_file
12153        fi
12154    fi
12155
12156        BOOT_JDK=`dirname "$BINARY"`
12157        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12158        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12159            # Looks like we found ourselves an JDK
12160            BOOT_JDK_FOUND=maybe
12161            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12162$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12163        fi
12164    fi
12165
12166
12167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12168    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12169      # Do we have a bin/java?
12170      if test ! -x "$BOOT_JDK/bin/java"; then
12171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12173        BOOT_JDK_FOUND=no
12174      else
12175        # Do we have a bin/javac?
12176        if test ! -x "$BOOT_JDK/bin/javac"; then
12177          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12179          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12180$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12181          BOOT_JDK_FOUND=no
12182        else
12183          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12184          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12185            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12187            BOOT_JDK_FOUND=no
12188          else
12189            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12190            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12191
12192            # Extra M4 quote needed to protect [] in grep expression.
12193            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12194            if test "x$FOUND_VERSION_78" = x; then
12195              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12197              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12198$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12199              BOOT_JDK_FOUND=no
12200            else
12201              # We're done! :-)
12202              BOOT_JDK_FOUND=yes
12203
12204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12205
12206  # Input might be given as Windows format, start by converting to
12207  # unix format.
12208  path="$BOOT_JDK"
12209  new_path=`$CYGPATH -u "$path"`
12210
12211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12214  # "foo.exe" is OK but "foo" is an error.
12215  #
12216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12217  # It is also a way to make sure we got the proper file name for the real test later on.
12218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12219  if test "x$test_shortpath" = x; then
12220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12222    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12223  fi
12224
12225  # Call helper function which possibly converts this using DOS-style short mode.
12226  # If so, the updated path is stored in $new_path.
12227
12228  input_path="$new_path"
12229  # Check if we need to convert this using DOS-style short mode. If the path
12230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12231  # take no chances and rewrite it.
12232  # Note: m4 eats our [], so we need to use [ and ] instead.
12233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12234  if test "x$has_forbidden_chars" != x; then
12235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12239      # Going to short mode and back again did indeed matter. Since short mode is
12240      # case insensitive, let's make it lowercase to improve readability.
12241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12242      # Now convert it back to Unix-stile (cygpath)
12243      input_path=`$CYGPATH -u "$shortmode_path"`
12244      new_path="$input_path"
12245    fi
12246  fi
12247
12248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12249  if test "x$test_cygdrive_prefix" = x; then
12250    # As a simple fix, exclude /usr/bin since it's not a real path.
12251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12253      # a path prefixed by /cygdrive for fixpath to work.
12254      new_path="$CYGWIN_ROOT_PATH$input_path"
12255    fi
12256  fi
12257
12258
12259  if test "x$path" != "x$new_path"; then
12260    BOOT_JDK="$new_path"
12261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12263  fi
12264
12265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12266
12267  path="$BOOT_JDK"
12268  has_colon=`$ECHO $path | $GREP ^.:`
12269  new_path="$path"
12270  if test "x$has_colon" = x; then
12271    # Not in mixed or Windows style, start by that.
12272    new_path=`cmd //c echo $path`
12273  fi
12274
12275
12276  input_path="$new_path"
12277  # Check if we need to convert this using DOS-style short mode. If the path
12278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12279  # take no chances and rewrite it.
12280  # Note: m4 eats our [], so we need to use [ and ] instead.
12281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12282  if test "x$has_forbidden_chars" != x; then
12283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12285  fi
12286
12287
12288  windows_path="$new_path"
12289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12290    unix_path=`$CYGPATH -u "$windows_path"`
12291    new_path="$unix_path"
12292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12294    new_path="$unix_path"
12295  fi
12296
12297  if test "x$path" != "x$new_path"; then
12298    BOOT_JDK="$new_path"
12299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12301  fi
12302
12303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12305
12306  else
12307    # We're on a posix platform. Hooray! :)
12308    path="$BOOT_JDK"
12309    has_space=`$ECHO "$path" | $GREP " "`
12310    if test "x$has_space" != x; then
12311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12314    fi
12315
12316    # Use eval to expand a potential ~
12317    eval path="$path"
12318    if test ! -f "$path" && test ! -d "$path"; then
12319      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12320    fi
12321
12322    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12323  fi
12324
12325              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12326$as_echo_n "checking for Boot JDK... " >&6; }
12327              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12328$as_echo "$BOOT_JDK" >&6; }
12329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12330$as_echo_n "checking Boot JDK version... " >&6; }
12331              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12332              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12333$as_echo "$BOOT_JDK_VERSION" >&6; }
12334            fi # end check jdk version
12335          fi # end check rt.jar
12336        fi # end check javac
12337      fi # end check java
12338    fi # end check boot jdk found
12339  fi
12340
12341
12342# Test: Is there a JDK installed in default, well-known locations?
12343
12344  if test "x$BOOT_JDK_FOUND" = xno; then
12345    # Now execute the test
12346
12347  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12348
12349  if test "x$BOOT_JDK_FOUND" = xno; then
12350    # Now execute the test
12351
12352  if test "x$ProgramW6432" != x; then
12353    VIRTUAL_DIR="$ProgramW6432/Java"
12354
12355  windows_path="$VIRTUAL_DIR"
12356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12357    unix_path=`$CYGPATH -u "$windows_path"`
12358    VIRTUAL_DIR="$unix_path"
12359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12361    VIRTUAL_DIR="$unix_path"
12362  fi
12363
12364
12365  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12366  BOOT_JDK_SUFFIX=""
12367  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12368  if test "x$ALL_JDKS_FOUND" != x; then
12369    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12370
12371  if test "x$BOOT_JDK_FOUND" = xno; then
12372    # Now execute the test
12373
12374        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12375        if test -d "$BOOT_JDK"; then
12376          BOOT_JDK_FOUND=maybe
12377          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12378$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12379        fi
12380
12381
12382    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12383    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12384      # Do we have a bin/java?
12385      if test ! -x "$BOOT_JDK/bin/java"; then
12386        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12388        BOOT_JDK_FOUND=no
12389      else
12390        # Do we have a bin/javac?
12391        if test ! -x "$BOOT_JDK/bin/javac"; then
12392          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12394          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12395$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12396          BOOT_JDK_FOUND=no
12397        else
12398          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12399          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12400            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12402            BOOT_JDK_FOUND=no
12403          else
12404            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12405            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12406
12407            # Extra M4 quote needed to protect [] in grep expression.
12408            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12409            if test "x$FOUND_VERSION_78" = x; then
12410              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12412              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12413$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12414              BOOT_JDK_FOUND=no
12415            else
12416              # We're done! :-)
12417              BOOT_JDK_FOUND=yes
12418
12419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12420
12421  # Input might be given as Windows format, start by converting to
12422  # unix format.
12423  path="$BOOT_JDK"
12424  new_path=`$CYGPATH -u "$path"`
12425
12426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12429  # "foo.exe" is OK but "foo" is an error.
12430  #
12431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12432  # It is also a way to make sure we got the proper file name for the real test later on.
12433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12434  if test "x$test_shortpath" = x; then
12435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12437    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12438  fi
12439
12440  # Call helper function which possibly converts this using DOS-style short mode.
12441  # If so, the updated path is stored in $new_path.
12442
12443  input_path="$new_path"
12444  # Check if we need to convert this using DOS-style short mode. If the path
12445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12446  # take no chances and rewrite it.
12447  # Note: m4 eats our [], so we need to use [ and ] instead.
12448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12449  if test "x$has_forbidden_chars" != x; then
12450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12454      # Going to short mode and back again did indeed matter. Since short mode is
12455      # case insensitive, let's make it lowercase to improve readability.
12456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12457      # Now convert it back to Unix-stile (cygpath)
12458      input_path=`$CYGPATH -u "$shortmode_path"`
12459      new_path="$input_path"
12460    fi
12461  fi
12462
12463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12464  if test "x$test_cygdrive_prefix" = x; then
12465    # As a simple fix, exclude /usr/bin since it's not a real path.
12466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12468      # a path prefixed by /cygdrive for fixpath to work.
12469      new_path="$CYGWIN_ROOT_PATH$input_path"
12470    fi
12471  fi
12472
12473
12474  if test "x$path" != "x$new_path"; then
12475    BOOT_JDK="$new_path"
12476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12478  fi
12479
12480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12481
12482  path="$BOOT_JDK"
12483  has_colon=`$ECHO $path | $GREP ^.:`
12484  new_path="$path"
12485  if test "x$has_colon" = x; then
12486    # Not in mixed or Windows style, start by that.
12487    new_path=`cmd //c echo $path`
12488  fi
12489
12490
12491  input_path="$new_path"
12492  # Check if we need to convert this using DOS-style short mode. If the path
12493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12494  # take no chances and rewrite it.
12495  # Note: m4 eats our [], so we need to use [ and ] instead.
12496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12497  if test "x$has_forbidden_chars" != x; then
12498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12500  fi
12501
12502
12503  windows_path="$new_path"
12504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12505    unix_path=`$CYGPATH -u "$windows_path"`
12506    new_path="$unix_path"
12507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12509    new_path="$unix_path"
12510  fi
12511
12512  if test "x$path" != "x$new_path"; then
12513    BOOT_JDK="$new_path"
12514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12516  fi
12517
12518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12520
12521  else
12522    # We're on a posix platform. Hooray! :)
12523    path="$BOOT_JDK"
12524    has_space=`$ECHO "$path" | $GREP " "`
12525    if test "x$has_space" != x; then
12526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12528      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12529    fi
12530
12531    # Use eval to expand a potential ~
12532    eval path="$path"
12533    if test ! -f "$path" && test ! -d "$path"; then
12534      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12535    fi
12536
12537    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12538  fi
12539
12540              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12541$as_echo_n "checking for Boot JDK... " >&6; }
12542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12543$as_echo "$BOOT_JDK" >&6; }
12544              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12545$as_echo_n "checking Boot JDK version... " >&6; }
12546              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12547              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12548$as_echo "$BOOT_JDK_VERSION" >&6; }
12549            fi # end check jdk version
12550          fi # end check rt.jar
12551        fi # end check javac
12552      fi # end check java
12553    fi # end check boot jdk found
12554  fi
12555
12556    done
12557  fi
12558
12559  fi
12560
12561
12562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12564      # Do we have a bin/java?
12565      if test ! -x "$BOOT_JDK/bin/java"; then
12566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12568        BOOT_JDK_FOUND=no
12569      else
12570        # Do we have a bin/javac?
12571        if test ! -x "$BOOT_JDK/bin/javac"; then
12572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12576          BOOT_JDK_FOUND=no
12577        else
12578          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12579          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12582            BOOT_JDK_FOUND=no
12583          else
12584            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12586
12587            # Extra M4 quote needed to protect [] in grep expression.
12588            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12589            if test "x$FOUND_VERSION_78" = x; then
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12592              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12593$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12594              BOOT_JDK_FOUND=no
12595            else
12596              # We're done! :-)
12597              BOOT_JDK_FOUND=yes
12598
12599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12600
12601  # Input might be given as Windows format, start by converting to
12602  # unix format.
12603  path="$BOOT_JDK"
12604  new_path=`$CYGPATH -u "$path"`
12605
12606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12609  # "foo.exe" is OK but "foo" is an error.
12610  #
12611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12612  # It is also a way to make sure we got the proper file name for the real test later on.
12613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12614  if test "x$test_shortpath" = x; then
12615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12618  fi
12619
12620  # Call helper function which possibly converts this using DOS-style short mode.
12621  # If so, the updated path is stored in $new_path.
12622
12623  input_path="$new_path"
12624  # Check if we need to convert this using DOS-style short mode. If the path
12625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12626  # take no chances and rewrite it.
12627  # Note: m4 eats our [], so we need to use [ and ] instead.
12628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12629  if test "x$has_forbidden_chars" != x; then
12630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12634      # Going to short mode and back again did indeed matter. Since short mode is
12635      # case insensitive, let's make it lowercase to improve readability.
12636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12637      # Now convert it back to Unix-stile (cygpath)
12638      input_path=`$CYGPATH -u "$shortmode_path"`
12639      new_path="$input_path"
12640    fi
12641  fi
12642
12643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12644  if test "x$test_cygdrive_prefix" = x; then
12645    # As a simple fix, exclude /usr/bin since it's not a real path.
12646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12648      # a path prefixed by /cygdrive for fixpath to work.
12649      new_path="$CYGWIN_ROOT_PATH$input_path"
12650    fi
12651  fi
12652
12653
12654  if test "x$path" != "x$new_path"; then
12655    BOOT_JDK="$new_path"
12656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12658  fi
12659
12660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12661
12662  path="$BOOT_JDK"
12663  has_colon=`$ECHO $path | $GREP ^.:`
12664  new_path="$path"
12665  if test "x$has_colon" = x; then
12666    # Not in mixed or Windows style, start by that.
12667    new_path=`cmd //c echo $path`
12668  fi
12669
12670
12671  input_path="$new_path"
12672  # Check if we need to convert this using DOS-style short mode. If the path
12673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12674  # take no chances and rewrite it.
12675  # Note: m4 eats our [], so we need to use [ and ] instead.
12676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12677  if test "x$has_forbidden_chars" != x; then
12678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12680  fi
12681
12682
12683  windows_path="$new_path"
12684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12685    unix_path=`$CYGPATH -u "$windows_path"`
12686    new_path="$unix_path"
12687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12689    new_path="$unix_path"
12690  fi
12691
12692  if test "x$path" != "x$new_path"; then
12693    BOOT_JDK="$new_path"
12694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12696  fi
12697
12698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12700
12701  else
12702    # We're on a posix platform. Hooray! :)
12703    path="$BOOT_JDK"
12704    has_space=`$ECHO "$path" | $GREP " "`
12705    if test "x$has_space" != x; then
12706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12708      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12709    fi
12710
12711    # Use eval to expand a potential ~
12712    eval path="$path"
12713    if test ! -f "$path" && test ! -d "$path"; then
12714      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12715    fi
12716
12717    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12718  fi
12719
12720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12721$as_echo_n "checking for Boot JDK... " >&6; }
12722              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12723$as_echo "$BOOT_JDK" >&6; }
12724              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12725$as_echo_n "checking Boot JDK version... " >&6; }
12726              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12727              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12728$as_echo "$BOOT_JDK_VERSION" >&6; }
12729            fi # end check jdk version
12730          fi # end check rt.jar
12731        fi # end check javac
12732      fi # end check java
12733    fi # end check boot jdk found
12734  fi
12735
12736
12737  if test "x$BOOT_JDK_FOUND" = xno; then
12738    # Now execute the test
12739
12740  if test "x$PROGRAMW6432" != x; then
12741    VIRTUAL_DIR="$PROGRAMW6432/Java"
12742
12743  windows_path="$VIRTUAL_DIR"
12744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12745    unix_path=`$CYGPATH -u "$windows_path"`
12746    VIRTUAL_DIR="$unix_path"
12747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12749    VIRTUAL_DIR="$unix_path"
12750  fi
12751
12752
12753  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12754  BOOT_JDK_SUFFIX=""
12755  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12756  if test "x$ALL_JDKS_FOUND" != x; then
12757    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12758
12759  if test "x$BOOT_JDK_FOUND" = xno; then
12760    # Now execute the test
12761
12762        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12763        if test -d "$BOOT_JDK"; then
12764          BOOT_JDK_FOUND=maybe
12765          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12766$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12767        fi
12768
12769
12770    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12771    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12772      # Do we have a bin/java?
12773      if test ! -x "$BOOT_JDK/bin/java"; then
12774        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12776        BOOT_JDK_FOUND=no
12777      else
12778        # Do we have a bin/javac?
12779        if test ! -x "$BOOT_JDK/bin/javac"; then
12780          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12782          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12783$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12784          BOOT_JDK_FOUND=no
12785        else
12786          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12787          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12790            BOOT_JDK_FOUND=no
12791          else
12792            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12793            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12794
12795            # Extra M4 quote needed to protect [] in grep expression.
12796            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12797            if test "x$FOUND_VERSION_78" = x; then
12798              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12800              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12801$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12802              BOOT_JDK_FOUND=no
12803            else
12804              # We're done! :-)
12805              BOOT_JDK_FOUND=yes
12806
12807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12808
12809  # Input might be given as Windows format, start by converting to
12810  # unix format.
12811  path="$BOOT_JDK"
12812  new_path=`$CYGPATH -u "$path"`
12813
12814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12817  # "foo.exe" is OK but "foo" is an error.
12818  #
12819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12820  # It is also a way to make sure we got the proper file name for the real test later on.
12821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12822  if test "x$test_shortpath" = x; then
12823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12826  fi
12827
12828  # Call helper function which possibly converts this using DOS-style short mode.
12829  # If so, the updated path is stored in $new_path.
12830
12831  input_path="$new_path"
12832  # Check if we need to convert this using DOS-style short mode. If the path
12833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12834  # take no chances and rewrite it.
12835  # Note: m4 eats our [], so we need to use [ and ] instead.
12836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12837  if test "x$has_forbidden_chars" != x; then
12838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12842      # Going to short mode and back again did indeed matter. Since short mode is
12843      # case insensitive, let's make it lowercase to improve readability.
12844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12845      # Now convert it back to Unix-stile (cygpath)
12846      input_path=`$CYGPATH -u "$shortmode_path"`
12847      new_path="$input_path"
12848    fi
12849  fi
12850
12851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12852  if test "x$test_cygdrive_prefix" = x; then
12853    # As a simple fix, exclude /usr/bin since it's not a real path.
12854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12856      # a path prefixed by /cygdrive for fixpath to work.
12857      new_path="$CYGWIN_ROOT_PATH$input_path"
12858    fi
12859  fi
12860
12861
12862  if test "x$path" != "x$new_path"; then
12863    BOOT_JDK="$new_path"
12864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12866  fi
12867
12868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12869
12870  path="$BOOT_JDK"
12871  has_colon=`$ECHO $path | $GREP ^.:`
12872  new_path="$path"
12873  if test "x$has_colon" = x; then
12874    # Not in mixed or Windows style, start by that.
12875    new_path=`cmd //c echo $path`
12876  fi
12877
12878
12879  input_path="$new_path"
12880  # Check if we need to convert this using DOS-style short mode. If the path
12881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12882  # take no chances and rewrite it.
12883  # Note: m4 eats our [], so we need to use [ and ] instead.
12884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12885  if test "x$has_forbidden_chars" != x; then
12886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12888  fi
12889
12890
12891  windows_path="$new_path"
12892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12893    unix_path=`$CYGPATH -u "$windows_path"`
12894    new_path="$unix_path"
12895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12897    new_path="$unix_path"
12898  fi
12899
12900  if test "x$path" != "x$new_path"; then
12901    BOOT_JDK="$new_path"
12902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12904  fi
12905
12906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12908
12909  else
12910    # We're on a posix platform. Hooray! :)
12911    path="$BOOT_JDK"
12912    has_space=`$ECHO "$path" | $GREP " "`
12913    if test "x$has_space" != x; then
12914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12917    fi
12918
12919    # Use eval to expand a potential ~
12920    eval path="$path"
12921    if test ! -f "$path" && test ! -d "$path"; then
12922      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12923    fi
12924
12925    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12926  fi
12927
12928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12929$as_echo_n "checking for Boot JDK... " >&6; }
12930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12931$as_echo "$BOOT_JDK" >&6; }
12932              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12933$as_echo_n "checking Boot JDK version... " >&6; }
12934              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12935              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12936$as_echo "$BOOT_JDK_VERSION" >&6; }
12937            fi # end check jdk version
12938          fi # end check rt.jar
12939        fi # end check javac
12940      fi # end check java
12941    fi # end check boot jdk found
12942  fi
12943
12944    done
12945  fi
12946
12947  fi
12948
12949
12950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12952      # Do we have a bin/java?
12953      if test ! -x "$BOOT_JDK/bin/java"; then
12954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12956        BOOT_JDK_FOUND=no
12957      else
12958        # Do we have a bin/javac?
12959        if test ! -x "$BOOT_JDK/bin/javac"; then
12960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12964          BOOT_JDK_FOUND=no
12965        else
12966          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12967          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12970            BOOT_JDK_FOUND=no
12971          else
12972            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12973            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12974
12975            # Extra M4 quote needed to protect [] in grep expression.
12976            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12977            if test "x$FOUND_VERSION_78" = x; then
12978              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12980              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12981$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12982              BOOT_JDK_FOUND=no
12983            else
12984              # We're done! :-)
12985              BOOT_JDK_FOUND=yes
12986
12987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12988
12989  # Input might be given as Windows format, start by converting to
12990  # unix format.
12991  path="$BOOT_JDK"
12992  new_path=`$CYGPATH -u "$path"`
12993
12994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12997  # "foo.exe" is OK but "foo" is an error.
12998  #
12999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13000  # It is also a way to make sure we got the proper file name for the real test later on.
13001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13002  if test "x$test_shortpath" = x; then
13003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13006  fi
13007
13008  # Call helper function which possibly converts this using DOS-style short mode.
13009  # If so, the updated path is stored in $new_path.
13010
13011  input_path="$new_path"
13012  # Check if we need to convert this using DOS-style short mode. If the path
13013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13014  # take no chances and rewrite it.
13015  # Note: m4 eats our [], so we need to use [ and ] instead.
13016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13017  if test "x$has_forbidden_chars" != x; then
13018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13022      # Going to short mode and back again did indeed matter. Since short mode is
13023      # case insensitive, let's make it lowercase to improve readability.
13024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13025      # Now convert it back to Unix-stile (cygpath)
13026      input_path=`$CYGPATH -u "$shortmode_path"`
13027      new_path="$input_path"
13028    fi
13029  fi
13030
13031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13032  if test "x$test_cygdrive_prefix" = x; then
13033    # As a simple fix, exclude /usr/bin since it's not a real path.
13034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13036      # a path prefixed by /cygdrive for fixpath to work.
13037      new_path="$CYGWIN_ROOT_PATH$input_path"
13038    fi
13039  fi
13040
13041
13042  if test "x$path" != "x$new_path"; then
13043    BOOT_JDK="$new_path"
13044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13046  fi
13047
13048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13049
13050  path="$BOOT_JDK"
13051  has_colon=`$ECHO $path | $GREP ^.:`
13052  new_path="$path"
13053  if test "x$has_colon" = x; then
13054    # Not in mixed or Windows style, start by that.
13055    new_path=`cmd //c echo $path`
13056  fi
13057
13058
13059  input_path="$new_path"
13060  # Check if we need to convert this using DOS-style short mode. If the path
13061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13062  # take no chances and rewrite it.
13063  # Note: m4 eats our [], so we need to use [ and ] instead.
13064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13065  if test "x$has_forbidden_chars" != x; then
13066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13068  fi
13069
13070
13071  windows_path="$new_path"
13072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13073    unix_path=`$CYGPATH -u "$windows_path"`
13074    new_path="$unix_path"
13075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13077    new_path="$unix_path"
13078  fi
13079
13080  if test "x$path" != "x$new_path"; then
13081    BOOT_JDK="$new_path"
13082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13084  fi
13085
13086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13088
13089  else
13090    # We're on a posix platform. Hooray! :)
13091    path="$BOOT_JDK"
13092    has_space=`$ECHO "$path" | $GREP " "`
13093    if test "x$has_space" != x; then
13094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13096      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13097    fi
13098
13099    # Use eval to expand a potential ~
13100    eval path="$path"
13101    if test ! -f "$path" && test ! -d "$path"; then
13102      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13103    fi
13104
13105    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13106  fi
13107
13108              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13109$as_echo_n "checking for Boot JDK... " >&6; }
13110              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13111$as_echo "$BOOT_JDK" >&6; }
13112              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13113$as_echo_n "checking Boot JDK version... " >&6; }
13114              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13115              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13116$as_echo "$BOOT_JDK_VERSION" >&6; }
13117            fi # end check jdk version
13118          fi # end check rt.jar
13119        fi # end check javac
13120      fi # end check java
13121    fi # end check boot jdk found
13122  fi
13123
13124
13125  if test "x$BOOT_JDK_FOUND" = xno; then
13126    # Now execute the test
13127
13128  if test "x$PROGRAMFILES" != x; then
13129    VIRTUAL_DIR="$PROGRAMFILES/Java"
13130
13131  windows_path="$VIRTUAL_DIR"
13132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13133    unix_path=`$CYGPATH -u "$windows_path"`
13134    VIRTUAL_DIR="$unix_path"
13135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13137    VIRTUAL_DIR="$unix_path"
13138  fi
13139
13140
13141  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13142  BOOT_JDK_SUFFIX=""
13143  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13144  if test "x$ALL_JDKS_FOUND" != x; then
13145    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13146
13147  if test "x$BOOT_JDK_FOUND" = xno; then
13148    # Now execute the test
13149
13150        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13151        if test -d "$BOOT_JDK"; then
13152          BOOT_JDK_FOUND=maybe
13153          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13154$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13155        fi
13156
13157
13158    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13159    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13160      # Do we have a bin/java?
13161      if test ! -x "$BOOT_JDK/bin/java"; then
13162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13164        BOOT_JDK_FOUND=no
13165      else
13166        # Do we have a bin/javac?
13167        if test ! -x "$BOOT_JDK/bin/javac"; then
13168          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13170          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13171$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13172          BOOT_JDK_FOUND=no
13173        else
13174          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13175          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13178            BOOT_JDK_FOUND=no
13179          else
13180            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13182
13183            # Extra M4 quote needed to protect [] in grep expression.
13184            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13185            if test "x$FOUND_VERSION_78" = x; then
13186              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13188              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13189$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13190              BOOT_JDK_FOUND=no
13191            else
13192              # We're done! :-)
13193              BOOT_JDK_FOUND=yes
13194
13195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13196
13197  # Input might be given as Windows format, start by converting to
13198  # unix format.
13199  path="$BOOT_JDK"
13200  new_path=`$CYGPATH -u "$path"`
13201
13202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13205  # "foo.exe" is OK but "foo" is an error.
13206  #
13207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13208  # It is also a way to make sure we got the proper file name for the real test later on.
13209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13210  if test "x$test_shortpath" = x; then
13211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13214  fi
13215
13216  # Call helper function which possibly converts this using DOS-style short mode.
13217  # If so, the updated path is stored in $new_path.
13218
13219  input_path="$new_path"
13220  # Check if we need to convert this using DOS-style short mode. If the path
13221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13222  # take no chances and rewrite it.
13223  # Note: m4 eats our [], so we need to use [ and ] instead.
13224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13225  if test "x$has_forbidden_chars" != x; then
13226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13230      # Going to short mode and back again did indeed matter. Since short mode is
13231      # case insensitive, let's make it lowercase to improve readability.
13232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13233      # Now convert it back to Unix-stile (cygpath)
13234      input_path=`$CYGPATH -u "$shortmode_path"`
13235      new_path="$input_path"
13236    fi
13237  fi
13238
13239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13240  if test "x$test_cygdrive_prefix" = x; then
13241    # As a simple fix, exclude /usr/bin since it's not a real path.
13242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13244      # a path prefixed by /cygdrive for fixpath to work.
13245      new_path="$CYGWIN_ROOT_PATH$input_path"
13246    fi
13247  fi
13248
13249
13250  if test "x$path" != "x$new_path"; then
13251    BOOT_JDK="$new_path"
13252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13254  fi
13255
13256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13257
13258  path="$BOOT_JDK"
13259  has_colon=`$ECHO $path | $GREP ^.:`
13260  new_path="$path"
13261  if test "x$has_colon" = x; then
13262    # Not in mixed or Windows style, start by that.
13263    new_path=`cmd //c echo $path`
13264  fi
13265
13266
13267  input_path="$new_path"
13268  # Check if we need to convert this using DOS-style short mode. If the path
13269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13270  # take no chances and rewrite it.
13271  # Note: m4 eats our [], so we need to use [ and ] instead.
13272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13273  if test "x$has_forbidden_chars" != x; then
13274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13276  fi
13277
13278
13279  windows_path="$new_path"
13280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13281    unix_path=`$CYGPATH -u "$windows_path"`
13282    new_path="$unix_path"
13283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13285    new_path="$unix_path"
13286  fi
13287
13288  if test "x$path" != "x$new_path"; then
13289    BOOT_JDK="$new_path"
13290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13292  fi
13293
13294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13296
13297  else
13298    # We're on a posix platform. Hooray! :)
13299    path="$BOOT_JDK"
13300    has_space=`$ECHO "$path" | $GREP " "`
13301    if test "x$has_space" != x; then
13302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13304      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13305    fi
13306
13307    # Use eval to expand a potential ~
13308    eval path="$path"
13309    if test ! -f "$path" && test ! -d "$path"; then
13310      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13311    fi
13312
13313    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13314  fi
13315
13316              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13317$as_echo_n "checking for Boot JDK... " >&6; }
13318              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13319$as_echo "$BOOT_JDK" >&6; }
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13321$as_echo_n "checking Boot JDK version... " >&6; }
13322              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13323              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13324$as_echo "$BOOT_JDK_VERSION" >&6; }
13325            fi # end check jdk version
13326          fi # end check rt.jar
13327        fi # end check javac
13328      fi # end check java
13329    fi # end check boot jdk found
13330  fi
13331
13332    done
13333  fi
13334
13335  fi
13336
13337
13338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13340      # Do we have a bin/java?
13341      if test ! -x "$BOOT_JDK/bin/java"; then
13342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13344        BOOT_JDK_FOUND=no
13345      else
13346        # Do we have a bin/javac?
13347        if test ! -x "$BOOT_JDK/bin/javac"; then
13348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13352          BOOT_JDK_FOUND=no
13353        else
13354          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13355          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13358            BOOT_JDK_FOUND=no
13359          else
13360            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13362
13363            # Extra M4 quote needed to protect [] in grep expression.
13364            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13365            if test "x$FOUND_VERSION_78" = x; then
13366              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13368              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13369$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13370              BOOT_JDK_FOUND=no
13371            else
13372              # We're done! :-)
13373              BOOT_JDK_FOUND=yes
13374
13375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13376
13377  # Input might be given as Windows format, start by converting to
13378  # unix format.
13379  path="$BOOT_JDK"
13380  new_path=`$CYGPATH -u "$path"`
13381
13382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13385  # "foo.exe" is OK but "foo" is an error.
13386  #
13387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13388  # It is also a way to make sure we got the proper file name for the real test later on.
13389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13390  if test "x$test_shortpath" = x; then
13391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13393    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13394  fi
13395
13396  # Call helper function which possibly converts this using DOS-style short mode.
13397  # If so, the updated path is stored in $new_path.
13398
13399  input_path="$new_path"
13400  # Check if we need to convert this using DOS-style short mode. If the path
13401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13402  # take no chances and rewrite it.
13403  # Note: m4 eats our [], so we need to use [ and ] instead.
13404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13405  if test "x$has_forbidden_chars" != x; then
13406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13410      # Going to short mode and back again did indeed matter. Since short mode is
13411      # case insensitive, let's make it lowercase to improve readability.
13412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13413      # Now convert it back to Unix-stile (cygpath)
13414      input_path=`$CYGPATH -u "$shortmode_path"`
13415      new_path="$input_path"
13416    fi
13417  fi
13418
13419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13420  if test "x$test_cygdrive_prefix" = x; then
13421    # As a simple fix, exclude /usr/bin since it's not a real path.
13422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13424      # a path prefixed by /cygdrive for fixpath to work.
13425      new_path="$CYGWIN_ROOT_PATH$input_path"
13426    fi
13427  fi
13428
13429
13430  if test "x$path" != "x$new_path"; then
13431    BOOT_JDK="$new_path"
13432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13434  fi
13435
13436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13437
13438  path="$BOOT_JDK"
13439  has_colon=`$ECHO $path | $GREP ^.:`
13440  new_path="$path"
13441  if test "x$has_colon" = x; then
13442    # Not in mixed or Windows style, start by that.
13443    new_path=`cmd //c echo $path`
13444  fi
13445
13446
13447  input_path="$new_path"
13448  # Check if we need to convert this using DOS-style short mode. If the path
13449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13450  # take no chances and rewrite it.
13451  # Note: m4 eats our [], so we need to use [ and ] instead.
13452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13453  if test "x$has_forbidden_chars" != x; then
13454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13456  fi
13457
13458
13459  windows_path="$new_path"
13460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13461    unix_path=`$CYGPATH -u "$windows_path"`
13462    new_path="$unix_path"
13463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13465    new_path="$unix_path"
13466  fi
13467
13468  if test "x$path" != "x$new_path"; then
13469    BOOT_JDK="$new_path"
13470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13472  fi
13473
13474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13476
13477  else
13478    # We're on a posix platform. Hooray! :)
13479    path="$BOOT_JDK"
13480    has_space=`$ECHO "$path" | $GREP " "`
13481    if test "x$has_space" != x; then
13482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13484      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13485    fi
13486
13487    # Use eval to expand a potential ~
13488    eval path="$path"
13489    if test ! -f "$path" && test ! -d "$path"; then
13490      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13491    fi
13492
13493    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13494  fi
13495
13496              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13497$as_echo_n "checking for Boot JDK... " >&6; }
13498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13499$as_echo "$BOOT_JDK" >&6; }
13500              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13501$as_echo_n "checking Boot JDK version... " >&6; }
13502              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13503              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13504$as_echo "$BOOT_JDK_VERSION" >&6; }
13505            fi # end check jdk version
13506          fi # end check rt.jar
13507        fi # end check javac
13508      fi # end check java
13509    fi # end check boot jdk found
13510  fi
13511
13512
13513  if test "x$BOOT_JDK_FOUND" = xno; then
13514    # Now execute the test
13515
13516  if test "x$ProgramFiles" != x; then
13517    VIRTUAL_DIR="$ProgramFiles/Java"
13518
13519  windows_path="$VIRTUAL_DIR"
13520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13521    unix_path=`$CYGPATH -u "$windows_path"`
13522    VIRTUAL_DIR="$unix_path"
13523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13525    VIRTUAL_DIR="$unix_path"
13526  fi
13527
13528
13529  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13530  BOOT_JDK_SUFFIX=""
13531  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13532  if test "x$ALL_JDKS_FOUND" != x; then
13533    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13534
13535  if test "x$BOOT_JDK_FOUND" = xno; then
13536    # Now execute the test
13537
13538        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13539        if test -d "$BOOT_JDK"; then
13540          BOOT_JDK_FOUND=maybe
13541          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13542$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13543        fi
13544
13545
13546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13548      # Do we have a bin/java?
13549      if test ! -x "$BOOT_JDK/bin/java"; then
13550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13552        BOOT_JDK_FOUND=no
13553      else
13554        # Do we have a bin/javac?
13555        if test ! -x "$BOOT_JDK/bin/javac"; then
13556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13560          BOOT_JDK_FOUND=no
13561        else
13562          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13563          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13564            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13566            BOOT_JDK_FOUND=no
13567          else
13568            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13569            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13570
13571            # Extra M4 quote needed to protect [] in grep expression.
13572            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13573            if test "x$FOUND_VERSION_78" = x; then
13574              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13576              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13577$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13578              BOOT_JDK_FOUND=no
13579            else
13580              # We're done! :-)
13581              BOOT_JDK_FOUND=yes
13582
13583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13584
13585  # Input might be given as Windows format, start by converting to
13586  # unix format.
13587  path="$BOOT_JDK"
13588  new_path=`$CYGPATH -u "$path"`
13589
13590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13593  # "foo.exe" is OK but "foo" is an error.
13594  #
13595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13596  # It is also a way to make sure we got the proper file name for the real test later on.
13597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13598  if test "x$test_shortpath" = x; then
13599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13601    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13602  fi
13603
13604  # Call helper function which possibly converts this using DOS-style short mode.
13605  # If so, the updated path is stored in $new_path.
13606
13607  input_path="$new_path"
13608  # Check if we need to convert this using DOS-style short mode. If the path
13609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13610  # take no chances and rewrite it.
13611  # Note: m4 eats our [], so we need to use [ and ] instead.
13612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13613  if test "x$has_forbidden_chars" != x; then
13614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13618      # Going to short mode and back again did indeed matter. Since short mode is
13619      # case insensitive, let's make it lowercase to improve readability.
13620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13621      # Now convert it back to Unix-stile (cygpath)
13622      input_path=`$CYGPATH -u "$shortmode_path"`
13623      new_path="$input_path"
13624    fi
13625  fi
13626
13627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13628  if test "x$test_cygdrive_prefix" = x; then
13629    # As a simple fix, exclude /usr/bin since it's not a real path.
13630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13632      # a path prefixed by /cygdrive for fixpath to work.
13633      new_path="$CYGWIN_ROOT_PATH$input_path"
13634    fi
13635  fi
13636
13637
13638  if test "x$path" != "x$new_path"; then
13639    BOOT_JDK="$new_path"
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13642  fi
13643
13644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13645
13646  path="$BOOT_JDK"
13647  has_colon=`$ECHO $path | $GREP ^.:`
13648  new_path="$path"
13649  if test "x$has_colon" = x; then
13650    # Not in mixed or Windows style, start by that.
13651    new_path=`cmd //c echo $path`
13652  fi
13653
13654
13655  input_path="$new_path"
13656  # Check if we need to convert this using DOS-style short mode. If the path
13657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13658  # take no chances and rewrite it.
13659  # Note: m4 eats our [], so we need to use [ and ] instead.
13660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13661  if test "x$has_forbidden_chars" != x; then
13662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13664  fi
13665
13666
13667  windows_path="$new_path"
13668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13669    unix_path=`$CYGPATH -u "$windows_path"`
13670    new_path="$unix_path"
13671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13673    new_path="$unix_path"
13674  fi
13675
13676  if test "x$path" != "x$new_path"; then
13677    BOOT_JDK="$new_path"
13678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13680  fi
13681
13682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13684
13685  else
13686    # We're on a posix platform. Hooray! :)
13687    path="$BOOT_JDK"
13688    has_space=`$ECHO "$path" | $GREP " "`
13689    if test "x$has_space" != x; then
13690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13692      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13693    fi
13694
13695    # Use eval to expand a potential ~
13696    eval path="$path"
13697    if test ! -f "$path" && test ! -d "$path"; then
13698      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13699    fi
13700
13701    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13702  fi
13703
13704              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13705$as_echo_n "checking for Boot JDK... " >&6; }
13706              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13707$as_echo "$BOOT_JDK" >&6; }
13708              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13709$as_echo_n "checking Boot JDK version... " >&6; }
13710              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13711              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13712$as_echo "$BOOT_JDK_VERSION" >&6; }
13713            fi # end check jdk version
13714          fi # end check rt.jar
13715        fi # end check javac
13716      fi # end check java
13717    fi # end check boot jdk found
13718  fi
13719
13720    done
13721  fi
13722
13723  fi
13724
13725
13726    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13727    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13728      # Do we have a bin/java?
13729      if test ! -x "$BOOT_JDK/bin/java"; then
13730        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13732        BOOT_JDK_FOUND=no
13733      else
13734        # Do we have a bin/javac?
13735        if test ! -x "$BOOT_JDK/bin/javac"; then
13736          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13738          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13739$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13740          BOOT_JDK_FOUND=no
13741        else
13742          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13743          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13744            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13746            BOOT_JDK_FOUND=no
13747          else
13748            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13750
13751            # Extra M4 quote needed to protect [] in grep expression.
13752            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13753            if test "x$FOUND_VERSION_78" = x; then
13754              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13756              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13757$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13758              BOOT_JDK_FOUND=no
13759            else
13760              # We're done! :-)
13761              BOOT_JDK_FOUND=yes
13762
13763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13764
13765  # Input might be given as Windows format, start by converting to
13766  # unix format.
13767  path="$BOOT_JDK"
13768  new_path=`$CYGPATH -u "$path"`
13769
13770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13773  # "foo.exe" is OK but "foo" is an error.
13774  #
13775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13776  # It is also a way to make sure we got the proper file name for the real test later on.
13777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13778  if test "x$test_shortpath" = x; then
13779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13781    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13782  fi
13783
13784  # Call helper function which possibly converts this using DOS-style short mode.
13785  # If so, the updated path is stored in $new_path.
13786
13787  input_path="$new_path"
13788  # Check if we need to convert this using DOS-style short mode. If the path
13789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13790  # take no chances and rewrite it.
13791  # Note: m4 eats our [], so we need to use [ and ] instead.
13792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13793  if test "x$has_forbidden_chars" != x; then
13794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13798      # Going to short mode and back again did indeed matter. Since short mode is
13799      # case insensitive, let's make it lowercase to improve readability.
13800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13801      # Now convert it back to Unix-stile (cygpath)
13802      input_path=`$CYGPATH -u "$shortmode_path"`
13803      new_path="$input_path"
13804    fi
13805  fi
13806
13807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13808  if test "x$test_cygdrive_prefix" = x; then
13809    # As a simple fix, exclude /usr/bin since it's not a real path.
13810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13812      # a path prefixed by /cygdrive for fixpath to work.
13813      new_path="$CYGWIN_ROOT_PATH$input_path"
13814    fi
13815  fi
13816
13817
13818  if test "x$path" != "x$new_path"; then
13819    BOOT_JDK="$new_path"
13820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13822  fi
13823
13824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13825
13826  path="$BOOT_JDK"
13827  has_colon=`$ECHO $path | $GREP ^.:`
13828  new_path="$path"
13829  if test "x$has_colon" = x; then
13830    # Not in mixed or Windows style, start by that.
13831    new_path=`cmd //c echo $path`
13832  fi
13833
13834
13835  input_path="$new_path"
13836  # Check if we need to convert this using DOS-style short mode. If the path
13837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13838  # take no chances and rewrite it.
13839  # Note: m4 eats our [], so we need to use [ and ] instead.
13840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13841  if test "x$has_forbidden_chars" != x; then
13842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13844  fi
13845
13846
13847  windows_path="$new_path"
13848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13849    unix_path=`$CYGPATH -u "$windows_path"`
13850    new_path="$unix_path"
13851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13853    new_path="$unix_path"
13854  fi
13855
13856  if test "x$path" != "x$new_path"; then
13857    BOOT_JDK="$new_path"
13858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13860  fi
13861
13862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13864
13865  else
13866    # We're on a posix platform. Hooray! :)
13867    path="$BOOT_JDK"
13868    has_space=`$ECHO "$path" | $GREP " "`
13869    if test "x$has_space" != x; then
13870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13872      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13873    fi
13874
13875    # Use eval to expand a potential ~
13876    eval path="$path"
13877    if test ! -f "$path" && test ! -d "$path"; then
13878      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13879    fi
13880
13881    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13882  fi
13883
13884              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13885$as_echo_n "checking for Boot JDK... " >&6; }
13886              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13887$as_echo "$BOOT_JDK" >&6; }
13888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13889$as_echo_n "checking Boot JDK version... " >&6; }
13890              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13891              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13892$as_echo "$BOOT_JDK_VERSION" >&6; }
13893            fi # end check jdk version
13894          fi # end check rt.jar
13895        fi # end check javac
13896      fi # end check java
13897    fi # end check boot jdk found
13898  fi
13899
13900
13901  if test "x$BOOT_JDK_FOUND" = xno; then
13902    # Now execute the test
13903
13904  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13905  BOOT_JDK_SUFFIX=""
13906  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13907  if test "x$ALL_JDKS_FOUND" != x; then
13908    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13909
13910  if test "x$BOOT_JDK_FOUND" = xno; then
13911    # Now execute the test
13912
13913        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13914        if test -d "$BOOT_JDK"; then
13915          BOOT_JDK_FOUND=maybe
13916          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13917$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13918        fi
13919
13920
13921    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13922    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13923      # Do we have a bin/java?
13924      if test ! -x "$BOOT_JDK/bin/java"; then
13925        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13927        BOOT_JDK_FOUND=no
13928      else
13929        # Do we have a bin/javac?
13930        if test ! -x "$BOOT_JDK/bin/javac"; then
13931          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13933          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13934$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13935          BOOT_JDK_FOUND=no
13936        else
13937          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13938          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13939            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13941            BOOT_JDK_FOUND=no
13942          else
13943            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13944            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13945
13946            # Extra M4 quote needed to protect [] in grep expression.
13947            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13948            if test "x$FOUND_VERSION_78" = x; then
13949              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13951              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13952$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13953              BOOT_JDK_FOUND=no
13954            else
13955              # We're done! :-)
13956              BOOT_JDK_FOUND=yes
13957
13958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13959
13960  # Input might be given as Windows format, start by converting to
13961  # unix format.
13962  path="$BOOT_JDK"
13963  new_path=`$CYGPATH -u "$path"`
13964
13965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13968  # "foo.exe" is OK but "foo" is an error.
13969  #
13970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13971  # It is also a way to make sure we got the proper file name for the real test later on.
13972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13973  if test "x$test_shortpath" = x; then
13974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13976    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13977  fi
13978
13979  # Call helper function which possibly converts this using DOS-style short mode.
13980  # If so, the updated path is stored in $new_path.
13981
13982  input_path="$new_path"
13983  # Check if we need to convert this using DOS-style short mode. If the path
13984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13985  # take no chances and rewrite it.
13986  # Note: m4 eats our [], so we need to use [ and ] instead.
13987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13988  if test "x$has_forbidden_chars" != x; then
13989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13993      # Going to short mode and back again did indeed matter. Since short mode is
13994      # case insensitive, let's make it lowercase to improve readability.
13995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13996      # Now convert it back to Unix-stile (cygpath)
13997      input_path=`$CYGPATH -u "$shortmode_path"`
13998      new_path="$input_path"
13999    fi
14000  fi
14001
14002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14003  if test "x$test_cygdrive_prefix" = x; then
14004    # As a simple fix, exclude /usr/bin since it's not a real path.
14005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14007      # a path prefixed by /cygdrive for fixpath to work.
14008      new_path="$CYGWIN_ROOT_PATH$input_path"
14009    fi
14010  fi
14011
14012
14013  if test "x$path" != "x$new_path"; then
14014    BOOT_JDK="$new_path"
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14017  fi
14018
14019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14020
14021  path="$BOOT_JDK"
14022  has_colon=`$ECHO $path | $GREP ^.:`
14023  new_path="$path"
14024  if test "x$has_colon" = x; then
14025    # Not in mixed or Windows style, start by that.
14026    new_path=`cmd //c echo $path`
14027  fi
14028
14029
14030  input_path="$new_path"
14031  # Check if we need to convert this using DOS-style short mode. If the path
14032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14033  # take no chances and rewrite it.
14034  # Note: m4 eats our [], so we need to use [ and ] instead.
14035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14036  if test "x$has_forbidden_chars" != x; then
14037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14039  fi
14040
14041
14042  windows_path="$new_path"
14043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044    unix_path=`$CYGPATH -u "$windows_path"`
14045    new_path="$unix_path"
14046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14048    new_path="$unix_path"
14049  fi
14050
14051  if test "x$path" != "x$new_path"; then
14052    BOOT_JDK="$new_path"
14053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14054$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14055  fi
14056
14057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14059
14060  else
14061    # We're on a posix platform. Hooray! :)
14062    path="$BOOT_JDK"
14063    has_space=`$ECHO "$path" | $GREP " "`
14064    if test "x$has_space" != x; then
14065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14067      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14068    fi
14069
14070    # Use eval to expand a potential ~
14071    eval path="$path"
14072    if test ! -f "$path" && test ! -d "$path"; then
14073      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14074    fi
14075
14076    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14077  fi
14078
14079              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14080$as_echo_n "checking for Boot JDK... " >&6; }
14081              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14082$as_echo "$BOOT_JDK" >&6; }
14083              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14084$as_echo_n "checking Boot JDK version... " >&6; }
14085              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14086              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14087$as_echo "$BOOT_JDK_VERSION" >&6; }
14088            fi # end check jdk version
14089          fi # end check rt.jar
14090        fi # end check javac
14091      fi # end check java
14092    fi # end check boot jdk found
14093  fi
14094
14095    done
14096  fi
14097
14098
14099    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14100    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14101      # Do we have a bin/java?
14102      if test ! -x "$BOOT_JDK/bin/java"; then
14103        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14105        BOOT_JDK_FOUND=no
14106      else
14107        # Do we have a bin/javac?
14108        if test ! -x "$BOOT_JDK/bin/javac"; then
14109          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14111          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14112$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14113          BOOT_JDK_FOUND=no
14114        else
14115          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14116          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14117            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14119            BOOT_JDK_FOUND=no
14120          else
14121            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14122            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14123
14124            # Extra M4 quote needed to protect [] in grep expression.
14125            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14126            if test "x$FOUND_VERSION_78" = x; then
14127              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14129              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14130$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14131              BOOT_JDK_FOUND=no
14132            else
14133              # We're done! :-)
14134              BOOT_JDK_FOUND=yes
14135
14136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14137
14138  # Input might be given as Windows format, start by converting to
14139  # unix format.
14140  path="$BOOT_JDK"
14141  new_path=`$CYGPATH -u "$path"`
14142
14143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14146  # "foo.exe" is OK but "foo" is an error.
14147  #
14148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14149  # It is also a way to make sure we got the proper file name for the real test later on.
14150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14151  if test "x$test_shortpath" = x; then
14152    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14154    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14155  fi
14156
14157  # Call helper function which possibly converts this using DOS-style short mode.
14158  # If so, the updated path is stored in $new_path.
14159
14160  input_path="$new_path"
14161  # Check if we need to convert this using DOS-style short mode. If the path
14162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14163  # take no chances and rewrite it.
14164  # Note: m4 eats our [], so we need to use [ and ] instead.
14165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14166  if test "x$has_forbidden_chars" != x; then
14167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14171      # Going to short mode and back again did indeed matter. Since short mode is
14172      # case insensitive, let's make it lowercase to improve readability.
14173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14174      # Now convert it back to Unix-stile (cygpath)
14175      input_path=`$CYGPATH -u "$shortmode_path"`
14176      new_path="$input_path"
14177    fi
14178  fi
14179
14180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14181  if test "x$test_cygdrive_prefix" = x; then
14182    # As a simple fix, exclude /usr/bin since it's not a real path.
14183    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14185      # a path prefixed by /cygdrive for fixpath to work.
14186      new_path="$CYGWIN_ROOT_PATH$input_path"
14187    fi
14188  fi
14189
14190
14191  if test "x$path" != "x$new_path"; then
14192    BOOT_JDK="$new_path"
14193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14195  fi
14196
14197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14198
14199  path="$BOOT_JDK"
14200  has_colon=`$ECHO $path | $GREP ^.:`
14201  new_path="$path"
14202  if test "x$has_colon" = x; then
14203    # Not in mixed or Windows style, start by that.
14204    new_path=`cmd //c echo $path`
14205  fi
14206
14207
14208  input_path="$new_path"
14209  # Check if we need to convert this using DOS-style short mode. If the path
14210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14211  # take no chances and rewrite it.
14212  # Note: m4 eats our [], so we need to use [ and ] instead.
14213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14214  if test "x$has_forbidden_chars" != x; then
14215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14217  fi
14218
14219
14220  windows_path="$new_path"
14221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14222    unix_path=`$CYGPATH -u "$windows_path"`
14223    new_path="$unix_path"
14224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14226    new_path="$unix_path"
14227  fi
14228
14229  if test "x$path" != "x$new_path"; then
14230    BOOT_JDK="$new_path"
14231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14233  fi
14234
14235  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14236  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14237
14238  else
14239    # We're on a posix platform. Hooray! :)
14240    path="$BOOT_JDK"
14241    has_space=`$ECHO "$path" | $GREP " "`
14242    if test "x$has_space" != x; then
14243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14245      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14246    fi
14247
14248    # Use eval to expand a potential ~
14249    eval path="$path"
14250    if test ! -f "$path" && test ! -d "$path"; then
14251      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14252    fi
14253
14254    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14255  fi
14256
14257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14258$as_echo_n "checking for Boot JDK... " >&6; }
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14260$as_echo "$BOOT_JDK" >&6; }
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14262$as_echo_n "checking Boot JDK version... " >&6; }
14263              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14264              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14265$as_echo "$BOOT_JDK_VERSION" >&6; }
14266            fi # end check jdk version
14267          fi # end check rt.jar
14268        fi # end check javac
14269      fi # end check java
14270    fi # end check boot jdk found
14271  fi
14272
14273  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14274
14275  if test "x$BOOT_JDK_FOUND" = xno; then
14276    # Now execute the test
14277
14278  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14279  BOOT_JDK_SUFFIX="/Contents/Home"
14280  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14281  if test "x$ALL_JDKS_FOUND" != x; then
14282    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14283
14284  if test "x$BOOT_JDK_FOUND" = xno; then
14285    # Now execute the test
14286
14287        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14288        if test -d "$BOOT_JDK"; then
14289          BOOT_JDK_FOUND=maybe
14290          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14291$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14292        fi
14293
14294
14295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14297      # Do we have a bin/java?
14298      if test ! -x "$BOOT_JDK/bin/java"; then
14299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14301        BOOT_JDK_FOUND=no
14302      else
14303        # Do we have a bin/javac?
14304        if test ! -x "$BOOT_JDK/bin/javac"; then
14305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14309          BOOT_JDK_FOUND=no
14310        else
14311          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14312          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14313            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14315            BOOT_JDK_FOUND=no
14316          else
14317            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14319
14320            # Extra M4 quote needed to protect [] in grep expression.
14321            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14322            if test "x$FOUND_VERSION_78" = x; then
14323              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14325              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14326$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14327              BOOT_JDK_FOUND=no
14328            else
14329              # We're done! :-)
14330              BOOT_JDK_FOUND=yes
14331
14332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14333
14334  # Input might be given as Windows format, start by converting to
14335  # unix format.
14336  path="$BOOT_JDK"
14337  new_path=`$CYGPATH -u "$path"`
14338
14339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14342  # "foo.exe" is OK but "foo" is an error.
14343  #
14344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14345  # It is also a way to make sure we got the proper file name for the real test later on.
14346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14347  if test "x$test_shortpath" = x; then
14348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14351  fi
14352
14353  # Call helper function which possibly converts this using DOS-style short mode.
14354  # If so, the updated path is stored in $new_path.
14355
14356  input_path="$new_path"
14357  # Check if we need to convert this using DOS-style short mode. If the path
14358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14359  # take no chances and rewrite it.
14360  # Note: m4 eats our [], so we need to use [ and ] instead.
14361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14362  if test "x$has_forbidden_chars" != x; then
14363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14367      # Going to short mode and back again did indeed matter. Since short mode is
14368      # case insensitive, let's make it lowercase to improve readability.
14369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14370      # Now convert it back to Unix-stile (cygpath)
14371      input_path=`$CYGPATH -u "$shortmode_path"`
14372      new_path="$input_path"
14373    fi
14374  fi
14375
14376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14377  if test "x$test_cygdrive_prefix" = x; then
14378    # As a simple fix, exclude /usr/bin since it's not a real path.
14379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14381      # a path prefixed by /cygdrive for fixpath to work.
14382      new_path="$CYGWIN_ROOT_PATH$input_path"
14383    fi
14384  fi
14385
14386
14387  if test "x$path" != "x$new_path"; then
14388    BOOT_JDK="$new_path"
14389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14391  fi
14392
14393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14394
14395  path="$BOOT_JDK"
14396  has_colon=`$ECHO $path | $GREP ^.:`
14397  new_path="$path"
14398  if test "x$has_colon" = x; then
14399    # Not in mixed or Windows style, start by that.
14400    new_path=`cmd //c echo $path`
14401  fi
14402
14403
14404  input_path="$new_path"
14405  # Check if we need to convert this using DOS-style short mode. If the path
14406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14407  # take no chances and rewrite it.
14408  # Note: m4 eats our [], so we need to use [ and ] instead.
14409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14410  if test "x$has_forbidden_chars" != x; then
14411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14413  fi
14414
14415
14416  windows_path="$new_path"
14417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14418    unix_path=`$CYGPATH -u "$windows_path"`
14419    new_path="$unix_path"
14420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14422    new_path="$unix_path"
14423  fi
14424
14425  if test "x$path" != "x$new_path"; then
14426    BOOT_JDK="$new_path"
14427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14429  fi
14430
14431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14433
14434  else
14435    # We're on a posix platform. Hooray! :)
14436    path="$BOOT_JDK"
14437    has_space=`$ECHO "$path" | $GREP " "`
14438    if test "x$has_space" != x; then
14439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14442    fi
14443
14444    # Use eval to expand a potential ~
14445    eval path="$path"
14446    if test ! -f "$path" && test ! -d "$path"; then
14447      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14448    fi
14449
14450    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14451  fi
14452
14453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14454$as_echo_n "checking for Boot JDK... " >&6; }
14455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14456$as_echo "$BOOT_JDK" >&6; }
14457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14458$as_echo_n "checking Boot JDK version... " >&6; }
14459              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14461$as_echo "$BOOT_JDK_VERSION" >&6; }
14462            fi # end check jdk version
14463          fi # end check rt.jar
14464        fi # end check javac
14465      fi # end check java
14466    fi # end check boot jdk found
14467  fi
14468
14469    done
14470  fi
14471
14472
14473    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14474    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14475      # Do we have a bin/java?
14476      if test ! -x "$BOOT_JDK/bin/java"; then
14477        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14479        BOOT_JDK_FOUND=no
14480      else
14481        # Do we have a bin/javac?
14482        if test ! -x "$BOOT_JDK/bin/javac"; then
14483          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14485          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14486$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14487          BOOT_JDK_FOUND=no
14488        else
14489          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14490          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14491            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14493            BOOT_JDK_FOUND=no
14494          else
14495            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14497
14498            # Extra M4 quote needed to protect [] in grep expression.
14499            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14500            if test "x$FOUND_VERSION_78" = x; then
14501              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14503              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14504$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14505              BOOT_JDK_FOUND=no
14506            else
14507              # We're done! :-)
14508              BOOT_JDK_FOUND=yes
14509
14510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14511
14512  # Input might be given as Windows format, start by converting to
14513  # unix format.
14514  path="$BOOT_JDK"
14515  new_path=`$CYGPATH -u "$path"`
14516
14517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14520  # "foo.exe" is OK but "foo" is an error.
14521  #
14522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14523  # It is also a way to make sure we got the proper file name for the real test later on.
14524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14525  if test "x$test_shortpath" = x; then
14526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14529  fi
14530
14531  # Call helper function which possibly converts this using DOS-style short mode.
14532  # If so, the updated path is stored in $new_path.
14533
14534  input_path="$new_path"
14535  # Check if we need to convert this using DOS-style short mode. If the path
14536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14537  # take no chances and rewrite it.
14538  # Note: m4 eats our [], so we need to use [ and ] instead.
14539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14540  if test "x$has_forbidden_chars" != x; then
14541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14545      # Going to short mode and back again did indeed matter. Since short mode is
14546      # case insensitive, let's make it lowercase to improve readability.
14547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14548      # Now convert it back to Unix-stile (cygpath)
14549      input_path=`$CYGPATH -u "$shortmode_path"`
14550      new_path="$input_path"
14551    fi
14552  fi
14553
14554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14555  if test "x$test_cygdrive_prefix" = x; then
14556    # As a simple fix, exclude /usr/bin since it's not a real path.
14557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14559      # a path prefixed by /cygdrive for fixpath to work.
14560      new_path="$CYGWIN_ROOT_PATH$input_path"
14561    fi
14562  fi
14563
14564
14565  if test "x$path" != "x$new_path"; then
14566    BOOT_JDK="$new_path"
14567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14569  fi
14570
14571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14572
14573  path="$BOOT_JDK"
14574  has_colon=`$ECHO $path | $GREP ^.:`
14575  new_path="$path"
14576  if test "x$has_colon" = x; then
14577    # Not in mixed or Windows style, start by that.
14578    new_path=`cmd //c echo $path`
14579  fi
14580
14581
14582  input_path="$new_path"
14583  # Check if we need to convert this using DOS-style short mode. If the path
14584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14585  # take no chances and rewrite it.
14586  # Note: m4 eats our [], so we need to use [ and ] instead.
14587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14588  if test "x$has_forbidden_chars" != x; then
14589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14591  fi
14592
14593
14594  windows_path="$new_path"
14595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14596    unix_path=`$CYGPATH -u "$windows_path"`
14597    new_path="$unix_path"
14598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14600    new_path="$unix_path"
14601  fi
14602
14603  if test "x$path" != "x$new_path"; then
14604    BOOT_JDK="$new_path"
14605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14607  fi
14608
14609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14611
14612  else
14613    # We're on a posix platform. Hooray! :)
14614    path="$BOOT_JDK"
14615    has_space=`$ECHO "$path" | $GREP " "`
14616    if test "x$has_space" != x; then
14617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14619      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14620    fi
14621
14622    # Use eval to expand a potential ~
14623    eval path="$path"
14624    if test ! -f "$path" && test ! -d "$path"; then
14625      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14626    fi
14627
14628    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14629  fi
14630
14631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14632$as_echo_n "checking for Boot JDK... " >&6; }
14633              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14634$as_echo "$BOOT_JDK" >&6; }
14635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14636$as_echo_n "checking Boot JDK version... " >&6; }
14637              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14638              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14639$as_echo "$BOOT_JDK_VERSION" >&6; }
14640            fi # end check jdk version
14641          fi # end check rt.jar
14642        fi # end check javac
14643      fi # end check java
14644    fi # end check boot jdk found
14645  fi
14646
14647
14648  if test "x$BOOT_JDK_FOUND" = xno; then
14649    # Now execute the test
14650
14651  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14652  BOOT_JDK_SUFFIX="/Contents/Home"
14653  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14654  if test "x$ALL_JDKS_FOUND" != x; then
14655    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14656
14657  if test "x$BOOT_JDK_FOUND" = xno; then
14658    # Now execute the test
14659
14660        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14661        if test -d "$BOOT_JDK"; then
14662          BOOT_JDK_FOUND=maybe
14663          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14664$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14665        fi
14666
14667
14668    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14669    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14670      # Do we have a bin/java?
14671      if test ! -x "$BOOT_JDK/bin/java"; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14674        BOOT_JDK_FOUND=no
14675      else
14676        # Do we have a bin/javac?
14677        if test ! -x "$BOOT_JDK/bin/javac"; then
14678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14680          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14681$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14682          BOOT_JDK_FOUND=no
14683        else
14684          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14685          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14686            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14688            BOOT_JDK_FOUND=no
14689          else
14690            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14692
14693            # Extra M4 quote needed to protect [] in grep expression.
14694            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14695            if test "x$FOUND_VERSION_78" = x; then
14696              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14698              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14699$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14700              BOOT_JDK_FOUND=no
14701            else
14702              # We're done! :-)
14703              BOOT_JDK_FOUND=yes
14704
14705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14706
14707  # Input might be given as Windows format, start by converting to
14708  # unix format.
14709  path="$BOOT_JDK"
14710  new_path=`$CYGPATH -u "$path"`
14711
14712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14715  # "foo.exe" is OK but "foo" is an error.
14716  #
14717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14718  # It is also a way to make sure we got the proper file name for the real test later on.
14719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14720  if test "x$test_shortpath" = x; then
14721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14723    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14724  fi
14725
14726  # Call helper function which possibly converts this using DOS-style short mode.
14727  # If so, the updated path is stored in $new_path.
14728
14729  input_path="$new_path"
14730  # Check if we need to convert this using DOS-style short mode. If the path
14731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14732  # take no chances and rewrite it.
14733  # Note: m4 eats our [], so we need to use [ and ] instead.
14734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14735  if test "x$has_forbidden_chars" != x; then
14736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14740      # Going to short mode and back again did indeed matter. Since short mode is
14741      # case insensitive, let's make it lowercase to improve readability.
14742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14743      # Now convert it back to Unix-stile (cygpath)
14744      input_path=`$CYGPATH -u "$shortmode_path"`
14745      new_path="$input_path"
14746    fi
14747  fi
14748
14749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14750  if test "x$test_cygdrive_prefix" = x; then
14751    # As a simple fix, exclude /usr/bin since it's not a real path.
14752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14754      # a path prefixed by /cygdrive for fixpath to work.
14755      new_path="$CYGWIN_ROOT_PATH$input_path"
14756    fi
14757  fi
14758
14759
14760  if test "x$path" != "x$new_path"; then
14761    BOOT_JDK="$new_path"
14762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14764  fi
14765
14766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14767
14768  path="$BOOT_JDK"
14769  has_colon=`$ECHO $path | $GREP ^.:`
14770  new_path="$path"
14771  if test "x$has_colon" = x; then
14772    # Not in mixed or Windows style, start by that.
14773    new_path=`cmd //c echo $path`
14774  fi
14775
14776
14777  input_path="$new_path"
14778  # Check if we need to convert this using DOS-style short mode. If the path
14779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14780  # take no chances and rewrite it.
14781  # Note: m4 eats our [], so we need to use [ and ] instead.
14782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14783  if test "x$has_forbidden_chars" != x; then
14784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786  fi
14787
14788
14789  windows_path="$new_path"
14790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14791    unix_path=`$CYGPATH -u "$windows_path"`
14792    new_path="$unix_path"
14793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14795    new_path="$unix_path"
14796  fi
14797
14798  if test "x$path" != "x$new_path"; then
14799    BOOT_JDK="$new_path"
14800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14802  fi
14803
14804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14806
14807  else
14808    # We're on a posix platform. Hooray! :)
14809    path="$BOOT_JDK"
14810    has_space=`$ECHO "$path" | $GREP " "`
14811    if test "x$has_space" != x; then
14812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14814      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14815    fi
14816
14817    # Use eval to expand a potential ~
14818    eval path="$path"
14819    if test ! -f "$path" && test ! -d "$path"; then
14820      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14821    fi
14822
14823    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14824  fi
14825
14826              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14827$as_echo_n "checking for Boot JDK... " >&6; }
14828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14829$as_echo "$BOOT_JDK" >&6; }
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14831$as_echo_n "checking Boot JDK version... " >&6; }
14832              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14834$as_echo "$BOOT_JDK_VERSION" >&6; }
14835            fi # end check jdk version
14836          fi # end check rt.jar
14837        fi # end check javac
14838      fi # end check java
14839    fi # end check boot jdk found
14840  fi
14841
14842    done
14843  fi
14844
14845
14846    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14847    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14848      # Do we have a bin/java?
14849      if test ! -x "$BOOT_JDK/bin/java"; then
14850        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14852        BOOT_JDK_FOUND=no
14853      else
14854        # Do we have a bin/javac?
14855        if test ! -x "$BOOT_JDK/bin/javac"; then
14856          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14858          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14859$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14860          BOOT_JDK_FOUND=no
14861        else
14862          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14863          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14864            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14866            BOOT_JDK_FOUND=no
14867          else
14868            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14869            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14870
14871            # Extra M4 quote needed to protect [] in grep expression.
14872            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14873            if test "x$FOUND_VERSION_78" = x; then
14874              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14876              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14877$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14878              BOOT_JDK_FOUND=no
14879            else
14880              # We're done! :-)
14881              BOOT_JDK_FOUND=yes
14882
14883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14884
14885  # Input might be given as Windows format, start by converting to
14886  # unix format.
14887  path="$BOOT_JDK"
14888  new_path=`$CYGPATH -u "$path"`
14889
14890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14893  # "foo.exe" is OK but "foo" is an error.
14894  #
14895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14896  # It is also a way to make sure we got the proper file name for the real test later on.
14897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14898  if test "x$test_shortpath" = x; then
14899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14902  fi
14903
14904  # Call helper function which possibly converts this using DOS-style short mode.
14905  # If so, the updated path is stored in $new_path.
14906
14907  input_path="$new_path"
14908  # Check if we need to convert this using DOS-style short mode. If the path
14909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14910  # take no chances and rewrite it.
14911  # Note: m4 eats our [], so we need to use [ and ] instead.
14912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14913  if test "x$has_forbidden_chars" != x; then
14914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14918      # Going to short mode and back again did indeed matter. Since short mode is
14919      # case insensitive, let's make it lowercase to improve readability.
14920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14921      # Now convert it back to Unix-stile (cygpath)
14922      input_path=`$CYGPATH -u "$shortmode_path"`
14923      new_path="$input_path"
14924    fi
14925  fi
14926
14927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14928  if test "x$test_cygdrive_prefix" = x; then
14929    # As a simple fix, exclude /usr/bin since it's not a real path.
14930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14932      # a path prefixed by /cygdrive for fixpath to work.
14933      new_path="$CYGWIN_ROOT_PATH$input_path"
14934    fi
14935  fi
14936
14937
14938  if test "x$path" != "x$new_path"; then
14939    BOOT_JDK="$new_path"
14940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14942  fi
14943
14944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14945
14946  path="$BOOT_JDK"
14947  has_colon=`$ECHO $path | $GREP ^.:`
14948  new_path="$path"
14949  if test "x$has_colon" = x; then
14950    # Not in mixed or Windows style, start by that.
14951    new_path=`cmd //c echo $path`
14952  fi
14953
14954
14955  input_path="$new_path"
14956  # Check if we need to convert this using DOS-style short mode. If the path
14957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14958  # take no chances and rewrite it.
14959  # Note: m4 eats our [], so we need to use [ and ] instead.
14960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14961  if test "x$has_forbidden_chars" != x; then
14962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14964  fi
14965
14966
14967  windows_path="$new_path"
14968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14969    unix_path=`$CYGPATH -u "$windows_path"`
14970    new_path="$unix_path"
14971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14973    new_path="$unix_path"
14974  fi
14975
14976  if test "x$path" != "x$new_path"; then
14977    BOOT_JDK="$new_path"
14978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14980  fi
14981
14982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14984
14985  else
14986    # We're on a posix platform. Hooray! :)
14987    path="$BOOT_JDK"
14988    has_space=`$ECHO "$path" | $GREP " "`
14989    if test "x$has_space" != x; then
14990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14992      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14993    fi
14994
14995    # Use eval to expand a potential ~
14996    eval path="$path"
14997    if test ! -f "$path" && test ! -d "$path"; then
14998      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14999    fi
15000
15001    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15002  fi
15003
15004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15005$as_echo_n "checking for Boot JDK... " >&6; }
15006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15007$as_echo "$BOOT_JDK" >&6; }
15008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15009$as_echo_n "checking Boot JDK version... " >&6; }
15010              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15012$as_echo "$BOOT_JDK_VERSION" >&6; }
15013            fi # end check jdk version
15014          fi # end check rt.jar
15015        fi # end check javac
15016      fi # end check java
15017    fi # end check boot jdk found
15018  fi
15019
15020  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15021
15022  if test "x$BOOT_JDK_FOUND" = xno; then
15023    # Now execute the test
15024
15025  BOOT_JDK_PREFIX="/usr/lib/jvm"
15026  BOOT_JDK_SUFFIX=""
15027  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15028  if test "x$ALL_JDKS_FOUND" != x; then
15029    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15030
15031  if test "x$BOOT_JDK_FOUND" = xno; then
15032    # Now execute the test
15033
15034        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15035        if test -d "$BOOT_JDK"; then
15036          BOOT_JDK_FOUND=maybe
15037          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15038$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15039        fi
15040
15041
15042    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15043    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15044      # Do we have a bin/java?
15045      if test ! -x "$BOOT_JDK/bin/java"; then
15046        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15048        BOOT_JDK_FOUND=no
15049      else
15050        # Do we have a bin/javac?
15051        if test ! -x "$BOOT_JDK/bin/javac"; then
15052          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15054          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15055$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15056          BOOT_JDK_FOUND=no
15057        else
15058          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15059          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15060            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15062            BOOT_JDK_FOUND=no
15063          else
15064            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15065            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15066
15067            # Extra M4 quote needed to protect [] in grep expression.
15068            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15069            if test "x$FOUND_VERSION_78" = x; then
15070              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15072              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15073$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15074              BOOT_JDK_FOUND=no
15075            else
15076              # We're done! :-)
15077              BOOT_JDK_FOUND=yes
15078
15079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15080
15081  # Input might be given as Windows format, start by converting to
15082  # unix format.
15083  path="$BOOT_JDK"
15084  new_path=`$CYGPATH -u "$path"`
15085
15086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15089  # "foo.exe" is OK but "foo" is an error.
15090  #
15091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15092  # It is also a way to make sure we got the proper file name for the real test later on.
15093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15094  if test "x$test_shortpath" = x; then
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15098  fi
15099
15100  # Call helper function which possibly converts this using DOS-style short mode.
15101  # If so, the updated path is stored in $new_path.
15102
15103  input_path="$new_path"
15104  # Check if we need to convert this using DOS-style short mode. If the path
15105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15106  # take no chances and rewrite it.
15107  # Note: m4 eats our [], so we need to use [ and ] instead.
15108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15109  if test "x$has_forbidden_chars" != x; then
15110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15114      # Going to short mode and back again did indeed matter. Since short mode is
15115      # case insensitive, let's make it lowercase to improve readability.
15116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15117      # Now convert it back to Unix-stile (cygpath)
15118      input_path=`$CYGPATH -u "$shortmode_path"`
15119      new_path="$input_path"
15120    fi
15121  fi
15122
15123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15124  if test "x$test_cygdrive_prefix" = x; then
15125    # As a simple fix, exclude /usr/bin since it's not a real path.
15126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15128      # a path prefixed by /cygdrive for fixpath to work.
15129      new_path="$CYGWIN_ROOT_PATH$input_path"
15130    fi
15131  fi
15132
15133
15134  if test "x$path" != "x$new_path"; then
15135    BOOT_JDK="$new_path"
15136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15138  fi
15139
15140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15141
15142  path="$BOOT_JDK"
15143  has_colon=`$ECHO $path | $GREP ^.:`
15144  new_path="$path"
15145  if test "x$has_colon" = x; then
15146    # Not in mixed or Windows style, start by that.
15147    new_path=`cmd //c echo $path`
15148  fi
15149
15150
15151  input_path="$new_path"
15152  # Check if we need to convert this using DOS-style short mode. If the path
15153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15154  # take no chances and rewrite it.
15155  # Note: m4 eats our [], so we need to use [ and ] instead.
15156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15157  if test "x$has_forbidden_chars" != x; then
15158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15160  fi
15161
15162
15163  windows_path="$new_path"
15164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15165    unix_path=`$CYGPATH -u "$windows_path"`
15166    new_path="$unix_path"
15167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15169    new_path="$unix_path"
15170  fi
15171
15172  if test "x$path" != "x$new_path"; then
15173    BOOT_JDK="$new_path"
15174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15176  fi
15177
15178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15180
15181  else
15182    # We're on a posix platform. Hooray! :)
15183    path="$BOOT_JDK"
15184    has_space=`$ECHO "$path" | $GREP " "`
15185    if test "x$has_space" != x; then
15186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15189    fi
15190
15191    # Use eval to expand a potential ~
15192    eval path="$path"
15193    if test ! -f "$path" && test ! -d "$path"; then
15194      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15195    fi
15196
15197    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15198  fi
15199
15200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15201$as_echo_n "checking for Boot JDK... " >&6; }
15202              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15203$as_echo "$BOOT_JDK" >&6; }
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15205$as_echo_n "checking Boot JDK version... " >&6; }
15206              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15208$as_echo "$BOOT_JDK_VERSION" >&6; }
15209            fi # end check jdk version
15210          fi # end check rt.jar
15211        fi # end check javac
15212      fi # end check java
15213    fi # end check boot jdk found
15214  fi
15215
15216    done
15217  fi
15218
15219
15220    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15221    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15222      # Do we have a bin/java?
15223      if test ! -x "$BOOT_JDK/bin/java"; then
15224        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15226        BOOT_JDK_FOUND=no
15227      else
15228        # Do we have a bin/javac?
15229        if test ! -x "$BOOT_JDK/bin/javac"; then
15230          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15232          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15233$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15234          BOOT_JDK_FOUND=no
15235        else
15236          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15237          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15238            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15240            BOOT_JDK_FOUND=no
15241          else
15242            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15243            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15244
15245            # Extra M4 quote needed to protect [] in grep expression.
15246            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15247            if test "x$FOUND_VERSION_78" = x; then
15248              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15250              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15251$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15252              BOOT_JDK_FOUND=no
15253            else
15254              # We're done! :-)
15255              BOOT_JDK_FOUND=yes
15256
15257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15258
15259  # Input might be given as Windows format, start by converting to
15260  # unix format.
15261  path="$BOOT_JDK"
15262  new_path=`$CYGPATH -u "$path"`
15263
15264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15267  # "foo.exe" is OK but "foo" is an error.
15268  #
15269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15270  # It is also a way to make sure we got the proper file name for the real test later on.
15271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15272  if test "x$test_shortpath" = x; then
15273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15275    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15276  fi
15277
15278  # Call helper function which possibly converts this using DOS-style short mode.
15279  # If so, the updated path is stored in $new_path.
15280
15281  input_path="$new_path"
15282  # Check if we need to convert this using DOS-style short mode. If the path
15283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15284  # take no chances and rewrite it.
15285  # Note: m4 eats our [], so we need to use [ and ] instead.
15286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15287  if test "x$has_forbidden_chars" != x; then
15288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15292      # Going to short mode and back again did indeed matter. Since short mode is
15293      # case insensitive, let's make it lowercase to improve readability.
15294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15295      # Now convert it back to Unix-stile (cygpath)
15296      input_path=`$CYGPATH -u "$shortmode_path"`
15297      new_path="$input_path"
15298    fi
15299  fi
15300
15301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15302  if test "x$test_cygdrive_prefix" = x; then
15303    # As a simple fix, exclude /usr/bin since it's not a real path.
15304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15306      # a path prefixed by /cygdrive for fixpath to work.
15307      new_path="$CYGWIN_ROOT_PATH$input_path"
15308    fi
15309  fi
15310
15311
15312  if test "x$path" != "x$new_path"; then
15313    BOOT_JDK="$new_path"
15314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15316  fi
15317
15318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15319
15320  path="$BOOT_JDK"
15321  has_colon=`$ECHO $path | $GREP ^.:`
15322  new_path="$path"
15323  if test "x$has_colon" = x; then
15324    # Not in mixed or Windows style, start by that.
15325    new_path=`cmd //c echo $path`
15326  fi
15327
15328
15329  input_path="$new_path"
15330  # Check if we need to convert this using DOS-style short mode. If the path
15331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15332  # take no chances and rewrite it.
15333  # Note: m4 eats our [], so we need to use [ and ] instead.
15334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15335  if test "x$has_forbidden_chars" != x; then
15336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15338  fi
15339
15340
15341  windows_path="$new_path"
15342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15343    unix_path=`$CYGPATH -u "$windows_path"`
15344    new_path="$unix_path"
15345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15347    new_path="$unix_path"
15348  fi
15349
15350  if test "x$path" != "x$new_path"; then
15351    BOOT_JDK="$new_path"
15352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15354  fi
15355
15356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15358
15359  else
15360    # We're on a posix platform. Hooray! :)
15361    path="$BOOT_JDK"
15362    has_space=`$ECHO "$path" | $GREP " "`
15363    if test "x$has_space" != x; then
15364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15367    fi
15368
15369    # Use eval to expand a potential ~
15370    eval path="$path"
15371    if test ! -f "$path" && test ! -d "$path"; then
15372      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15373    fi
15374
15375    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15376  fi
15377
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15379$as_echo_n "checking for Boot JDK... " >&6; }
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15381$as_echo "$BOOT_JDK" >&6; }
15382              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15383$as_echo_n "checking Boot JDK version... " >&6; }
15384              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15385              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15386$as_echo "$BOOT_JDK_VERSION" >&6; }
15387            fi # end check jdk version
15388          fi # end check rt.jar
15389        fi # end check javac
15390      fi # end check java
15391    fi # end check boot jdk found
15392  fi
15393
15394  fi
15395
15396
15397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15399      # Do we have a bin/java?
15400      if test ! -x "$BOOT_JDK/bin/java"; then
15401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15403        BOOT_JDK_FOUND=no
15404      else
15405        # Do we have a bin/javac?
15406        if test ! -x "$BOOT_JDK/bin/javac"; then
15407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15411          BOOT_JDK_FOUND=no
15412        else
15413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15417            BOOT_JDK_FOUND=no
15418          else
15419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15421
15422            # Extra M4 quote needed to protect [] in grep expression.
15423            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15424            if test "x$FOUND_VERSION_78" = x; then
15425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15428$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15429              BOOT_JDK_FOUND=no
15430            else
15431              # We're done! :-)
15432              BOOT_JDK_FOUND=yes
15433
15434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15435
15436  # Input might be given as Windows format, start by converting to
15437  # unix format.
15438  path="$BOOT_JDK"
15439  new_path=`$CYGPATH -u "$path"`
15440
15441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15444  # "foo.exe" is OK but "foo" is an error.
15445  #
15446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15447  # It is also a way to make sure we got the proper file name for the real test later on.
15448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15449  if test "x$test_shortpath" = x; then
15450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15453  fi
15454
15455  # Call helper function which possibly converts this using DOS-style short mode.
15456  # If so, the updated path is stored in $new_path.
15457
15458  input_path="$new_path"
15459  # Check if we need to convert this using DOS-style short mode. If the path
15460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15461  # take no chances and rewrite it.
15462  # Note: m4 eats our [], so we need to use [ and ] instead.
15463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15464  if test "x$has_forbidden_chars" != x; then
15465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15469      # Going to short mode and back again did indeed matter. Since short mode is
15470      # case insensitive, let's make it lowercase to improve readability.
15471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15472      # Now convert it back to Unix-stile (cygpath)
15473      input_path=`$CYGPATH -u "$shortmode_path"`
15474      new_path="$input_path"
15475    fi
15476  fi
15477
15478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15479  if test "x$test_cygdrive_prefix" = x; then
15480    # As a simple fix, exclude /usr/bin since it's not a real path.
15481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15483      # a path prefixed by /cygdrive for fixpath to work.
15484      new_path="$CYGWIN_ROOT_PATH$input_path"
15485    fi
15486  fi
15487
15488
15489  if test "x$path" != "x$new_path"; then
15490    BOOT_JDK="$new_path"
15491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15493  fi
15494
15495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15496
15497  path="$BOOT_JDK"
15498  has_colon=`$ECHO $path | $GREP ^.:`
15499  new_path="$path"
15500  if test "x$has_colon" = x; then
15501    # Not in mixed or Windows style, start by that.
15502    new_path=`cmd //c echo $path`
15503  fi
15504
15505
15506  input_path="$new_path"
15507  # Check if we need to convert this using DOS-style short mode. If the path
15508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15509  # take no chances and rewrite it.
15510  # Note: m4 eats our [], so we need to use [ and ] instead.
15511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15512  if test "x$has_forbidden_chars" != x; then
15513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15515  fi
15516
15517
15518  windows_path="$new_path"
15519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15520    unix_path=`$CYGPATH -u "$windows_path"`
15521    new_path="$unix_path"
15522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15524    new_path="$unix_path"
15525  fi
15526
15527  if test "x$path" != "x$new_path"; then
15528    BOOT_JDK="$new_path"
15529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15531  fi
15532
15533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15535
15536  else
15537    # We're on a posix platform. Hooray! :)
15538    path="$BOOT_JDK"
15539    has_space=`$ECHO "$path" | $GREP " "`
15540    if test "x$has_space" != x; then
15541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15544    fi
15545
15546    # Use eval to expand a potential ~
15547    eval path="$path"
15548    if test ! -f "$path" && test ! -d "$path"; then
15549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15550    fi
15551
15552    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15553  fi
15554
15555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15556$as_echo_n "checking for Boot JDK... " >&6; }
15557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15558$as_echo "$BOOT_JDK" >&6; }
15559              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15560$as_echo_n "checking Boot JDK version... " >&6; }
15561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15563$as_echo "$BOOT_JDK_VERSION" >&6; }
15564            fi # end check jdk version
15565          fi # end check rt.jar
15566        fi # end check javac
15567      fi # end check java
15568    fi # end check boot jdk found
15569  fi
15570
15571
15572# If we haven't found anything yet, we've truly lost. Give up.
15573if test "x$BOOT_JDK_FOUND" = xno; then
15574
15575    # Print a helpful message on how to acquire the necessary build dependency.
15576    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15577    MISSING_DEPENDENCY=openjdk
15578    PKGHANDLER_COMMAND=
15579
15580    case $PKGHANDLER in
15581	apt-get)
15582                apt_help     $MISSING_DEPENDENCY ;;
15583    yum)
15584                yum_help     $MISSING_DEPENDENCY ;;
15585	port)
15586                port_help    $MISSING_DEPENDENCY ;;
15587	pkgutil)
15588                pkgutil_help $MISSING_DEPENDENCY ;;
15589	pkgadd)
15590                pkgadd_help  $MISSING_DEPENDENCY ;;
15591    * )
15592      break ;;
15593    esac
15594
15595    if test "x$PKGHANDLER_COMMAND" != x; then
15596        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15597    fi
15598
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15600$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15601  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15602$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15603  as_fn_error $? "Cannot continue" "$LINENO" 5
15604fi
15605
15606# Setup proper paths for what we found
15607BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15608if test ! -f "$BOOT_RTJAR"; then
15609    # On MacOSX it is called classes.jar
15610    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15611    if test -f "$BOOT_RTJAR"; then
15612      # Remove the ..
15613      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15614    fi
15615fi
15616BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15617BOOT_JDK="$BOOT_JDK"
15618
15619
15620
15621
15622# Setup tools from the Boot JDK.
15623
15624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15625$as_echo_n "checking for java in Boot JDK... " >&6; }
15626  JAVA=$BOOT_JDK/bin/java
15627  if test ! -x $JAVA; then
15628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15629$as_echo "not found" >&6; }
15630      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15631$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15632      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15633  fi
15634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15635$as_echo "ok" >&6; }
15636
15637
15638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15639$as_echo_n "checking for javac in Boot JDK... " >&6; }
15640  JAVAC=$BOOT_JDK/bin/javac
15641  if test ! -x $JAVAC; then
15642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15643$as_echo "not found" >&6; }
15644      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15645$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15646      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15647  fi
15648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15649$as_echo "ok" >&6; }
15650
15651
15652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15653$as_echo_n "checking for javah in Boot JDK... " >&6; }
15654  JAVAH=$BOOT_JDK/bin/javah
15655  if test ! -x $JAVAH; then
15656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15657$as_echo "not found" >&6; }
15658      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15659$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15660      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15661  fi
15662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15663$as_echo "ok" >&6; }
15664
15665
15666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15667$as_echo_n "checking for javap in Boot JDK... " >&6; }
15668  JAVAP=$BOOT_JDK/bin/javap
15669  if test ! -x $JAVAP; then
15670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15671$as_echo "not found" >&6; }
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15673$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15674      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15675  fi
15676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15677$as_echo "ok" >&6; }
15678
15679
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15681$as_echo_n "checking for jar in Boot JDK... " >&6; }
15682  JAR=$BOOT_JDK/bin/jar
15683  if test ! -x $JAR; then
15684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15685$as_echo "not found" >&6; }
15686      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15688      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15689  fi
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15691$as_echo "ok" >&6; }
15692
15693
15694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15695$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15696  RMIC=$BOOT_JDK/bin/rmic
15697  if test ! -x $RMIC; then
15698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15699$as_echo "not found" >&6; }
15700      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15701$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15702      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15703  fi
15704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15705$as_echo "ok" >&6; }
15706
15707
15708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15709$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15710  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15711  if test ! -x $NATIVE2ASCII; then
15712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15713$as_echo "not found" >&6; }
15714      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15715$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15716      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15717  fi
15718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15719$as_echo "ok" >&6; }
15720
15721
15722# Finally, set some other options...
15723
15724# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15725BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15726
15727
15728
15729
15730##############################################################################
15731#
15732# Specify options for anything that is run with the Boot JDK.
15733#
15734
15735# Check whether --with-boot-jdk-jvmargs was given.
15736if test "${with_boot_jdk_jvmargs+set}" = set; then :
15737  withval=$with_boot_jdk_jvmargs;
15738fi
15739
15740
15741if test "x$with_boot_jdk_jvmargs" = x; then
15742    # Not all JVM:s accept the same arguments on the command line.
15743    # OpenJDK specific increase in thread stack for JDK build,
15744    # well more specifically, when running javac.
15745    if test "x$BUILD_NUM_BITS" = x32; then
15746       STACK_SIZE=768
15747    else
15748       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15749       # since 64-bit pointers are pushed on the stach. Apparently, we need
15750       # to increase the stack space when javacing the JDK....
15751       STACK_SIZE=1536
15752    fi
15753
15754    # Minimum amount of heap memory.
15755
15756    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15757    $ECHO "Command: $JAVA -Xms64M -version" >&5
15758    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15759    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15760    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15761    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15762        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15763	JVM_ARG_OK=true
15764    else
15765	$ECHO "Arg failed:" >&5
15766	$ECHO "$OUTPUT" >&5
15767	JVM_ARG_OK=false
15768    fi
15769
15770    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
15771        # Why does macosx need more heap? Its the huge JDK batch.
15772
15773    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15774    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15775    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15776    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15780	JVM_ARG_OK=true
15781    else
15782	$ECHO "Arg failed:" >&5
15783	$ECHO "$OUTPUT" >&5
15784	JVM_ARG_OK=false
15785    fi
15786
15787    else
15788
15789    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15790    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15791    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15792    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15793    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15794    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15795        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15796	JVM_ARG_OK=true
15797    else
15798	$ECHO "Arg failed:" >&5
15799	$ECHO "$OUTPUT" >&5
15800	JVM_ARG_OK=false
15801    fi
15802
15803    fi
15804    # When is adding -client something that speeds up the JVM?
15805    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15806
15807    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15808    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15809    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15810    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15811    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15812    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15813        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15814	JVM_ARG_OK=true
15815    else
15816	$ECHO "Arg failed:" >&5
15817	$ECHO "$OUTPUT" >&5
15818	JVM_ARG_OK=false
15819    fi
15820
15821
15822    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15823    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15824    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15825    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15826    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15827    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15828        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15829	JVM_ARG_OK=true
15830    else
15831	$ECHO "Arg failed:" >&5
15832	$ECHO "$OUTPUT" >&5
15833	JVM_ARG_OK=false
15834    fi
15835
15836
15837    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15838    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15839    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15840    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15841    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15842    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15843        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15844	JVM_ARG_OK=true
15845    else
15846	$ECHO "Arg failed:" >&5
15847	$ECHO "$OUTPUT" >&5
15848	JVM_ARG_OK=false
15849    fi
15850
15851    # Disable special log output when a debug build is used as Boot JDK...
15852
15853    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15854    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15855    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15856    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15857    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15858    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15859        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15860	JVM_ARG_OK=true
15861    else
15862	$ECHO "Arg failed:" >&5
15863	$ECHO "$OUTPUT" >&5
15864	JVM_ARG_OK=false
15865    fi
15866
15867fi
15868
15869BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15870
15871
15872
15873###############################################################################
15874#
15875# Configure the sources to use. We can add or override individual directories.
15876#
15877###############################################################################
15878
15879
15880
15881# Where are the sources. Any of these can be overridden
15882# using --with-override-corba and the likes.
15883LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15884CORBA_TOPDIR="$SRC_ROOT/corba"
15885JAXP_TOPDIR="$SRC_ROOT/jaxp"
15886JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15887HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15888NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15889JDK_TOPDIR="$SRC_ROOT/jdk"
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900###############################################################################
15901#
15902# Pickup additional source for a component from outside of the source root
15903# or override source for a component.
15904#
15905
15906# Check whether --with-add-source-root was given.
15907if test "${with_add_source_root+set}" = set; then :
15908  withval=$with_add_source_root;
15909fi
15910
15911
15912
15913# Check whether --with-override-source-root was given.
15914if test "${with_override_source_root+set}" = set; then :
15915  withval=$with_override_source_root;
15916fi
15917
15918
15919
15920# Check whether --with-adds-and-overrides was given.
15921if test "${with_adds_and_overrides+set}" = set; then :
15922  withval=$with_adds_and_overrides;
15923fi
15924
15925
15926if test "x$with_adds_and_overrides" != x; then
15927    with_add_source_root="$with_adds_and_overrides/adds"
15928    with_override_source_root="$with_adds_and_overrides/overrides"
15929fi
15930
15931if test "x$with_add_source_root" != x; then
15932    if ! test -d $with_add_source_root; then
15933       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15934    fi
15935    CURDIR="$PWD"
15936    cd "$with_add_source_root"
15937    ADD_SRC_ROOT="`pwd`"
15938    cd "$CURDIR"
15939    # Verify that the addon source root does not have any root makefiles.
15940    # If it does, then it is usually an error, prevent this.
15941    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15942       test -f $with_add_source_root/langtools/make/Makefile; then
15943        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
15944    fi
15945    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15946       test -f $with_add_source_root/corba/make/Makefile; then
15947        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
15948    fi
15949    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15950       test -f $with_add_source_root/jaxp/make/Makefile; then
15951        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
15952    fi
15953    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15954       test -f $with_add_source_root/jaxws/make/Makefile; then
15955        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
15956    fi
15957    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15958       test -f $with_add_source_root/hotspot/make/Makefile; then
15959        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
15960    fi
15961    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15962       test -f $with_add_source_root/jdk/make/Makefile; then
15963        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
15964    fi
15965fi
15966
15967
15968if test "x$with_override_source_root" != x; then
15969    if ! test -d $with_override_source_root; then
15970       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15971    fi
15972    CURDIR="$PWD"
15973    cd "$with_override_source_root"
15974    OVERRIDE_SRC_ROOT="`pwd`"
15975    cd "$CURDIR"
15976    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15977       test -f $with_override_source_root/langtools/make/Makefile; then
15978        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
15979    fi
15980    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15981       test -f $with_override_source_root/corba/make/Makefile; then
15982        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
15983    fi
15984    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15985       test -f $with_override_source_root/jaxp/make/Makefile; then
15986        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
15987    fi
15988    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15989       test -f $with_override_source_root/jaxws/make/Makefile; then
15990        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
15991    fi
15992    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15993       test -f $with_override_source_root/hotspot/make/Makefile; then
15994        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
15995    fi
15996    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15997       test -f $with_override_source_root/jdk/make/Makefile; then
15998        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
15999    fi
16000fi
16001
16002
16003###############################################################################
16004#
16005# Override a repo completely, this is used for example when you have 3 small
16006# development sandboxes of the langtools sources and want to avoid having 3 full
16007# OpenJDK sources checked out on disk.
16008#
16009# Assuming that the 3 langtools sandboxes are located here:
16010# /home/fredrik/sandbox1/langtools
16011# /home/fredrik/sandbox2/langtools
16012# /home/fredrik/sandbox3/langtools
16013#
16014# From the source root you create build subdirs manually:
16015#     mkdir -p build1 build2 build3
16016# in each build directory run:
16017#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16018#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16019#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16020#
16021
16022
16023# Check whether --with-override-langtools was given.
16024if test "${with_override_langtools+set}" = set; then :
16025  withval=$with_override_langtools;
16026fi
16027
16028
16029
16030# Check whether --with-override-corba was given.
16031if test "${with_override_corba+set}" = set; then :
16032  withval=$with_override_corba;
16033fi
16034
16035
16036
16037# Check whether --with-override-jaxp was given.
16038if test "${with_override_jaxp+set}" = set; then :
16039  withval=$with_override_jaxp;
16040fi
16041
16042
16043
16044# Check whether --with-override-jaxws was given.
16045if test "${with_override_jaxws+set}" = set; then :
16046  withval=$with_override_jaxws;
16047fi
16048
16049
16050
16051# Check whether --with-override-hotspot was given.
16052if test "${with_override_hotspot+set}" = set; then :
16053  withval=$with_override_hotspot;
16054fi
16055
16056
16057
16058# Check whether --with-override-jdk was given.
16059if test "${with_override_jdk+set}" = set; then :
16060  withval=$with_override_jdk;
16061fi
16062
16063
16064if test "x$with_override_langtools" != x; then
16065    CURDIR="$PWD"
16066    cd "$with_override_langtools"
16067    LANGTOOLS_TOPDIR="`pwd`"
16068    cd "$CURDIR"
16069    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16070        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16071    fi
16072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16073$as_echo_n "checking if langtools should be overridden... " >&6; }
16074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16075$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16076fi
16077if test "x$with_override_corba" != x; then
16078    CURDIR="$PWD"
16079    cd "$with_override_corba"
16080    CORBA_TOPDIR="`pwd`"
16081    cd "$CURDIR"
16082    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16083        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16084    fi
16085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16086$as_echo_n "checking if corba should be overridden... " >&6; }
16087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16088$as_echo "yes with $CORBA_TOPDIR" >&6; }
16089fi
16090if test "x$with_override_jaxp" != x; then
16091    CURDIR="$PWD"
16092    cd "$with_override_jaxp"
16093    JAXP_TOPDIR="`pwd`"
16094    cd "$CURDIR"
16095    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16096        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16097    fi
16098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16099$as_echo_n "checking if jaxp should be overridden... " >&6; }
16100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16101$as_echo "yes with $JAXP_TOPDIR" >&6; }
16102fi
16103if test "x$with_override_jaxws" != x; then
16104    CURDIR="$PWD"
16105    cd "$with_override_jaxws"
16106    JAXWS_TOPDIR="`pwd`"
16107    cd "$CURDIR"
16108    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16109        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16110    fi
16111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16112$as_echo_n "checking if jaxws should be overridden... " >&6; }
16113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16114$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16115fi
16116if test "x$with_override_hotspot" != x; then
16117    CURDIR="$PWD"
16118    cd "$with_override_hotspot"
16119    HOTSPOT_TOPDIR="`pwd`"
16120    cd "$CURDIR"
16121    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16122       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16123        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16124    fi
16125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16126$as_echo_n "checking if hotspot should be overridden... " >&6; }
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16128$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16129fi
16130if test "x$with_override_nashorn" != x; then
16131    CURDIR="$PWD"
16132    cd "$with_override_nashorn"
16133    NASHORN_TOPDIR="`pwd`"
16134    cd "$CURDIR"
16135    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16136        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16137    fi
16138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16139$as_echo_n "checking if nashorn should be overridden... " >&6; }
16140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16141$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16142fi
16143if test "x$with_override_jdk" != x; then
16144    CURDIR="$PWD"
16145    cd "$with_override_jdk"
16146    JDK_TOPDIR="`pwd`"
16147    cd "$CURDIR"
16148    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16149        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16150    fi
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16152$as_echo_n "checking if JDK should be overridden... " >&6; }
16153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16154$as_echo "yes with $JDK_TOPDIR" >&6; }
16155fi
16156
16157
16158
16159BUILD_OUTPUT="$OUTPUT_ROOT"
16160
16161
16162HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16163BUILD_HOTSPOT=true
16164
16165
16166
16167# Check whether --with-import-hotspot was given.
16168if test "${with_import_hotspot+set}" = set; then :
16169  withval=$with_import_hotspot;
16170fi
16171
16172if test "x$with_import_hotspot" != x; then
16173    CURDIR="$PWD"
16174    cd "$with_import_hotspot"
16175    HOTSPOT_DIST="`pwd`"
16176    cd "$CURDIR"
16177    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16178        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16179    fi
16180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16181$as_echo_n "checking if hotspot should be imported... " >&6; }
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16183$as_echo "yes from $HOTSPOT_DIST" >&6; }
16184    BUILD_HOTSPOT=false
16185fi
16186
16187JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16188
16189
16190###############################################################################
16191#
16192# Setup the toolchain (compilers etc), i.e. the tools that need to be
16193# cross-compilation aware.
16194#
16195###############################################################################
16196
16197
16198###############################################################################
16199#
16200# Configure the development tool paths and potential sysroot.
16201#
16202ac_ext=cpp
16203ac_cpp='$CXXCPP $CPPFLAGS'
16204ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16205ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16206ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16207
16208
16209# The option used to specify the target .o,.a or .so file.
16210# When compiling, how to specify the to be created object file.
16211CC_OUT_OPTION='-o$(SPACE)'
16212# When linking, how to specify the to be created executable.
16213EXE_OUT_OPTION='-o$(SPACE)'
16214# When linking, how to specify the to be created dynamically linkable library.
16215LD_OUT_OPTION='-o$(SPACE)'
16216# When archiving, how to specify the to be create static archive for object files.
16217AR_OUT_OPTION='rcs$(SPACE)'
16218
16219
16220
16221
16222
16223# Locate the actual tools
16224
16225
16226# Check whether --with-jtreg was given.
16227if test "${with_jtreg+set}" = set; then :
16228  withval=$with_jtreg;
16229else
16230  with_jtreg=no
16231fi
16232
16233
16234  if test "x$with_jtreg" = xno; then
16235    # jtreg disabled
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16237$as_echo_n "checking for jtreg... " >&6; }
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16239$as_echo "no" >&6; }
16240  else
16241    if test "x$with_jtreg" != xyes; then
16242      # with path specified.
16243      JT_HOME="$with_jtreg"
16244    fi
16245
16246    if test "x$JT_HOME" != x; then
16247      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16248$as_echo_n "checking for jtreg... " >&6; }
16249
16250      # use JT_HOME enviroment var.
16251
16252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253
16254  # Input might be given as Windows format, start by converting to
16255  # unix format.
16256  path="$JT_HOME"
16257  new_path=`$CYGPATH -u "$path"`
16258
16259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16262  # "foo.exe" is OK but "foo" is an error.
16263  #
16264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16265  # It is also a way to make sure we got the proper file name for the real test later on.
16266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16267  if test "x$test_shortpath" = x; then
16268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16269$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16270    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16271  fi
16272
16273  # Call helper function which possibly converts this using DOS-style short mode.
16274  # If so, the updated path is stored in $new_path.
16275
16276  input_path="$new_path"
16277  # Check if we need to convert this using DOS-style short mode. If the path
16278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16279  # take no chances and rewrite it.
16280  # Note: m4 eats our [], so we need to use [ and ] instead.
16281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16282  if test "x$has_forbidden_chars" != x; then
16283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16287      # Going to short mode and back again did indeed matter. Since short mode is
16288      # case insensitive, let's make it lowercase to improve readability.
16289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16290      # Now convert it back to Unix-stile (cygpath)
16291      input_path=`$CYGPATH -u "$shortmode_path"`
16292      new_path="$input_path"
16293    fi
16294  fi
16295
16296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16297  if test "x$test_cygdrive_prefix" = x; then
16298    # As a simple fix, exclude /usr/bin since it's not a real path.
16299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16301      # a path prefixed by /cygdrive for fixpath to work.
16302      new_path="$CYGWIN_ROOT_PATH$input_path"
16303    fi
16304  fi
16305
16306
16307  if test "x$path" != "x$new_path"; then
16308    JT_HOME="$new_path"
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16310$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16311  fi
16312
16313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314
16315  path="$JT_HOME"
16316  has_colon=`$ECHO $path | $GREP ^.:`
16317  new_path="$path"
16318  if test "x$has_colon" = x; then
16319    # Not in mixed or Windows style, start by that.
16320    new_path=`cmd //c echo $path`
16321  fi
16322
16323
16324  input_path="$new_path"
16325  # Check if we need to convert this using DOS-style short mode. If the path
16326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16327  # take no chances and rewrite it.
16328  # Note: m4 eats our [], so we need to use [ and ] instead.
16329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16330  if test "x$has_forbidden_chars" != x; then
16331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16333  fi
16334
16335
16336  windows_path="$new_path"
16337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338    unix_path=`$CYGPATH -u "$windows_path"`
16339    new_path="$unix_path"
16340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342    new_path="$unix_path"
16343  fi
16344
16345  if test "x$path" != "x$new_path"; then
16346    JT_HOME="$new_path"
16347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16348$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16349  fi
16350
16351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16353
16354  else
16355    # We're on a posix platform. Hooray! :)
16356    path="$JT_HOME"
16357    has_space=`$ECHO "$path" | $GREP " "`
16358    if test "x$has_space" != x; then
16359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16360$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16362    fi
16363
16364    # Use eval to expand a potential ~
16365    eval path="$path"
16366    if test ! -f "$path" && test ! -d "$path"; then
16367      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16368    fi
16369
16370    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16371  fi
16372
16373
16374      # jtreg win32 script works for everybody
16375      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16376
16377      if test ! -f "$JTREGEXE"; then
16378        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16379      fi
16380
16381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16382$as_echo "$JTREGEXE" >&6; }
16383    else
16384      # try to find jtreg on path
16385
16386    for ac_prog in jtreg
16387do
16388  # Extract the first word of "$ac_prog", so it can be a program name with args.
16389set dummy $ac_prog; ac_word=$2
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16391$as_echo_n "checking for $ac_word... " >&6; }
16392if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16393  $as_echo_n "(cached) " >&6
16394else
16395  case $JTREGEXE in
16396  [\\/]* | ?:[\\/]*)
16397  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16398  ;;
16399  *)
16400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16401for as_dir in $PATH
16402do
16403  IFS=$as_save_IFS
16404  test -z "$as_dir" && as_dir=.
16405    for ac_exec_ext in '' $ac_executable_extensions; do
16406  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16407    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16409    break 2
16410  fi
16411done
16412  done
16413IFS=$as_save_IFS
16414
16415  ;;
16416esac
16417fi
16418JTREGEXE=$ac_cv_path_JTREGEXE
16419if test -n "$JTREGEXE"; then
16420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16421$as_echo "$JTREGEXE" >&6; }
16422else
16423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16424$as_echo "no" >&6; }
16425fi
16426
16427
16428  test -n "$JTREGEXE" && break
16429done
16430
16431
16432    if test "x$JTREGEXE" = x; then
16433        if test "xjtreg" = x; then
16434          PROG_NAME=jtregexe
16435        else
16436          PROG_NAME=jtreg
16437        fi
16438        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16439$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16440        as_fn_error $? "Cannot continue" "$LINENO" 5
16441    fi
16442
16443
16444      JT_HOME="`$DIRNAME $JTREGEXE`"
16445    fi
16446  fi
16447
16448
16449
16450
16451
16452if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16453
16454  # Store path to cygwin link.exe to help excluding it when searching for
16455  # VS linker. This must be done before changing the PATH when looking for VS.
16456  # Extract the first word of "link", so it can be a program name with args.
16457set dummy link; ac_word=$2
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16459$as_echo_n "checking for $ac_word... " >&6; }
16460if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16461  $as_echo_n "(cached) " >&6
16462else
16463  case $CYGWIN_LINK in
16464  [\\/]* | ?:[\\/]*)
16465  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16466  ;;
16467  *)
16468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16469for as_dir in $PATH
16470do
16471  IFS=$as_save_IFS
16472  test -z "$as_dir" && as_dir=.
16473    for ac_exec_ext in '' $ac_executable_extensions; do
16474  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16475    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16477    break 2
16478  fi
16479done
16480  done
16481IFS=$as_save_IFS
16482
16483  ;;
16484esac
16485fi
16486CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16487if test -n "$CYGWIN_LINK"; then
16488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16489$as_echo "$CYGWIN_LINK" >&6; }
16490else
16491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16492$as_echo "no" >&6; }
16493fi
16494
16495
16496  if test "x$CYGWIN_LINK" != x; then
16497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16498$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16499    "$CYGWIN_LINK" --version > /dev/null
16500    if test $? -eq 0 ; then
16501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16502$as_echo "yes" >&6; }
16503    else
16504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16505$as_echo "no" >&6; }
16506      # This might be the VS linker. Don't exclude it later on.
16507      CYGWIN_LINK=""
16508    fi
16509  fi
16510
16511  # First-hand choice is to locate and run the vsvars bat file.
16512
16513  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16514    VCVARSFILE="vc/bin/vcvars32.bat"
16515  else
16516    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16517  fi
16518
16519  VS_ENV_CMD=""
16520  VS_ENV_ARGS=""
16521  if test "x$with_toolsdir" != x; then
16522
16523  if test "x$VS_ENV_CMD" = x; then
16524    VS100BASE="$with_toolsdir/../.."
16525    METHOD="--with-tools-dir"
16526
16527  windows_path="$VS100BASE"
16528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16529    unix_path=`$CYGPATH -u "$windows_path"`
16530    VS100BASE="$unix_path"
16531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16533    VS100BASE="$unix_path"
16534  fi
16535
16536    if test -d "$VS100BASE"; then
16537      if test -f "$VS100BASE/$VCVARSFILE"; then
16538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16539$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16540        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16541      else
16542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16543$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16545$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16546      fi
16547    fi
16548  fi
16549
16550  fi
16551
16552  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16553    # Having specified an argument which is incorrect will produce an instant failure;
16554    # we should not go on looking
16555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16556$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16557    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16558$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16559    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16560  fi
16561
16562  if test "x$VS100COMNTOOLS" != x; then
16563
16564  if test "x$VS_ENV_CMD" = x; then
16565    VS100BASE="$VS100COMNTOOLS/../.."
16566    METHOD="VS100COMNTOOLS variable"
16567
16568  windows_path="$VS100BASE"
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570    unix_path=`$CYGPATH -u "$windows_path"`
16571    VS100BASE="$unix_path"
16572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16574    VS100BASE="$unix_path"
16575  fi
16576
16577    if test -d "$VS100BASE"; then
16578      if test -f "$VS100BASE/$VCVARSFILE"; then
16579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16580$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16581        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16582      else
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16584$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16585        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16586$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16587      fi
16588    fi
16589  fi
16590
16591  fi
16592  if test "x$PROGRAMFILES" != x; then
16593
16594  if test "x$VS_ENV_CMD" = x; then
16595    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16596    METHOD="well-known name"
16597
16598  windows_path="$VS100BASE"
16599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16600    unix_path=`$CYGPATH -u "$windows_path"`
16601    VS100BASE="$unix_path"
16602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16604    VS100BASE="$unix_path"
16605  fi
16606
16607    if test -d "$VS100BASE"; then
16608      if test -f "$VS100BASE/$VCVARSFILE"; then
16609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16610$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16611        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16612      else
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16614$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16615        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16616$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16617      fi
16618    fi
16619  fi
16620
16621  fi
16622
16623  if test "x$VS_ENV_CMD" = x; then
16624    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16625    METHOD="well-known name"
16626
16627  windows_path="$VS100BASE"
16628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16629    unix_path=`$CYGPATH -u "$windows_path"`
16630    VS100BASE="$unix_path"
16631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16633    VS100BASE="$unix_path"
16634  fi
16635
16636    if test -d "$VS100BASE"; then
16637      if test -f "$VS100BASE/$VCVARSFILE"; then
16638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16639$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16640        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16641      else
16642        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16643$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16644        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16645$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16646      fi
16647    fi
16648  fi
16649
16650
16651  if test "x$VS_ENV_CMD" = x; then
16652    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16653    METHOD="well-known name"
16654
16655  windows_path="$VS100BASE"
16656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16657    unix_path=`$CYGPATH -u "$windows_path"`
16658    VS100BASE="$unix_path"
16659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16661    VS100BASE="$unix_path"
16662  fi
16663
16664    if test -d "$VS100BASE"; then
16665      if test -f "$VS100BASE/$VCVARSFILE"; then
16666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16667$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16668        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16669      else
16670        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16671$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16672        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16673$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16674      fi
16675    fi
16676  fi
16677
16678
16679  if test "x$ProgramW6432" != x; then
16680
16681  if test "x$VS_ENV_CMD" = x; then
16682    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16683    METHOD="well-known name"
16684
16685  windows_path="$WIN_SDK_BASE"
16686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16687    unix_path=`$CYGPATH -u "$windows_path"`
16688    WIN_SDK_BASE="$unix_path"
16689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16691    WIN_SDK_BASE="$unix_path"
16692  fi
16693
16694    if test -d "$WIN_SDK_BASE"; then
16695      # There have been cases of partial or broken SDK installations. A missing
16696      # lib dir is not going to work.
16697      if test ! -d "$WIN_SDK_BASE/../lib"; then
16698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16699$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16700        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16701$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16702      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16705        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16706        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16707          VS_ENV_ARGS="/x86"
16708        else
16709          VS_ENV_ARGS="/x64"
16710        fi
16711      else
16712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16713$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16714        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16715$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16716      fi
16717    fi
16718  fi
16719
16720  fi
16721  if test "x$PROGRAMW6432" != x; then
16722
16723  if test "x$VS_ENV_CMD" = x; then
16724    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16725    METHOD="well-known name"
16726
16727  windows_path="$WIN_SDK_BASE"
16728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16729    unix_path=`$CYGPATH -u "$windows_path"`
16730    WIN_SDK_BASE="$unix_path"
16731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16733    WIN_SDK_BASE="$unix_path"
16734  fi
16735
16736    if test -d "$WIN_SDK_BASE"; then
16737      # There have been cases of partial or broken SDK installations. A missing
16738      # lib dir is not going to work.
16739      if test ! -d "$WIN_SDK_BASE/../lib"; then
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16741$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16742        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16743$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16744      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16746$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16747        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16748        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16749          VS_ENV_ARGS="/x86"
16750        else
16751          VS_ENV_ARGS="/x64"
16752        fi
16753      else
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16755$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16757$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16758      fi
16759    fi
16760  fi
16761
16762  fi
16763  if test "x$PROGRAMFILES" != x; then
16764
16765  if test "x$VS_ENV_CMD" = x; then
16766    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16767    METHOD="well-known name"
16768
16769  windows_path="$WIN_SDK_BASE"
16770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16771    unix_path=`$CYGPATH -u "$windows_path"`
16772    WIN_SDK_BASE="$unix_path"
16773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16775    WIN_SDK_BASE="$unix_path"
16776  fi
16777
16778    if test -d "$WIN_SDK_BASE"; then
16779      # There have been cases of partial or broken SDK installations. A missing
16780      # lib dir is not going to work.
16781      if test ! -d "$WIN_SDK_BASE/../lib"; then
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16785$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16786      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16789        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16790        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16791          VS_ENV_ARGS="/x86"
16792        else
16793          VS_ENV_ARGS="/x64"
16794        fi
16795      else
16796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16800      fi
16801    fi
16802  fi
16803
16804  fi
16805
16806  if test "x$VS_ENV_CMD" = x; then
16807    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16808    METHOD="well-known name"
16809
16810  windows_path="$WIN_SDK_BASE"
16811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16812    unix_path=`$CYGPATH -u "$windows_path"`
16813    WIN_SDK_BASE="$unix_path"
16814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16816    WIN_SDK_BASE="$unix_path"
16817  fi
16818
16819    if test -d "$WIN_SDK_BASE"; then
16820      # There have been cases of partial or broken SDK installations. A missing
16821      # lib dir is not going to work.
16822      if test ! -d "$WIN_SDK_BASE/../lib"; then
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16824$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16826$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16827      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16829$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16830        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16831        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16832          VS_ENV_ARGS="/x86"
16833        else
16834          VS_ENV_ARGS="/x64"
16835        fi
16836      else
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16838$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16839        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16840$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16841      fi
16842    fi
16843  fi
16844
16845
16846  if test "x$VS_ENV_CMD" = x; then
16847    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16848    METHOD="well-known name"
16849
16850  windows_path="$WIN_SDK_BASE"
16851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16852    unix_path=`$CYGPATH -u "$windows_path"`
16853    WIN_SDK_BASE="$unix_path"
16854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16856    WIN_SDK_BASE="$unix_path"
16857  fi
16858
16859    if test -d "$WIN_SDK_BASE"; then
16860      # There have been cases of partial or broken SDK installations. A missing
16861      # lib dir is not going to work.
16862      if test ! -d "$WIN_SDK_BASE/../lib"; then
16863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16864$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16866$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16867      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16869$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16870        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16871        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16872          VS_ENV_ARGS="/x86"
16873        else
16874          VS_ENV_ARGS="/x64"
16875        fi
16876      else
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16878$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16879        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16880$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16881      fi
16882    fi
16883  fi
16884
16885
16886  if test "x$VS_ENV_CMD" != x; then
16887    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16888
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890
16891  # First separate the path from the arguments. This will split at the first
16892  # space.
16893  complete="$VS_ENV_CMD"
16894  path="${complete%% *}"
16895  tmp="$complete EOL"
16896  arguments="${tmp#* }"
16897
16898  # Input might be given as Windows format, start by converting to
16899  # unix format.
16900  new_path=`$CYGPATH -u "$path"`
16901
16902  # Now try to locate executable using which
16903  new_path=`$WHICH "$new_path" 2> /dev/null`
16904  # bat and cmd files are not always considered executable in cygwin causing which
16905  # to not find them
16906  if test "x$new_path" = x \
16907           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16908           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16909    new_path=`$CYGPATH -u "$path"`
16910  fi
16911  if test "x$new_path" = x; then
16912    # Oops. Which didn't find the executable.
16913    # The splitting of arguments from the executable at a space might have been incorrect,
16914    # since paths with space are more likely in Windows. Give it another try with the whole
16915    # argument.
16916    path="$complete"
16917    arguments="EOL"
16918    new_path=`$CYGPATH -u "$path"`
16919    new_path=`$WHICH "$new_path" 2> /dev/null`
16920    # bat and cmd files are not always considered executable in cygwin causing which
16921    # to not find them
16922    if test "x$new_path" = x \
16923             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16924             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16925      new_path=`$CYGPATH -u "$path"`
16926    fi
16927    if test "x$new_path" = x; then
16928      # It's still not found. Now this is an unrecoverable error.
16929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16930$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16931      has_space=`$ECHO "$complete" | $GREP " "`
16932      if test "x$has_space" != x; then
16933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16935      fi
16936      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16937    fi
16938  fi
16939
16940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16943  # "foo.exe" is OK but "foo" is an error.
16944  #
16945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16946  # It is also a way to make sure we got the proper file name for the real test later on.
16947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16948  if test "x$test_shortpath" = x; then
16949    # Short path failed, file does not exist as specified.
16950    # Try adding .exe or .cmd
16951    if test -f "${new_path}.exe"; then
16952       input_to_shortpath="${new_path}.exe"
16953    elif test -f "${new_path}.cmd"; then
16954       input_to_shortpath="${new_path}.cmd"
16955    else
16956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16957$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16960      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16961    fi
16962  else
16963    input_to_shortpath="$new_path"
16964  fi
16965
16966  # Call helper function which possibly converts this using DOS-style short mode.
16967  # If so, the updated path is stored in $new_path.
16968  new_path="$input_to_shortpath"
16969
16970  input_path="$input_to_shortpath"
16971  # Check if we need to convert this using DOS-style short mode. If the path
16972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16973  # take no chances and rewrite it.
16974  # Note: m4 eats our [], so we need to use [ and ] instead.
16975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16976  if test "x$has_forbidden_chars" != x; then
16977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16981      # Going to short mode and back again did indeed matter. Since short mode is
16982      # case insensitive, let's make it lowercase to improve readability.
16983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16984      # Now convert it back to Unix-stile (cygpath)
16985      input_path=`$CYGPATH -u "$shortmode_path"`
16986      new_path="$input_path"
16987    fi
16988  fi
16989
16990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16991  if test "x$test_cygdrive_prefix" = x; then
16992    # As a simple fix, exclude /usr/bin since it's not a real path.
16993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16995      # a path prefixed by /cygdrive for fixpath to work.
16996      new_path="$CYGWIN_ROOT_PATH$input_path"
16997    fi
16998  fi
16999
17000  # remove trailing .exe if any
17001  new_path="${new_path/%.exe/}"
17002
17003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17004
17005  # First separate the path from the arguments. This will split at the first
17006  # space.
17007  complete="$VS_ENV_CMD"
17008  path="${complete%% *}"
17009  tmp="$complete EOL"
17010  arguments="${tmp#* }"
17011
17012  # Input might be given as Windows format, start by converting to
17013  # unix format.
17014  new_path="$path"
17015
17016  windows_path="$new_path"
17017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018    unix_path=`$CYGPATH -u "$windows_path"`
17019    new_path="$unix_path"
17020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17022    new_path="$unix_path"
17023  fi
17024
17025
17026  # Now try to locate executable using which
17027  new_path=`$WHICH "$new_path" 2> /dev/null`
17028
17029  if test "x$new_path" = x; then
17030    # Oops. Which didn't find the executable.
17031    # The splitting of arguments from the executable at a space might have been incorrect,
17032    # since paths with space are more likely in Windows. Give it another try with the whole
17033    # argument.
17034    path="$complete"
17035    arguments="EOL"
17036    new_path="$path"
17037
17038  windows_path="$new_path"
17039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17040    unix_path=`$CYGPATH -u "$windows_path"`
17041    new_path="$unix_path"
17042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17044    new_path="$unix_path"
17045  fi
17046
17047
17048    new_path=`$WHICH "$new_path" 2> /dev/null`
17049
17050    if test "x$new_path" = x; then
17051      # It's still not found. Now this is an unrecoverable error.
17052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17053$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17054      has_space=`$ECHO "$complete" | $GREP " "`
17055      if test "x$has_space" != x; then
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17058      fi
17059      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17060    fi
17061  fi
17062
17063  # Now new_path has a complete unix path to the binary
17064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17065    # Keep paths in /bin as-is, but remove trailing .exe if any
17066    new_path="${new_path/%.exe/}"
17067    # Do not save /bin paths to all_fixpath_prefixes!
17068  else
17069    # Not in mixed or Windows style, start by that.
17070    new_path=`cmd //c echo $new_path`
17071
17072  input_path="$new_path"
17073  # Check if we need to convert this using DOS-style short mode. If the path
17074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17075  # take no chances and rewrite it.
17076  # Note: m4 eats our [], so we need to use [ and ] instead.
17077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17078  if test "x$has_forbidden_chars" != x; then
17079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17081  fi
17082
17083    # Output is in $new_path
17084
17085  windows_path="$new_path"
17086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17087    unix_path=`$CYGPATH -u "$windows_path"`
17088    new_path="$unix_path"
17089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17091    new_path="$unix_path"
17092  fi
17093
17094    # remove trailing .exe if any
17095    new_path="${new_path/%.exe/}"
17096
17097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17099  fi
17100
17101  else
17102    # We're on a posix platform. Hooray! :)
17103    # First separate the path from the arguments. This will split at the first
17104    # space.
17105    complete="$VS_ENV_CMD"
17106    path="${complete%% *}"
17107    tmp="$complete EOL"
17108    arguments="${tmp#* }"
17109
17110    # Cannot rely on the command "which" here since it doesn't always work.
17111    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17112    if test -z "$is_absolute_path"; then
17113      # Path to executable is not absolute. Find it.
17114      IFS_save="$IFS"
17115      IFS=:
17116      for p in $PATH; do
17117        if test -f "$p/$path" && test -x "$p/$path"; then
17118          new_path="$p/$path"
17119          break
17120        fi
17121      done
17122      IFS="$IFS_save"
17123    else
17124      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17125$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17126      new_path="$path"
17127    fi
17128
17129    if test "x$new_path" = x; then
17130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17131$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17132        has_space=`$ECHO "$complete" | $GREP " "`
17133        if test "x$has_space" != x; then
17134          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17135$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17136        fi
17137        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17138      fi
17139  fi
17140
17141      # Now join together the path and the arguments once again
17142      if test "x$arguments" != xEOL; then
17143        new_complete="$new_path ${arguments% *}"
17144      else
17145        new_complete="$new_path"
17146      fi
17147
17148  if test "x$complete" != "x$new_complete"; then
17149      VS_ENV_CMD="$new_complete"
17150      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17151$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17152    fi
17153
17154
17155    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17156    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17157$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17158    cd $OUTPUT_ROOT
17159    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17160    # to autoconf standards.
17161
17162    #----
17163
17164    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17165    # but calculate the difference in Cygwin environment before/after running it and then
17166    # apply the diff.
17167
17168    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17169      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17170      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17171      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17172    else
17173      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17174      _dosbash=`cmd //c echo \`which bash\``
17175    fi
17176
17177    # generate the set of exported vars before/after the vs10 setup
17178    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17179    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17180    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17181    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17182
17183    # Now execute the newly created bat file.
17184    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17185    cmd /c localdevenvtmp.bat | cat
17186
17187    # apply the diff (less some non-vs10 vars named by "!")
17188    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17189    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17190    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17191
17192    # cleanup
17193    $RM localdevenvtmp*
17194    #----
17195    cd $CURDIR
17196    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17198$as_echo "no" >&6; }
17199      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17200$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17201      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17202$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17203      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17204$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17205      as_fn_error $? "Cannot continue" "$LINENO" 5
17206    fi
17207
17208    # Now set all paths and other env variables. This will allow the rest of
17209    # the configure script to find and run the compiler in the proper way.
17210    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17211$as_echo "$as_me: Setting extracted environment variables" >&6;}
17212    . $OUTPUT_ROOT/localdevenv.sh
17213  else
17214    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17215    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17216$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17217  fi
17218
17219  # At this point, we should have corrent variables in the environment, or we can't continue.
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17221$as_echo_n "checking for Visual Studio variables... " >&6; }
17222
17223  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17224    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17226$as_echo "present but broken" >&6; }
17227      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17228    else
17229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17230$as_echo "ok" >&6; }
17231      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17232      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17233      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17234      VS_PATH="$PATH"
17235
17236
17237
17238    fi
17239  else
17240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17241$as_echo "not found" >&6; }
17242
17243    if test "x$VS_ENV_CMD" = x; then
17244      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17245$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17246      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17247$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17248    else
17249      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17250$as_echo "$as_me: Running the extraction script failed." >&6;}
17251    fi
17252    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17253$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17254    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17255$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17256    as_fn_error $? "Cannot continue" "$LINENO" 5
17257  fi
17258
17259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17260$as_echo_n "checking for msvcr100.dll... " >&6; }
17261
17262# Check whether --with-msvcr-dll was given.
17263if test "${with_msvcr_dll+set}" = set; then :
17264  withval=$with_msvcr_dll;
17265fi
17266
17267  if test "x$with_msvcr_dll" != x; then
17268    MSVCR_DLL="$with_msvcr_dll"
17269  else
17270    if test "x$VCINSTALLDIR" != x; then
17271      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17272        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17273      else
17274        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17275        if test "x$MSVCR_DLL" = x; then
17276          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17277        fi
17278      fi
17279      if test "x$MSVCR_DLL" != x; then
17280        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17281$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17282      else
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17284$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17285      fi
17286    fi
17287    # Try some fallback alternatives
17288    if test "x$MSVCR_DLL" = x; then
17289      # If visual studio express is installed, there is usually one with the debugger
17290      if test "x$VS100COMNTOOLS" != x; then
17291        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17292          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17293          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17294$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17295        fi
17296      fi
17297    fi
17298    if test "x$MSVCR_DLL" = x; then
17299      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17300        # Fallback for 32bit builds, look in the windows directory.
17301        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17302          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17303$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17304          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17305        fi
17306      fi
17307    fi
17308  fi
17309  if test "x$MSVCR_DLL" = x; then
17310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17311$as_echo "no" >&6; }
17312    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17313  fi
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17315$as_echo "$MSVCR_DLL" >&6; }
17316
17317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17318
17319  # Input might be given as Windows format, start by converting to
17320  # unix format.
17321  path="$MSVCR_DLL"
17322  new_path=`$CYGPATH -u "$path"`
17323
17324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17327  # "foo.exe" is OK but "foo" is an error.
17328  #
17329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17330  # It is also a way to make sure we got the proper file name for the real test later on.
17331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17332  if test "x$test_shortpath" = x; then
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17334$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17335    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17336  fi
17337
17338  # Call helper function which possibly converts this using DOS-style short mode.
17339  # If so, the updated path is stored in $new_path.
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17352      # Going to short mode and back again did indeed matter. Since short mode is
17353      # case insensitive, let's make it lowercase to improve readability.
17354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355      # Now convert it back to Unix-stile (cygpath)
17356      input_path=`$CYGPATH -u "$shortmode_path"`
17357      new_path="$input_path"
17358    fi
17359  fi
17360
17361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17362  if test "x$test_cygdrive_prefix" = x; then
17363    # As a simple fix, exclude /usr/bin since it's not a real path.
17364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17366      # a path prefixed by /cygdrive for fixpath to work.
17367      new_path="$CYGWIN_ROOT_PATH$input_path"
17368    fi
17369  fi
17370
17371
17372  if test "x$path" != "x$new_path"; then
17373    MSVCR_DLL="$new_path"
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17375$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17376  fi
17377
17378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17379
17380  path="$MSVCR_DLL"
17381  has_colon=`$ECHO $path | $GREP ^.:`
17382  new_path="$path"
17383  if test "x$has_colon" = x; then
17384    # Not in mixed or Windows style, start by that.
17385    new_path=`cmd //c echo $path`
17386  fi
17387
17388
17389  input_path="$new_path"
17390  # Check if we need to convert this using DOS-style short mode. If the path
17391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17392  # take no chances and rewrite it.
17393  # Note: m4 eats our [], so we need to use [ and ] instead.
17394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17395  if test "x$has_forbidden_chars" != x; then
17396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17398  fi
17399
17400
17401  windows_path="$new_path"
17402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17403    unix_path=`$CYGPATH -u "$windows_path"`
17404    new_path="$unix_path"
17405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17407    new_path="$unix_path"
17408  fi
17409
17410  if test "x$path" != "x$new_path"; then
17411    MSVCR_DLL="$new_path"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17413$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17414  fi
17415
17416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17418
17419  else
17420    # We're on a posix platform. Hooray! :)
17421    path="$MSVCR_DLL"
17422    has_space=`$ECHO "$path" | $GREP " "`
17423    if test "x$has_space" != x; then
17424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17425$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17427    fi
17428
17429    # Use eval to expand a potential ~
17430    eval path="$path"
17431    if test ! -f "$path" && test ! -d "$path"; then
17432      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17433    fi
17434
17435    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17436  fi
17437
17438
17439
17440
17441# Check whether --with-dxsdk was given.
17442if test "${with_dxsdk+set}" = set; then :
17443  withval=$with_dxsdk;
17444fi
17445
17446
17447# Check whether --with-dxsdk-lib was given.
17448if test "${with_dxsdk_lib+set}" = set; then :
17449  withval=$with_dxsdk_lib;
17450fi
17451
17452
17453# Check whether --with-dxsdk-include was given.
17454if test "${with_dxsdk_include+set}" = set; then :
17455  withval=$with_dxsdk_include;
17456fi
17457
17458
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17460$as_echo_n "checking for DirectX SDK... " >&6; }
17461
17462  if test "x$with_dxsdk" != x; then
17463    dxsdk_path="$with_dxsdk"
17464  elif test "x$DXSDK_DIR" != x; then
17465    dxsdk_path="$DXSDK_DIR"
17466  elif test -d "C:/DXSDK"; then
17467    dxsdk_path="C:/DXSDK"
17468  else
17469    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17470  fi
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17472$as_echo "$dxsdk_path" >&6; }
17473
17474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17475
17476  # Input might be given as Windows format, start by converting to
17477  # unix format.
17478  path="$dxsdk_path"
17479  new_path=`$CYGPATH -u "$path"`
17480
17481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17484  # "foo.exe" is OK but "foo" is an error.
17485  #
17486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17487  # It is also a way to make sure we got the proper file name for the real test later on.
17488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17489  if test "x$test_shortpath" = x; then
17490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17491$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17492    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17493  fi
17494
17495  # Call helper function which possibly converts this using DOS-style short mode.
17496  # If so, the updated path is stored in $new_path.
17497
17498  input_path="$new_path"
17499  # Check if we need to convert this using DOS-style short mode. If the path
17500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17501  # take no chances and rewrite it.
17502  # Note: m4 eats our [], so we need to use [ and ] instead.
17503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17504  if test "x$has_forbidden_chars" != x; then
17505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17509      # Going to short mode and back again did indeed matter. Since short mode is
17510      # case insensitive, let's make it lowercase to improve readability.
17511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17512      # Now convert it back to Unix-stile (cygpath)
17513      input_path=`$CYGPATH -u "$shortmode_path"`
17514      new_path="$input_path"
17515    fi
17516  fi
17517
17518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17519  if test "x$test_cygdrive_prefix" = x; then
17520    # As a simple fix, exclude /usr/bin since it's not a real path.
17521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17523      # a path prefixed by /cygdrive for fixpath to work.
17524      new_path="$CYGWIN_ROOT_PATH$input_path"
17525    fi
17526  fi
17527
17528
17529  if test "x$path" != "x$new_path"; then
17530    dxsdk_path="$new_path"
17531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17532$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17533  fi
17534
17535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17536
17537  path="$dxsdk_path"
17538  has_colon=`$ECHO $path | $GREP ^.:`
17539  new_path="$path"
17540  if test "x$has_colon" = x; then
17541    # Not in mixed or Windows style, start by that.
17542    new_path=`cmd //c echo $path`
17543  fi
17544
17545
17546  input_path="$new_path"
17547  # Check if we need to convert this using DOS-style short mode. If the path
17548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17549  # take no chances and rewrite it.
17550  # Note: m4 eats our [], so we need to use [ and ] instead.
17551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17552  if test "x$has_forbidden_chars" != x; then
17553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17555  fi
17556
17557
17558  windows_path="$new_path"
17559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17560    unix_path=`$CYGPATH -u "$windows_path"`
17561    new_path="$unix_path"
17562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17564    new_path="$unix_path"
17565  fi
17566
17567  if test "x$path" != "x$new_path"; then
17568    dxsdk_path="$new_path"
17569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17570$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17571  fi
17572
17573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17575
17576  else
17577    # We're on a posix platform. Hooray! :)
17578    path="$dxsdk_path"
17579    has_space=`$ECHO "$path" | $GREP " "`
17580    if test "x$has_space" != x; then
17581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17582$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17583      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17584    fi
17585
17586    # Use eval to expand a potential ~
17587    eval path="$path"
17588    if test ! -f "$path" && test ! -d "$path"; then
17589      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17590    fi
17591
17592    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17593  fi
17594
17595
17596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17597$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17598  if test "x$with_dxsdk_lib" != x; then
17599    DXSDK_LIB_PATH="$with_dxsdk_lib"
17600  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17601    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17602  else
17603    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17604  fi
17605  # dsound.lib is linked to in jsoundds
17606  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17607    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17608  fi
17609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17610$as_echo "$DXSDK_LIB_PATH" >&6; }
17611
17612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17613
17614  # Input might be given as Windows format, start by converting to
17615  # unix format.
17616  path="$DXSDK_LIB_PATH"
17617  new_path=`$CYGPATH -u "$path"`
17618
17619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17622  # "foo.exe" is OK but "foo" is an error.
17623  #
17624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17625  # It is also a way to make sure we got the proper file name for the real test later on.
17626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17627  if test "x$test_shortpath" = x; then
17628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17629$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17630    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17631  fi
17632
17633  # Call helper function which possibly converts this using DOS-style short mode.
17634  # If so, the updated path is stored in $new_path.
17635
17636  input_path="$new_path"
17637  # Check if we need to convert this using DOS-style short mode. If the path
17638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17639  # take no chances and rewrite it.
17640  # Note: m4 eats our [], so we need to use [ and ] instead.
17641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17642  if test "x$has_forbidden_chars" != x; then
17643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17647      # Going to short mode and back again did indeed matter. Since short mode is
17648      # case insensitive, let's make it lowercase to improve readability.
17649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17650      # Now convert it back to Unix-stile (cygpath)
17651      input_path=`$CYGPATH -u "$shortmode_path"`
17652      new_path="$input_path"
17653    fi
17654  fi
17655
17656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17657  if test "x$test_cygdrive_prefix" = x; then
17658    # As a simple fix, exclude /usr/bin since it's not a real path.
17659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17661      # a path prefixed by /cygdrive for fixpath to work.
17662      new_path="$CYGWIN_ROOT_PATH$input_path"
17663    fi
17664  fi
17665
17666
17667  if test "x$path" != "x$new_path"; then
17668    DXSDK_LIB_PATH="$new_path"
17669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17670$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17671  fi
17672
17673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17674
17675  path="$DXSDK_LIB_PATH"
17676  has_colon=`$ECHO $path | $GREP ^.:`
17677  new_path="$path"
17678  if test "x$has_colon" = x; then
17679    # Not in mixed or Windows style, start by that.
17680    new_path=`cmd //c echo $path`
17681  fi
17682
17683
17684  input_path="$new_path"
17685  # Check if we need to convert this using DOS-style short mode. If the path
17686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17687  # take no chances and rewrite it.
17688  # Note: m4 eats our [], so we need to use [ and ] instead.
17689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17690  if test "x$has_forbidden_chars" != x; then
17691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17693  fi
17694
17695
17696  windows_path="$new_path"
17697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17698    unix_path=`$CYGPATH -u "$windows_path"`
17699    new_path="$unix_path"
17700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17702    new_path="$unix_path"
17703  fi
17704
17705  if test "x$path" != "x$new_path"; then
17706    DXSDK_LIB_PATH="$new_path"
17707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17708$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17709  fi
17710
17711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17713
17714  else
17715    # We're on a posix platform. Hooray! :)
17716    path="$DXSDK_LIB_PATH"
17717    has_space=`$ECHO "$path" | $GREP " "`
17718    if test "x$has_space" != x; then
17719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17720$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17721      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17722    fi
17723
17724    # Use eval to expand a potential ~
17725    eval path="$path"
17726    if test ! -f "$path" && test ! -d "$path"; then
17727      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17728    fi
17729
17730    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17731  fi
17732
17733
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17735$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17736  if test "x$with_dxsdk_include" != x; then
17737    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17738  else
17739    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17740  fi
17741  # dsound.h is included in jsoundds
17742  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17743    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17744  fi
17745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17746$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17747
17748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17749
17750  # Input might be given as Windows format, start by converting to
17751  # unix format.
17752  path="$DXSDK_INCLUDE_PATH"
17753  new_path=`$CYGPATH -u "$path"`
17754
17755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17758  # "foo.exe" is OK but "foo" is an error.
17759  #
17760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17761  # It is also a way to make sure we got the proper file name for the real test later on.
17762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17763  if test "x$test_shortpath" = x; then
17764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17765$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17766    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17767  fi
17768
17769  # Call helper function which possibly converts this using DOS-style short mode.
17770  # If so, the updated path is stored in $new_path.
17771
17772  input_path="$new_path"
17773  # Check if we need to convert this using DOS-style short mode. If the path
17774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17775  # take no chances and rewrite it.
17776  # Note: m4 eats our [], so we need to use [ and ] instead.
17777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17778  if test "x$has_forbidden_chars" != x; then
17779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17783      # Going to short mode and back again did indeed matter. Since short mode is
17784      # case insensitive, let's make it lowercase to improve readability.
17785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17786      # Now convert it back to Unix-stile (cygpath)
17787      input_path=`$CYGPATH -u "$shortmode_path"`
17788      new_path="$input_path"
17789    fi
17790  fi
17791
17792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17793  if test "x$test_cygdrive_prefix" = x; then
17794    # As a simple fix, exclude /usr/bin since it's not a real path.
17795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17797      # a path prefixed by /cygdrive for fixpath to work.
17798      new_path="$CYGWIN_ROOT_PATH$input_path"
17799    fi
17800  fi
17801
17802
17803  if test "x$path" != "x$new_path"; then
17804    DXSDK_INCLUDE_PATH="$new_path"
17805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17806$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17807  fi
17808
17809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17810
17811  path="$DXSDK_INCLUDE_PATH"
17812  has_colon=`$ECHO $path | $GREP ^.:`
17813  new_path="$path"
17814  if test "x$has_colon" = x; then
17815    # Not in mixed or Windows style, start by that.
17816    new_path=`cmd //c echo $path`
17817  fi
17818
17819
17820  input_path="$new_path"
17821  # Check if we need to convert this using DOS-style short mode. If the path
17822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17823  # take no chances and rewrite it.
17824  # Note: m4 eats our [], so we need to use [ and ] instead.
17825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17826  if test "x$has_forbidden_chars" != x; then
17827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17829  fi
17830
17831
17832  windows_path="$new_path"
17833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17834    unix_path=`$CYGPATH -u "$windows_path"`
17835    new_path="$unix_path"
17836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17838    new_path="$unix_path"
17839  fi
17840
17841  if test "x$path" != "x$new_path"; then
17842    DXSDK_INCLUDE_PATH="$new_path"
17843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17844$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17845  fi
17846
17847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17849
17850  else
17851    # We're on a posix platform. Hooray! :)
17852    path="$DXSDK_INCLUDE_PATH"
17853    has_space=`$ECHO "$path" | $GREP " "`
17854    if test "x$has_space" != x; then
17855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17856$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17858    fi
17859
17860    # Use eval to expand a potential ~
17861    eval path="$path"
17862    if test ! -f "$path" && test ! -d "$path"; then
17863      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17864    fi
17865
17866    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17867  fi
17868
17869
17870
17871
17872  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17873
17874fi
17875
17876
17877
17878# If --build AND --host is set, then the configure script will find any
17879# cross compilation tools in the PATH. Cross compilation tools
17880# follows the cross compilation standard where they are prefixed with ${host}.
17881# For example the binary i686-sun-solaris2.10-gcc
17882# will cross compile for i686-sun-solaris2.10
17883# If neither of build and host is not set, then build=host and the
17884# default compiler found in the path will be used.
17885# Setting only --host, does not seem to be really supported.
17886# Please set both --build and --host if you want to cross compile.
17887
17888if test "x$COMPILE_TYPE" = "xcross"; then
17889    # Now we to find a C/C++ compiler that can build executables for the build
17890    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17891    # once. Also, we need to do this before adding a tools dir to the path,
17892    # otherwise we might pick up cross-compilers which don't use standard naming.
17893    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17894    # to wait until they are properly discovered.
17895    for ac_prog in cl cc gcc
17896do
17897  # Extract the first word of "$ac_prog", so it can be a program name with args.
17898set dummy $ac_prog; ac_word=$2
17899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17900$as_echo_n "checking for $ac_word... " >&6; }
17901if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17902  $as_echo_n "(cached) " >&6
17903else
17904  case $BUILD_CC in
17905  [\\/]* | ?:[\\/]*)
17906  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17907  ;;
17908  *)
17909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17910for as_dir in $PATH
17911do
17912  IFS=$as_save_IFS
17913  test -z "$as_dir" && as_dir=.
17914    for ac_exec_ext in '' $ac_executable_extensions; do
17915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17916    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17918    break 2
17919  fi
17920done
17921  done
17922IFS=$as_save_IFS
17923
17924  ;;
17925esac
17926fi
17927BUILD_CC=$ac_cv_path_BUILD_CC
17928if test -n "$BUILD_CC"; then
17929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17930$as_echo "$BUILD_CC" >&6; }
17931else
17932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17933$as_echo "no" >&6; }
17934fi
17935
17936
17937  test -n "$BUILD_CC" && break
17938done
17939
17940
17941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17942
17943  # First separate the path from the arguments. This will split at the first
17944  # space.
17945  complete="$BUILD_CC"
17946  path="${complete%% *}"
17947  tmp="$complete EOL"
17948  arguments="${tmp#* }"
17949
17950  # Input might be given as Windows format, start by converting to
17951  # unix format.
17952  new_path=`$CYGPATH -u "$path"`
17953
17954  # Now try to locate executable using which
17955  new_path=`$WHICH "$new_path" 2> /dev/null`
17956  # bat and cmd files are not always considered executable in cygwin causing which
17957  # to not find them
17958  if test "x$new_path" = x \
17959           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17960           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17961    new_path=`$CYGPATH -u "$path"`
17962  fi
17963  if test "x$new_path" = x; then
17964    # Oops. Which didn't find the executable.
17965    # The splitting of arguments from the executable at a space might have been incorrect,
17966    # since paths with space are more likely in Windows. Give it another try with the whole
17967    # argument.
17968    path="$complete"
17969    arguments="EOL"
17970    new_path=`$CYGPATH -u "$path"`
17971    new_path=`$WHICH "$new_path" 2> /dev/null`
17972    # bat and cmd files are not always considered executable in cygwin causing which
17973    # to not find them
17974    if test "x$new_path" = x \
17975             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17976             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17977      new_path=`$CYGPATH -u "$path"`
17978    fi
17979    if test "x$new_path" = x; then
17980      # It's still not found. Now this is an unrecoverable error.
17981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17982$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17983      has_space=`$ECHO "$complete" | $GREP " "`
17984      if test "x$has_space" != x; then
17985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17987      fi
17988      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17989    fi
17990  fi
17991
17992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17995  # "foo.exe" is OK but "foo" is an error.
17996  #
17997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17998  # It is also a way to make sure we got the proper file name for the real test later on.
17999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18000  if test "x$test_shortpath" = x; then
18001    # Short path failed, file does not exist as specified.
18002    # Try adding .exe or .cmd
18003    if test -f "${new_path}.exe"; then
18004       input_to_shortpath="${new_path}.exe"
18005    elif test -f "${new_path}.cmd"; then
18006       input_to_shortpath="${new_path}.cmd"
18007    else
18008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18009$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18012      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18013    fi
18014  else
18015    input_to_shortpath="$new_path"
18016  fi
18017
18018  # Call helper function which possibly converts this using DOS-style short mode.
18019  # If so, the updated path is stored in $new_path.
18020  new_path="$input_to_shortpath"
18021
18022  input_path="$input_to_shortpath"
18023  # Check if we need to convert this using DOS-style short mode. If the path
18024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18025  # take no chances and rewrite it.
18026  # Note: m4 eats our [], so we need to use [ and ] instead.
18027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18028  if test "x$has_forbidden_chars" != x; then
18029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18033      # Going to short mode and back again did indeed matter. Since short mode is
18034      # case insensitive, let's make it lowercase to improve readability.
18035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18036      # Now convert it back to Unix-stile (cygpath)
18037      input_path=`$CYGPATH -u "$shortmode_path"`
18038      new_path="$input_path"
18039    fi
18040  fi
18041
18042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18043  if test "x$test_cygdrive_prefix" = x; then
18044    # As a simple fix, exclude /usr/bin since it's not a real path.
18045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18047      # a path prefixed by /cygdrive for fixpath to work.
18048      new_path="$CYGWIN_ROOT_PATH$input_path"
18049    fi
18050  fi
18051
18052  # remove trailing .exe if any
18053  new_path="${new_path/%.exe/}"
18054
18055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18056
18057  # First separate the path from the arguments. This will split at the first
18058  # space.
18059  complete="$BUILD_CC"
18060  path="${complete%% *}"
18061  tmp="$complete EOL"
18062  arguments="${tmp#* }"
18063
18064  # Input might be given as Windows format, start by converting to
18065  # unix format.
18066  new_path="$path"
18067
18068  windows_path="$new_path"
18069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18070    unix_path=`$CYGPATH -u "$windows_path"`
18071    new_path="$unix_path"
18072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18074    new_path="$unix_path"
18075  fi
18076
18077
18078  # Now try to locate executable using which
18079  new_path=`$WHICH "$new_path" 2> /dev/null`
18080
18081  if test "x$new_path" = x; then
18082    # Oops. Which didn't find the executable.
18083    # The splitting of arguments from the executable at a space might have been incorrect,
18084    # since paths with space are more likely in Windows. Give it another try with the whole
18085    # argument.
18086    path="$complete"
18087    arguments="EOL"
18088    new_path="$path"
18089
18090  windows_path="$new_path"
18091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18092    unix_path=`$CYGPATH -u "$windows_path"`
18093    new_path="$unix_path"
18094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18096    new_path="$unix_path"
18097  fi
18098
18099
18100    new_path=`$WHICH "$new_path" 2> /dev/null`
18101
18102    if test "x$new_path" = x; then
18103      # It's still not found. Now this is an unrecoverable error.
18104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18105$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18106      has_space=`$ECHO "$complete" | $GREP " "`
18107      if test "x$has_space" != x; then
18108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18110      fi
18111      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18112    fi
18113  fi
18114
18115  # Now new_path has a complete unix path to the binary
18116  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18117    # Keep paths in /bin as-is, but remove trailing .exe if any
18118    new_path="${new_path/%.exe/}"
18119    # Do not save /bin paths to all_fixpath_prefixes!
18120  else
18121    # Not in mixed or Windows style, start by that.
18122    new_path=`cmd //c echo $new_path`
18123
18124  input_path="$new_path"
18125  # Check if we need to convert this using DOS-style short mode. If the path
18126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18127  # take no chances and rewrite it.
18128  # Note: m4 eats our [], so we need to use [ and ] instead.
18129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18130  if test "x$has_forbidden_chars" != x; then
18131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18133  fi
18134
18135    # Output is in $new_path
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146    # remove trailing .exe if any
18147    new_path="${new_path/%.exe/}"
18148
18149    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18150    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18151  fi
18152
18153  else
18154    # We're on a posix platform. Hooray! :)
18155    # First separate the path from the arguments. This will split at the first
18156    # space.
18157    complete="$BUILD_CC"
18158    path="${complete%% *}"
18159    tmp="$complete EOL"
18160    arguments="${tmp#* }"
18161
18162    # Cannot rely on the command "which" here since it doesn't always work.
18163    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18164    if test -z "$is_absolute_path"; then
18165      # Path to executable is not absolute. Find it.
18166      IFS_save="$IFS"
18167      IFS=:
18168      for p in $PATH; do
18169        if test -f "$p/$path" && test -x "$p/$path"; then
18170          new_path="$p/$path"
18171          break
18172        fi
18173      done
18174      IFS="$IFS_save"
18175    else
18176      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18177$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18178      new_path="$path"
18179    fi
18180
18181    if test "x$new_path" = x; then
18182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18183$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18184        has_space=`$ECHO "$complete" | $GREP " "`
18185        if test "x$has_space" != x; then
18186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18188        fi
18189        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18190      fi
18191  fi
18192
18193      # Now join together the path and the arguments once again
18194      if test "x$arguments" != xEOL; then
18195        new_complete="$new_path ${arguments% *}"
18196      else
18197        new_complete="$new_path"
18198      fi
18199
18200  if test "x$complete" != "x$new_complete"; then
18201      BUILD_CC="$new_complete"
18202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18203$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18204    fi
18205
18206    for ac_prog in cl CC g++
18207do
18208  # Extract the first word of "$ac_prog", so it can be a program name with args.
18209set dummy $ac_prog; ac_word=$2
18210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18211$as_echo_n "checking for $ac_word... " >&6; }
18212if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18213  $as_echo_n "(cached) " >&6
18214else
18215  case $BUILD_CXX in
18216  [\\/]* | ?:[\\/]*)
18217  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18218  ;;
18219  *)
18220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18221for as_dir in $PATH
18222do
18223  IFS=$as_save_IFS
18224  test -z "$as_dir" && as_dir=.
18225    for ac_exec_ext in '' $ac_executable_extensions; do
18226  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18227    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18229    break 2
18230  fi
18231done
18232  done
18233IFS=$as_save_IFS
18234
18235  ;;
18236esac
18237fi
18238BUILD_CXX=$ac_cv_path_BUILD_CXX
18239if test -n "$BUILD_CXX"; then
18240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18241$as_echo "$BUILD_CXX" >&6; }
18242else
18243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18244$as_echo "no" >&6; }
18245fi
18246
18247
18248  test -n "$BUILD_CXX" && break
18249done
18250
18251
18252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253
18254  # First separate the path from the arguments. This will split at the first
18255  # space.
18256  complete="$BUILD_CXX"
18257  path="${complete%% *}"
18258  tmp="$complete EOL"
18259  arguments="${tmp#* }"
18260
18261  # Input might be given as Windows format, start by converting to
18262  # unix format.
18263  new_path=`$CYGPATH -u "$path"`
18264
18265  # Now try to locate executable using which
18266  new_path=`$WHICH "$new_path" 2> /dev/null`
18267  # bat and cmd files are not always considered executable in cygwin causing which
18268  # to not find them
18269  if test "x$new_path" = x \
18270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18272    new_path=`$CYGPATH -u "$path"`
18273  fi
18274  if test "x$new_path" = x; then
18275    # Oops. Which didn't find the executable.
18276    # The splitting of arguments from the executable at a space might have been incorrect,
18277    # since paths with space are more likely in Windows. Give it another try with the whole
18278    # argument.
18279    path="$complete"
18280    arguments="EOL"
18281    new_path=`$CYGPATH -u "$path"`
18282    new_path=`$WHICH "$new_path" 2> /dev/null`
18283    # bat and cmd files are not always considered executable in cygwin causing which
18284    # to not find them
18285    if test "x$new_path" = x \
18286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18288      new_path=`$CYGPATH -u "$path"`
18289    fi
18290    if test "x$new_path" = x; then
18291      # It's still not found. Now this is an unrecoverable error.
18292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18293$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18294      has_space=`$ECHO "$complete" | $GREP " "`
18295      if test "x$has_space" != x; then
18296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18298      fi
18299      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18300    fi
18301  fi
18302
18303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18306  # "foo.exe" is OK but "foo" is an error.
18307  #
18308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18309  # It is also a way to make sure we got the proper file name for the real test later on.
18310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18311  if test "x$test_shortpath" = x; then
18312    # Short path failed, file does not exist as specified.
18313    # Try adding .exe or .cmd
18314    if test -f "${new_path}.exe"; then
18315       input_to_shortpath="${new_path}.exe"
18316    elif test -f "${new_path}.cmd"; then
18317       input_to_shortpath="${new_path}.cmd"
18318    else
18319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18320$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18323      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18324    fi
18325  else
18326    input_to_shortpath="$new_path"
18327  fi
18328
18329  # Call helper function which possibly converts this using DOS-style short mode.
18330  # If so, the updated path is stored in $new_path.
18331  new_path="$input_to_shortpath"
18332
18333  input_path="$input_to_shortpath"
18334  # Check if we need to convert this using DOS-style short mode. If the path
18335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18336  # take no chances and rewrite it.
18337  # Note: m4 eats our [], so we need to use [ and ] instead.
18338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18339  if test "x$has_forbidden_chars" != x; then
18340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18344      # Going to short mode and back again did indeed matter. Since short mode is
18345      # case insensitive, let's make it lowercase to improve readability.
18346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18347      # Now convert it back to Unix-stile (cygpath)
18348      input_path=`$CYGPATH -u "$shortmode_path"`
18349      new_path="$input_path"
18350    fi
18351  fi
18352
18353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18354  if test "x$test_cygdrive_prefix" = x; then
18355    # As a simple fix, exclude /usr/bin since it's not a real path.
18356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18358      # a path prefixed by /cygdrive for fixpath to work.
18359      new_path="$CYGWIN_ROOT_PATH$input_path"
18360    fi
18361  fi
18362
18363  # remove trailing .exe if any
18364  new_path="${new_path/%.exe/}"
18365
18366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367
18368  # First separate the path from the arguments. This will split at the first
18369  # space.
18370  complete="$BUILD_CXX"
18371  path="${complete%% *}"
18372  tmp="$complete EOL"
18373  arguments="${tmp#* }"
18374
18375  # Input might be given as Windows format, start by converting to
18376  # unix format.
18377  new_path="$path"
18378
18379  windows_path="$new_path"
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    unix_path=`$CYGPATH -u "$windows_path"`
18382    new_path="$unix_path"
18383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18385    new_path="$unix_path"
18386  fi
18387
18388
18389  # Now try to locate executable using which
18390  new_path=`$WHICH "$new_path" 2> /dev/null`
18391
18392  if test "x$new_path" = x; then
18393    # Oops. Which didn't find the executable.
18394    # The splitting of arguments from the executable at a space might have been incorrect,
18395    # since paths with space are more likely in Windows. Give it another try with the whole
18396    # argument.
18397    path="$complete"
18398    arguments="EOL"
18399    new_path="$path"
18400
18401  windows_path="$new_path"
18402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18403    unix_path=`$CYGPATH -u "$windows_path"`
18404    new_path="$unix_path"
18405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18407    new_path="$unix_path"
18408  fi
18409
18410
18411    new_path=`$WHICH "$new_path" 2> /dev/null`
18412
18413    if test "x$new_path" = x; then
18414      # It's still not found. Now this is an unrecoverable error.
18415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18416$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18417      has_space=`$ECHO "$complete" | $GREP " "`
18418      if test "x$has_space" != x; then
18419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18421      fi
18422      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18423    fi
18424  fi
18425
18426  # Now new_path has a complete unix path to the binary
18427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18428    # Keep paths in /bin as-is, but remove trailing .exe if any
18429    new_path="${new_path/%.exe/}"
18430    # Do not save /bin paths to all_fixpath_prefixes!
18431  else
18432    # Not in mixed or Windows style, start by that.
18433    new_path=`cmd //c echo $new_path`
18434
18435  input_path="$new_path"
18436  # Check if we need to convert this using DOS-style short mode. If the path
18437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18438  # take no chances and rewrite it.
18439  # Note: m4 eats our [], so we need to use [ and ] instead.
18440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18441  if test "x$has_forbidden_chars" != x; then
18442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18444  fi
18445
18446    # Output is in $new_path
18447
18448  windows_path="$new_path"
18449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18450    unix_path=`$CYGPATH -u "$windows_path"`
18451    new_path="$unix_path"
18452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18454    new_path="$unix_path"
18455  fi
18456
18457    # remove trailing .exe if any
18458    new_path="${new_path/%.exe/}"
18459
18460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18462  fi
18463
18464  else
18465    # We're on a posix platform. Hooray! :)
18466    # First separate the path from the arguments. This will split at the first
18467    # space.
18468    complete="$BUILD_CXX"
18469    path="${complete%% *}"
18470    tmp="$complete EOL"
18471    arguments="${tmp#* }"
18472
18473    # Cannot rely on the command "which" here since it doesn't always work.
18474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18475    if test -z "$is_absolute_path"; then
18476      # Path to executable is not absolute. Find it.
18477      IFS_save="$IFS"
18478      IFS=:
18479      for p in $PATH; do
18480        if test -f "$p/$path" && test -x "$p/$path"; then
18481          new_path="$p/$path"
18482          break
18483        fi
18484      done
18485      IFS="$IFS_save"
18486    else
18487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18488$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18489      new_path="$path"
18490    fi
18491
18492    if test "x$new_path" = x; then
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18494$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18495        has_space=`$ECHO "$complete" | $GREP " "`
18496        if test "x$has_space" != x; then
18497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18499        fi
18500        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18501      fi
18502  fi
18503
18504      # Now join together the path and the arguments once again
18505      if test "x$arguments" != xEOL; then
18506        new_complete="$new_path ${arguments% *}"
18507      else
18508        new_complete="$new_path"
18509      fi
18510
18511  if test "x$complete" != "x$new_complete"; then
18512      BUILD_CXX="$new_complete"
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18514$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18515    fi
18516
18517    # Extract the first word of "ld", so it can be a program name with args.
18518set dummy ld; ac_word=$2
18519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18520$as_echo_n "checking for $ac_word... " >&6; }
18521if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18522  $as_echo_n "(cached) " >&6
18523else
18524  case $BUILD_LD in
18525  [\\/]* | ?:[\\/]*)
18526  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18527  ;;
18528  *)
18529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530for as_dir in $PATH
18531do
18532  IFS=$as_save_IFS
18533  test -z "$as_dir" && as_dir=.
18534    for ac_exec_ext in '' $ac_executable_extensions; do
18535  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18536    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18538    break 2
18539  fi
18540done
18541  done
18542IFS=$as_save_IFS
18543
18544  ;;
18545esac
18546fi
18547BUILD_LD=$ac_cv_path_BUILD_LD
18548if test -n "$BUILD_LD"; then
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18550$as_echo "$BUILD_LD" >&6; }
18551else
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18553$as_echo "no" >&6; }
18554fi
18555
18556
18557
18558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18559
18560  # First separate the path from the arguments. This will split at the first
18561  # space.
18562  complete="$BUILD_LD"
18563  path="${complete%% *}"
18564  tmp="$complete EOL"
18565  arguments="${tmp#* }"
18566
18567  # Input might be given as Windows format, start by converting to
18568  # unix format.
18569  new_path=`$CYGPATH -u "$path"`
18570
18571  # Now try to locate executable using which
18572  new_path=`$WHICH "$new_path" 2> /dev/null`
18573  # bat and cmd files are not always considered executable in cygwin causing which
18574  # to not find them
18575  if test "x$new_path" = x \
18576           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18577           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18578    new_path=`$CYGPATH -u "$path"`
18579  fi
18580  if test "x$new_path" = x; then
18581    # Oops. Which didn't find the executable.
18582    # The splitting of arguments from the executable at a space might have been incorrect,
18583    # since paths with space are more likely in Windows. Give it another try with the whole
18584    # argument.
18585    path="$complete"
18586    arguments="EOL"
18587    new_path=`$CYGPATH -u "$path"`
18588    new_path=`$WHICH "$new_path" 2> /dev/null`
18589    # bat and cmd files are not always considered executable in cygwin causing which
18590    # to not find them
18591    if test "x$new_path" = x \
18592             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18593             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18594      new_path=`$CYGPATH -u "$path"`
18595    fi
18596    if test "x$new_path" = x; then
18597      # It's still not found. Now this is an unrecoverable error.
18598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18599$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18600      has_space=`$ECHO "$complete" | $GREP " "`
18601      if test "x$has_space" != x; then
18602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18604      fi
18605      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18606    fi
18607  fi
18608
18609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18612  # "foo.exe" is OK but "foo" is an error.
18613  #
18614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18615  # It is also a way to make sure we got the proper file name for the real test later on.
18616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18617  if test "x$test_shortpath" = x; then
18618    # Short path failed, file does not exist as specified.
18619    # Try adding .exe or .cmd
18620    if test -f "${new_path}.exe"; then
18621       input_to_shortpath="${new_path}.exe"
18622    elif test -f "${new_path}.cmd"; then
18623       input_to_shortpath="${new_path}.cmd"
18624    else
18625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18626$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18629      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18630    fi
18631  else
18632    input_to_shortpath="$new_path"
18633  fi
18634
18635  # Call helper function which possibly converts this using DOS-style short mode.
18636  # If so, the updated path is stored in $new_path.
18637  new_path="$input_to_shortpath"
18638
18639  input_path="$input_to_shortpath"
18640  # Check if we need to convert this using DOS-style short mode. If the path
18641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18642  # take no chances and rewrite it.
18643  # Note: m4 eats our [], so we need to use [ and ] instead.
18644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18645  if test "x$has_forbidden_chars" != x; then
18646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18650      # Going to short mode and back again did indeed matter. Since short mode is
18651      # case insensitive, let's make it lowercase to improve readability.
18652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18653      # Now convert it back to Unix-stile (cygpath)
18654      input_path=`$CYGPATH -u "$shortmode_path"`
18655      new_path="$input_path"
18656    fi
18657  fi
18658
18659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18660  if test "x$test_cygdrive_prefix" = x; then
18661    # As a simple fix, exclude /usr/bin since it's not a real path.
18662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18664      # a path prefixed by /cygdrive for fixpath to work.
18665      new_path="$CYGWIN_ROOT_PATH$input_path"
18666    fi
18667  fi
18668
18669  # remove trailing .exe if any
18670  new_path="${new_path/%.exe/}"
18671
18672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18673
18674  # First separate the path from the arguments. This will split at the first
18675  # space.
18676  complete="$BUILD_LD"
18677  path="${complete%% *}"
18678  tmp="$complete EOL"
18679  arguments="${tmp#* }"
18680
18681  # Input might be given as Windows format, start by converting to
18682  # unix format.
18683  new_path="$path"
18684
18685  windows_path="$new_path"
18686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18687    unix_path=`$CYGPATH -u "$windows_path"`
18688    new_path="$unix_path"
18689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18691    new_path="$unix_path"
18692  fi
18693
18694
18695  # Now try to locate executable using which
18696  new_path=`$WHICH "$new_path" 2> /dev/null`
18697
18698  if test "x$new_path" = x; then
18699    # Oops. Which didn't find the executable.
18700    # The splitting of arguments from the executable at a space might have been incorrect,
18701    # since paths with space are more likely in Windows. Give it another try with the whole
18702    # argument.
18703    path="$complete"
18704    arguments="EOL"
18705    new_path="$path"
18706
18707  windows_path="$new_path"
18708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18709    unix_path=`$CYGPATH -u "$windows_path"`
18710    new_path="$unix_path"
18711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18713    new_path="$unix_path"
18714  fi
18715
18716
18717    new_path=`$WHICH "$new_path" 2> /dev/null`
18718
18719    if test "x$new_path" = x; then
18720      # It's still not found. Now this is an unrecoverable error.
18721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18722$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18723      has_space=`$ECHO "$complete" | $GREP " "`
18724      if test "x$has_space" != x; then
18725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18727      fi
18728      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18729    fi
18730  fi
18731
18732  # Now new_path has a complete unix path to the binary
18733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18734    # Keep paths in /bin as-is, but remove trailing .exe if any
18735    new_path="${new_path/%.exe/}"
18736    # Do not save /bin paths to all_fixpath_prefixes!
18737  else
18738    # Not in mixed or Windows style, start by that.
18739    new_path=`cmd //c echo $new_path`
18740
18741  input_path="$new_path"
18742  # Check if we need to convert this using DOS-style short mode. If the path
18743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18744  # take no chances and rewrite it.
18745  # Note: m4 eats our [], so we need to use [ and ] instead.
18746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18747  if test "x$has_forbidden_chars" != x; then
18748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18750  fi
18751
18752    # Output is in $new_path
18753
18754  windows_path="$new_path"
18755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18756    unix_path=`$CYGPATH -u "$windows_path"`
18757    new_path="$unix_path"
18758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18760    new_path="$unix_path"
18761  fi
18762
18763    # remove trailing .exe if any
18764    new_path="${new_path/%.exe/}"
18765
18766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18768  fi
18769
18770  else
18771    # We're on a posix platform. Hooray! :)
18772    # First separate the path from the arguments. This will split at the first
18773    # space.
18774    complete="$BUILD_LD"
18775    path="${complete%% *}"
18776    tmp="$complete EOL"
18777    arguments="${tmp#* }"
18778
18779    # Cannot rely on the command "which" here since it doesn't always work.
18780    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18781    if test -z "$is_absolute_path"; then
18782      # Path to executable is not absolute. Find it.
18783      IFS_save="$IFS"
18784      IFS=:
18785      for p in $PATH; do
18786        if test -f "$p/$path" && test -x "$p/$path"; then
18787          new_path="$p/$path"
18788          break
18789        fi
18790      done
18791      IFS="$IFS_save"
18792    else
18793      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18794$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18795      new_path="$path"
18796    fi
18797
18798    if test "x$new_path" = x; then
18799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18800$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18801        has_space=`$ECHO "$complete" | $GREP " "`
18802        if test "x$has_space" != x; then
18803          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18804$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18805        fi
18806        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18807      fi
18808  fi
18809
18810      # Now join together the path and the arguments once again
18811      if test "x$arguments" != xEOL; then
18812        new_complete="$new_path ${arguments% *}"
18813      else
18814        new_complete="$new_path"
18815      fi
18816
18817  if test "x$complete" != "x$new_complete"; then
18818      BUILD_LD="$new_complete"
18819      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18820$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18821    fi
18822
18823fi
18824
18825
18826
18827
18828# If a devkit is found on the builddeps server, then prepend its path to the
18829# PATH variable. If there are cross compilers available in the devkit, these
18830# will be found by AC_PROG_CC et al.
18831DEVKIT=
18832
18833
18834    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18835        # Source the builddeps file again, to make sure it uses the latest variables!
18836        . $builddepsfile
18837        # Look for a target and build machine specific resource!
18838        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18839        if test "x$resource" = x; then
18840            # Ok, lets instead look for a target specific resource
18841            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18842        fi
18843        if test "x$resource" = x; then
18844            # Ok, lets instead look for a build specific resource
18845            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18846        fi
18847        if test "x$resource" = x; then
18848            # Ok, lets instead look for a generic resource
18849            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18850            resource=${builddep_devkit}
18851        fi
18852        if test "x$resource" != x; then
18853            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18854$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18855	    # If the resource in the builddeps.conf file is an existing directory,
18856	    # for example /java/linux/cups
18857	    if test -d ${resource}; then
18858	       depdir=${resource}
18859	    else
18860
18861# devkit is for example mymodule
18862# $resource is for example libs/general/libmymod_1_2_3.zip
18863# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18864# $with_builddeps_dir is for example /localhome/builddeps
18865# depdir is the name of the variable into which we store the depdir, eg MYMOD
18866# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18867# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18868    filename=`basename $resource`
18869    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18870    filebase=${filename%%.*}
18871    extension=${filename#*.}
18872    installdir=$with_builddeps_dir/$filebase
18873    if test ! -f $installdir/$filename.unpacked; then
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18875$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18876        if test ! -d $installdir; then
18877            mkdir -p $installdir
18878        fi
18879        if test ! -d $installdir; then
18880            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18881        fi
18882        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18883        touch $tmpfile
18884        if test ! -f $tmpfile; then
18885            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18886        fi
18887
18888    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18889    # $tmpfile is the local file name for the downloaded file.
18890    VALID_TOOL=no
18891    if test "x$BDEPS_FTP" = xwget; then
18892       VALID_TOOL=yes
18893       wget -O $tmpfile $with_builddeps_server/$resource
18894    fi
18895    if test "x$BDEPS_FTP" = xlftp; then
18896       VALID_TOOL=yes
18897       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18898    fi
18899    if test "x$BDEPS_FTP" = xftp; then
18900        VALID_TOOL=yes
18901        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18902        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18903        FTPUSERPWD=${FTPSERVER%%@*}
18904        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18905            FTPUSER=${userpwd%%:*}
18906            FTPPWD=${userpwd#*@}
18907            FTPSERVER=${FTPSERVER#*@}
18908        else
18909            FTPUSER=ftp
18910            FTPPWD=ftp
18911        fi
18912        # the "pass" command does not work on some
18913        # ftp clients (read ftp.exe) but if it works,
18914        # passive mode is better!
18915        (\
18916            echo "user $FTPUSER $FTPPWD"        ;\
18917            echo "pass"                         ;\
18918            echo "bin"                          ;\
18919            echo "get $FTPPATH $tmpfile"              ;\
18920        ) | ftp -in $FTPSERVER
18921    fi
18922    if test "x$VALID_TOOL" != xyes; then
18923       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18924    fi
18925
18926        mv $tmpfile $installdir/$filename
18927        if test ! -s $installdir/$filename; then
18928            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18929        fi
18930        case "$extension" in
18931            zip)  echo "Unzipping $installdir/$filename..."
18932               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18933            ;;
18934            tar.gz) echo "Untaring $installdir/$filename..."
18935               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18936            ;;
18937            tgz) echo "Untaring $installdir/$filename..."
18938               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18939            ;;
18940            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18941            ;;
18942        esac
18943    fi
18944    if test -f $installdir/$filename.unpacked; then
18945        depdir=$installdir
18946    fi
18947
18948	    fi
18949            # Source the builddeps file again, because in the previous command, the depdir
18950            # was updated to point at the current build dependency install directory.
18951            . $builddepsfile
18952            # Now extract variables from the builddeps.conf files.
18953            theroot=${builddep_devkit_ROOT}
18954            thecflags=${builddep_devkit_CFLAGS}
18955            thelibs=${builddep_devkit_LIBS}
18956            if test "x$depdir" = x; then
18957                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18958            fi
18959            DEVKIT=$depdir
18960            if test "x$theroot" != x; then
18961               DEVKIT="$theroot"
18962            fi
18963            if test "x$thecflags" != x; then
18964               DEVKIT_CFLAGS="$thecflags"
18965            fi
18966            if test "x$thelibs" != x; then
18967               DEVKIT_LIBS="$thelibs"
18968            fi
18969            # Found devkit
18970                     PATH="$DEVKIT/bin:$PATH"
18971                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18972                     if test "x$x_includes" = "xNONE"; then
18973                         x_includes="$SYS_ROOT/usr/include/X11"
18974                     fi
18975                     if test "x$x_libraries" = "xNONE"; then
18976                         x_libraries="$SYS_ROOT/usr/lib"
18977                     fi
18978
18979
18980        fi
18981
18982    fi
18983
18984
18985if test "x$SYS_ROOT" != "x/" ; then
18986    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18987    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18988    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18989    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18990    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18991    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18992fi
18993
18994# Store the CFLAGS etal passed to the configure script.
18995ORG_CFLAGS="$CFLAGS"
18996ORG_CXXFLAGS="$CXXFLAGS"
18997ORG_OBJCFLAGS="$OBJCFLAGS"
18998
18999# autoconf magic only relies on PATH, so update it if tools dir is specified
19000OLD_PATH="$PATH"
19001if test "x$TOOLS_DIR" != x; then
19002  PATH=$TOOLS_DIR:$PATH
19003fi
19004
19005
19006### Locate C compiler (CC)
19007
19008# On windows, only cl.exe is supported.
19009# On Solaris, cc is preferred to gcc.
19010# Elsewhere, gcc is preferred to cc.
19011
19012if test "x$CC" != x; then
19013  COMPILER_CHECK_LIST="$CC"
19014elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19015  COMPILER_CHECK_LIST="cl"
19016elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19017  COMPILER_CHECK_LIST="cc gcc"
19018else
19019  COMPILER_CHECK_LIST="gcc cc"
19020fi
19021
19022
19023  COMPILER_NAME=C
19024
19025  CC=
19026  # If TOOLS_DIR is set, check for all compiler names in there first
19027  # before checking the rest of the PATH.
19028  if test -n "$TOOLS_DIR"; then
19029    PATH_save="$PATH"
19030    PATH="$TOOLS_DIR"
19031    for ac_prog in $COMPILER_CHECK_LIST
19032do
19033  # Extract the first word of "$ac_prog", so it can be a program name with args.
19034set dummy $ac_prog; ac_word=$2
19035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19036$as_echo_n "checking for $ac_word... " >&6; }
19037if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19038  $as_echo_n "(cached) " >&6
19039else
19040  case $TOOLS_DIR_CC in
19041  [\\/]* | ?:[\\/]*)
19042  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19043  ;;
19044  *)
19045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19046for as_dir in $PATH
19047do
19048  IFS=$as_save_IFS
19049  test -z "$as_dir" && as_dir=.
19050    for ac_exec_ext in '' $ac_executable_extensions; do
19051  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19052    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19054    break 2
19055  fi
19056done
19057  done
19058IFS=$as_save_IFS
19059
19060  ;;
19061esac
19062fi
19063TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19064if test -n "$TOOLS_DIR_CC"; then
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19066$as_echo "$TOOLS_DIR_CC" >&6; }
19067else
19068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19069$as_echo "no" >&6; }
19070fi
19071
19072
19073  test -n "$TOOLS_DIR_CC" && break
19074done
19075
19076    CC=$TOOLS_DIR_CC
19077    PATH="$PATH_save"
19078  fi
19079
19080  # AC_PATH_PROGS can't be run multiple times with the same variable,
19081  # so create a new name for this run.
19082  if test "x$CC" = x; then
19083    for ac_prog in $COMPILER_CHECK_LIST
19084do
19085  # Extract the first word of "$ac_prog", so it can be a program name with args.
19086set dummy $ac_prog; ac_word=$2
19087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19088$as_echo_n "checking for $ac_word... " >&6; }
19089if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19090  $as_echo_n "(cached) " >&6
19091else
19092  case $POTENTIAL_CC in
19093  [\\/]* | ?:[\\/]*)
19094  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19095  ;;
19096  *)
19097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19098for as_dir in $PATH
19099do
19100  IFS=$as_save_IFS
19101  test -z "$as_dir" && as_dir=.
19102    for ac_exec_ext in '' $ac_executable_extensions; do
19103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19104    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19106    break 2
19107  fi
19108done
19109  done
19110IFS=$as_save_IFS
19111
19112  ;;
19113esac
19114fi
19115POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19116if test -n "$POTENTIAL_CC"; then
19117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19118$as_echo "$POTENTIAL_CC" >&6; }
19119else
19120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19121$as_echo "no" >&6; }
19122fi
19123
19124
19125  test -n "$POTENTIAL_CC" && break
19126done
19127
19128    CC=$POTENTIAL_CC
19129  fi
19130
19131  if test "x$CC" = x; then
19132
19133    # Print a helpful message on how to acquire the necessary build dependency.
19134    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19135    MISSING_DEPENDENCY=devkit
19136    PKGHANDLER_COMMAND=
19137
19138    case $PKGHANDLER in
19139	apt-get)
19140                apt_help     $MISSING_DEPENDENCY ;;
19141    yum)
19142                yum_help     $MISSING_DEPENDENCY ;;
19143	port)
19144                port_help    $MISSING_DEPENDENCY ;;
19145	pkgutil)
19146                pkgutil_help $MISSING_DEPENDENCY ;;
19147	pkgadd)
19148                pkgadd_help  $MISSING_DEPENDENCY ;;
19149    * )
19150      break ;;
19151    esac
19152
19153    if test "x$PKGHANDLER_COMMAND" != x; then
19154        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19155    fi
19156
19157      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19158  fi
19159
19160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19161
19162  # First separate the path from the arguments. This will split at the first
19163  # space.
19164  complete="$CC"
19165  path="${complete%% *}"
19166  tmp="$complete EOL"
19167  arguments="${tmp#* }"
19168
19169  # Input might be given as Windows format, start by converting to
19170  # unix format.
19171  new_path=`$CYGPATH -u "$path"`
19172
19173  # Now try to locate executable using which
19174  new_path=`$WHICH "$new_path" 2> /dev/null`
19175  # bat and cmd files are not always considered executable in cygwin causing which
19176  # to not find them
19177  if test "x$new_path" = x \
19178           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19179           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19180    new_path=`$CYGPATH -u "$path"`
19181  fi
19182  if test "x$new_path" = x; then
19183    # Oops. Which didn't find the executable.
19184    # The splitting of arguments from the executable at a space might have been incorrect,
19185    # since paths with space are more likely in Windows. Give it another try with the whole
19186    # argument.
19187    path="$complete"
19188    arguments="EOL"
19189    new_path=`$CYGPATH -u "$path"`
19190    new_path=`$WHICH "$new_path" 2> /dev/null`
19191    # bat and cmd files are not always considered executable in cygwin causing which
19192    # to not find them
19193    if test "x$new_path" = x \
19194             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19195             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19196      new_path=`$CYGPATH -u "$path"`
19197    fi
19198    if test "x$new_path" = x; then
19199      # It's still not found. Now this is an unrecoverable error.
19200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19201$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19202      has_space=`$ECHO "$complete" | $GREP " "`
19203      if test "x$has_space" != x; then
19204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19206      fi
19207      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19208    fi
19209  fi
19210
19211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19214  # "foo.exe" is OK but "foo" is an error.
19215  #
19216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19217  # It is also a way to make sure we got the proper file name for the real test later on.
19218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19219  if test "x$test_shortpath" = x; then
19220    # Short path failed, file does not exist as specified.
19221    # Try adding .exe or .cmd
19222    if test -f "${new_path}.exe"; then
19223       input_to_shortpath="${new_path}.exe"
19224    elif test -f "${new_path}.cmd"; then
19225       input_to_shortpath="${new_path}.cmd"
19226    else
19227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19228$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19231      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19232    fi
19233  else
19234    input_to_shortpath="$new_path"
19235  fi
19236
19237  # Call helper function which possibly converts this using DOS-style short mode.
19238  # If so, the updated path is stored in $new_path.
19239  new_path="$input_to_shortpath"
19240
19241  input_path="$input_to_shortpath"
19242  # Check if we need to convert this using DOS-style short mode. If the path
19243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19244  # take no chances and rewrite it.
19245  # Note: m4 eats our [], so we need to use [ and ] instead.
19246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19247  if test "x$has_forbidden_chars" != x; then
19248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19252      # Going to short mode and back again did indeed matter. Since short mode is
19253      # case insensitive, let's make it lowercase to improve readability.
19254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19255      # Now convert it back to Unix-stile (cygpath)
19256      input_path=`$CYGPATH -u "$shortmode_path"`
19257      new_path="$input_path"
19258    fi
19259  fi
19260
19261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19262  if test "x$test_cygdrive_prefix" = x; then
19263    # As a simple fix, exclude /usr/bin since it's not a real path.
19264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19266      # a path prefixed by /cygdrive for fixpath to work.
19267      new_path="$CYGWIN_ROOT_PATH$input_path"
19268    fi
19269  fi
19270
19271  # remove trailing .exe if any
19272  new_path="${new_path/%.exe/}"
19273
19274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19275
19276  # First separate the path from the arguments. This will split at the first
19277  # space.
19278  complete="$CC"
19279  path="${complete%% *}"
19280  tmp="$complete EOL"
19281  arguments="${tmp#* }"
19282
19283  # Input might be given as Windows format, start by converting to
19284  # unix format.
19285  new_path="$path"
19286
19287  windows_path="$new_path"
19288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19289    unix_path=`$CYGPATH -u "$windows_path"`
19290    new_path="$unix_path"
19291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19293    new_path="$unix_path"
19294  fi
19295
19296
19297  # Now try to locate executable using which
19298  new_path=`$WHICH "$new_path" 2> /dev/null`
19299
19300  if test "x$new_path" = x; then
19301    # Oops. Which didn't find the executable.
19302    # The splitting of arguments from the executable at a space might have been incorrect,
19303    # since paths with space are more likely in Windows. Give it another try with the whole
19304    # argument.
19305    path="$complete"
19306    arguments="EOL"
19307    new_path="$path"
19308
19309  windows_path="$new_path"
19310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19311    unix_path=`$CYGPATH -u "$windows_path"`
19312    new_path="$unix_path"
19313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19315    new_path="$unix_path"
19316  fi
19317
19318
19319    new_path=`$WHICH "$new_path" 2> /dev/null`
19320
19321    if test "x$new_path" = x; then
19322      # It's still not found. Now this is an unrecoverable error.
19323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19324$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19325      has_space=`$ECHO "$complete" | $GREP " "`
19326      if test "x$has_space" != x; then
19327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19329      fi
19330      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19331    fi
19332  fi
19333
19334  # Now new_path has a complete unix path to the binary
19335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19336    # Keep paths in /bin as-is, but remove trailing .exe if any
19337    new_path="${new_path/%.exe/}"
19338    # Do not save /bin paths to all_fixpath_prefixes!
19339  else
19340    # Not in mixed or Windows style, start by that.
19341    new_path=`cmd //c echo $new_path`
19342
19343  input_path="$new_path"
19344  # Check if we need to convert this using DOS-style short mode. If the path
19345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19346  # take no chances and rewrite it.
19347  # Note: m4 eats our [], so we need to use [ and ] instead.
19348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19349  if test "x$has_forbidden_chars" != x; then
19350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19352  fi
19353
19354    # Output is in $new_path
19355
19356  windows_path="$new_path"
19357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19358    unix_path=`$CYGPATH -u "$windows_path"`
19359    new_path="$unix_path"
19360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19362    new_path="$unix_path"
19363  fi
19364
19365    # remove trailing .exe if any
19366    new_path="${new_path/%.exe/}"
19367
19368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19370  fi
19371
19372  else
19373    # We're on a posix platform. Hooray! :)
19374    # First separate the path from the arguments. This will split at the first
19375    # space.
19376    complete="$CC"
19377    path="${complete%% *}"
19378    tmp="$complete EOL"
19379    arguments="${tmp#* }"
19380
19381    # Cannot rely on the command "which" here since it doesn't always work.
19382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19383    if test -z "$is_absolute_path"; then
19384      # Path to executable is not absolute. Find it.
19385      IFS_save="$IFS"
19386      IFS=:
19387      for p in $PATH; do
19388        if test -f "$p/$path" && test -x "$p/$path"; then
19389          new_path="$p/$path"
19390          break
19391        fi
19392      done
19393      IFS="$IFS_save"
19394    else
19395      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19396$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19397      new_path="$path"
19398    fi
19399
19400    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
19406$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
19413      if test "x$arguments" != xEOL; then
19414        new_complete="$new_path ${arguments% *}"
19415      else
19416        new_complete="$new_path"
19417      fi
19418
19419  if test "x$complete" != "x$new_complete"; then
19420      CC="$new_complete"
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19422$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19423    fi
19424
19425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19426$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19427  TEST_COMPILER="$CC"
19428
19429    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19430        # Follow a chain of symbolic links. Use readlink
19431        # where it exists, else fall back to horribly
19432        # complicated shell code.
19433        if test "x$READLINK_TESTED" != yes; then
19434            # On MacOSX there is a readlink tool with a different
19435            # purpose than the GNU readlink tool. Check the found readlink.
19436            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19437            if test "x$ISGNU" = x; then
19438                 # A readlink that we do not know how to use.
19439                 # Are there other non-GNU readlinks out there?
19440                 READLINK_TESTED=yes
19441                 READLINK=
19442            fi
19443        fi
19444
19445        if test "x$READLINK" != x; then
19446            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19447        else
19448            # Save the current directory for restoring afterwards
19449            STARTDIR=$PWD
19450            COUNTER=0
19451            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19452            sym_link_file=`$BASENAME $TEST_COMPILER`
19453            cd $sym_link_dir
19454            # Use -P flag to resolve symlinks in directories.
19455            cd `$THEPWDCMD -P`
19456            sym_link_dir=`$THEPWDCMD -P`
19457            # Resolve file symlinks
19458            while test $COUNTER -lt 20; do
19459                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19460                if test "x$ISLINK" == x; then
19461                    # This is not a symbolic link! We are done!
19462                    break
19463                fi
19464                # Again resolve directory symlinks since the target of the just found
19465                # link could be in a different directory
19466                cd `$DIRNAME $ISLINK`
19467                sym_link_dir=`$THEPWDCMD -P`
19468                sym_link_file=`$BASENAME $ISLINK`
19469                let COUNTER=COUNTER+1
19470            done
19471            cd $STARTDIR
19472            TEST_COMPILER=$sym_link_dir/$sym_link_file
19473        fi
19474    fi
19475
19476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19477$as_echo "$TEST_COMPILER" >&6; }
19478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19479$as_echo_n "checking if CC is disguised ccache... " >&6; }
19480
19481  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19482  if test "x$COMPILER_BASENAME" = "xccache"; then
19483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19484$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19485    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19486    # We want to control ccache invocation ourselves, so ignore this cc and try
19487    # searching again.
19488
19489    # Remove the path to the fake ccache cc from the PATH
19490    RETRY_COMPILER_SAVED_PATH="$PATH"
19491    COMPILER_DIRNAME=`$DIRNAME $CC`
19492    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19493
19494    # Try again looking for our compiler
19495    if test -n "$ac_tool_prefix"; then
19496  for ac_prog in $COMPILER_CHECK_LIST
19497  do
19498    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19499set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19501$as_echo_n "checking for $ac_word... " >&6; }
19502if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19503  $as_echo_n "(cached) " >&6
19504else
19505  if test -n "$PROPER_COMPILER_CC"; then
19506  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19507else
19508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19509for as_dir in $PATH
19510do
19511  IFS=$as_save_IFS
19512  test -z "$as_dir" && as_dir=.
19513    for ac_exec_ext in '' $ac_executable_extensions; do
19514  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19515    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19517    break 2
19518  fi
19519done
19520  done
19521IFS=$as_save_IFS
19522
19523fi
19524fi
19525PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19526if test -n "$PROPER_COMPILER_CC"; then
19527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19528$as_echo "$PROPER_COMPILER_CC" >&6; }
19529else
19530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19531$as_echo "no" >&6; }
19532fi
19533
19534
19535    test -n "$PROPER_COMPILER_CC" && break
19536  done
19537fi
19538if test -z "$PROPER_COMPILER_CC"; then
19539  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19540  for ac_prog in $COMPILER_CHECK_LIST
19541do
19542  # Extract the first word of "$ac_prog", so it can be a program name with args.
19543set dummy $ac_prog; ac_word=$2
19544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19545$as_echo_n "checking for $ac_word... " >&6; }
19546if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19547  $as_echo_n "(cached) " >&6
19548else
19549  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19550  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19551else
19552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19553for as_dir in $PATH
19554do
19555  IFS=$as_save_IFS
19556  test -z "$as_dir" && as_dir=.
19557    for ac_exec_ext in '' $ac_executable_extensions; do
19558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19559    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19561    break 2
19562  fi
19563done
19564  done
19565IFS=$as_save_IFS
19566
19567fi
19568fi
19569ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19570if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19572$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19573else
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19575$as_echo "no" >&6; }
19576fi
19577
19578
19579  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19580done
19581
19582  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19583    PROPER_COMPILER_CC=""
19584  else
19585    case $cross_compiling:$ac_tool_warned in
19586yes:)
19587{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19588$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19589ac_tool_warned=yes ;;
19590esac
19591    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19592  fi
19593fi
19594
19595
19596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19597
19598  # First separate the path from the arguments. This will split at the first
19599  # space.
19600  complete="$PROPER_COMPILER_CC"
19601  path="${complete%% *}"
19602  tmp="$complete EOL"
19603  arguments="${tmp#* }"
19604
19605  # Input might be given as Windows format, start by converting to
19606  # unix format.
19607  new_path=`$CYGPATH -u "$path"`
19608
19609  # Now try to locate executable using which
19610  new_path=`$WHICH "$new_path" 2> /dev/null`
19611  # bat and cmd files are not always considered executable in cygwin causing which
19612  # to not find them
19613  if test "x$new_path" = x \
19614           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19615           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19616    new_path=`$CYGPATH -u "$path"`
19617  fi
19618  if test "x$new_path" = x; then
19619    # Oops. Which didn't find the executable.
19620    # The splitting of arguments from the executable at a space might have been incorrect,
19621    # since paths with space are more likely in Windows. Give it another try with the whole
19622    # argument.
19623    path="$complete"
19624    arguments="EOL"
19625    new_path=`$CYGPATH -u "$path"`
19626    new_path=`$WHICH "$new_path" 2> /dev/null`
19627    # bat and cmd files are not always considered executable in cygwin causing which
19628    # to not find them
19629    if test "x$new_path" = x \
19630             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19631             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19632      new_path=`$CYGPATH -u "$path"`
19633    fi
19634    if test "x$new_path" = x; then
19635      # It's still not found. Now this is an unrecoverable error.
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19637$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19638      has_space=`$ECHO "$complete" | $GREP " "`
19639      if test "x$has_space" != x; then
19640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19642      fi
19643      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19644    fi
19645  fi
19646
19647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19650  # "foo.exe" is OK but "foo" is an error.
19651  #
19652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19653  # It is also a way to make sure we got the proper file name for the real test later on.
19654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19655  if test "x$test_shortpath" = x; then
19656    # Short path failed, file does not exist as specified.
19657    # Try adding .exe or .cmd
19658    if test -f "${new_path}.exe"; then
19659       input_to_shortpath="${new_path}.exe"
19660    elif test -f "${new_path}.cmd"; then
19661       input_to_shortpath="${new_path}.cmd"
19662    else
19663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19664$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19667      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19668    fi
19669  else
19670    input_to_shortpath="$new_path"
19671  fi
19672
19673  # Call helper function which possibly converts this using DOS-style short mode.
19674  # If so, the updated path is stored in $new_path.
19675  new_path="$input_to_shortpath"
19676
19677  input_path="$input_to_shortpath"
19678  # Check if we need to convert this using DOS-style short mode. If the path
19679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19680  # take no chances and rewrite it.
19681  # Note: m4 eats our [], so we need to use [ and ] instead.
19682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19683  if test "x$has_forbidden_chars" != x; then
19684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19688      # Going to short mode and back again did indeed matter. Since short mode is
19689      # case insensitive, let's make it lowercase to improve readability.
19690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19691      # Now convert it back to Unix-stile (cygpath)
19692      input_path=`$CYGPATH -u "$shortmode_path"`
19693      new_path="$input_path"
19694    fi
19695  fi
19696
19697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19698  if test "x$test_cygdrive_prefix" = x; then
19699    # As a simple fix, exclude /usr/bin since it's not a real path.
19700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19702      # a path prefixed by /cygdrive for fixpath to work.
19703      new_path="$CYGWIN_ROOT_PATH$input_path"
19704    fi
19705  fi
19706
19707  # remove trailing .exe if any
19708  new_path="${new_path/%.exe/}"
19709
19710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711
19712  # First separate the path from the arguments. This will split at the first
19713  # space.
19714  complete="$PROPER_COMPILER_CC"
19715  path="${complete%% *}"
19716  tmp="$complete EOL"
19717  arguments="${tmp#* }"
19718
19719  # Input might be given as Windows format, start by converting to
19720  # unix format.
19721  new_path="$path"
19722
19723  windows_path="$new_path"
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725    unix_path=`$CYGPATH -u "$windows_path"`
19726    new_path="$unix_path"
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729    new_path="$unix_path"
19730  fi
19731
19732
19733  # Now try to locate executable using which
19734  new_path=`$WHICH "$new_path" 2> /dev/null`
19735
19736  if test "x$new_path" = x; then
19737    # Oops. Which didn't find the executable.
19738    # The splitting of arguments from the executable at a space might have been incorrect,
19739    # since paths with space are more likely in Windows. Give it another try with the whole
19740    # argument.
19741    path="$complete"
19742    arguments="EOL"
19743    new_path="$path"
19744
19745  windows_path="$new_path"
19746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19747    unix_path=`$CYGPATH -u "$windows_path"`
19748    new_path="$unix_path"
19749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19751    new_path="$unix_path"
19752  fi
19753
19754
19755    new_path=`$WHICH "$new_path" 2> /dev/null`
19756
19757    if test "x$new_path" = x; then
19758      # It's still not found. Now this is an unrecoverable error.
19759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19760$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19761      has_space=`$ECHO "$complete" | $GREP " "`
19762      if test "x$has_space" != x; then
19763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19765      fi
19766      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19767    fi
19768  fi
19769
19770  # Now new_path has a complete unix path to the binary
19771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19772    # Keep paths in /bin as-is, but remove trailing .exe if any
19773    new_path="${new_path/%.exe/}"
19774    # Do not save /bin paths to all_fixpath_prefixes!
19775  else
19776    # Not in mixed or Windows style, start by that.
19777    new_path=`cmd //c echo $new_path`
19778
19779  input_path="$new_path"
19780  # Check if we need to convert this using DOS-style short mode. If the path
19781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19782  # take no chances and rewrite it.
19783  # Note: m4 eats our [], so we need to use [ and ] instead.
19784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19785  if test "x$has_forbidden_chars" != x; then
19786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19788  fi
19789
19790    # Output is in $new_path
19791
19792  windows_path="$new_path"
19793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19794    unix_path=`$CYGPATH -u "$windows_path"`
19795    new_path="$unix_path"
19796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19798    new_path="$unix_path"
19799  fi
19800
19801    # remove trailing .exe if any
19802    new_path="${new_path/%.exe/}"
19803
19804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19806  fi
19807
19808  else
19809    # We're on a posix platform. Hooray! :)
19810    # First separate the path from the arguments. This will split at the first
19811    # space.
19812    complete="$PROPER_COMPILER_CC"
19813    path="${complete%% *}"
19814    tmp="$complete EOL"
19815    arguments="${tmp#* }"
19816
19817    # Cannot rely on the command "which" here since it doesn't always work.
19818    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19819    if test -z "$is_absolute_path"; then
19820      # Path to executable is not absolute. Find it.
19821      IFS_save="$IFS"
19822      IFS=:
19823      for p in $PATH; do
19824        if test -f "$p/$path" && test -x "$p/$path"; then
19825          new_path="$p/$path"
19826          break
19827        fi
19828      done
19829      IFS="$IFS_save"
19830    else
19831      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19832$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19833      new_path="$path"
19834    fi
19835
19836    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
19842$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
19849      if test "x$arguments" != xEOL; then
19850        new_complete="$new_path ${arguments% *}"
19851      else
19852        new_complete="$new_path"
19853      fi
19854
19855  if test "x$complete" != "x$new_complete"; then
19856      PROPER_COMPILER_CC="$new_complete"
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19858$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19859    fi
19860
19861    PATH="$RETRY_COMPILER_SAVED_PATH"
19862
19863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19864$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19865
19866    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19867        # Follow a chain of symbolic links. Use readlink
19868        # where it exists, else fall back to horribly
19869        # complicated shell code.
19870        if test "x$READLINK_TESTED" != yes; then
19871            # On MacOSX there is a readlink tool with a different
19872            # purpose than the GNU readlink tool. Check the found readlink.
19873            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19874            if test "x$ISGNU" = x; then
19875                 # A readlink that we do not know how to use.
19876                 # Are there other non-GNU readlinks out there?
19877                 READLINK_TESTED=yes
19878                 READLINK=
19879            fi
19880        fi
19881
19882        if test "x$READLINK" != x; then
19883            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19884        else
19885            # Save the current directory for restoring afterwards
19886            STARTDIR=$PWD
19887            COUNTER=0
19888            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19889            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19890            cd $sym_link_dir
19891            # Use -P flag to resolve symlinks in directories.
19892            cd `$THEPWDCMD -P`
19893            sym_link_dir=`$THEPWDCMD -P`
19894            # Resolve file symlinks
19895            while test $COUNTER -lt 20; do
19896                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19897                if test "x$ISLINK" == x; then
19898                    # This is not a symbolic link! We are done!
19899                    break
19900                fi
19901                # Again resolve directory symlinks since the target of the just found
19902                # link could be in a different directory
19903                cd `$DIRNAME $ISLINK`
19904                sym_link_dir=`$THEPWDCMD -P`
19905                sym_link_file=`$BASENAME $ISLINK`
19906                let COUNTER=COUNTER+1
19907            done
19908            cd $STARTDIR
19909            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19910        fi
19911    fi
19912
19913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19914$as_echo "$PROPER_COMPILER_CC" >&6; }
19915    CC="$PROPER_COMPILER_CC"
19916  else
19917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19918$as_echo "no, keeping CC" >&6; }
19919    CC="$TEST_COMPILER"
19920  fi
19921
19922  COMPILER=$CC
19923  COMPILER_NAME=$COMPILER_NAME
19924
19925  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19926    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19927    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19928    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19929    if test $? -ne 0; then
19930      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19931
19932      { $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
19933$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19934      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19935$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19936      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19937    else
19938      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19939      COMPILER_VENDOR="Sun Studio"
19940    fi
19941  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19942    # First line typically looks something like:
19943    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19944    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19945    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19946    COMPILER_VENDOR="Microsoft CL.EXE"
19947    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19948    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19949      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19950        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19951      fi
19952    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19953      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19954        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19955      fi
19956    fi
19957  else
19958    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19959    # Check that this is likely to be GCC.
19960    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19961    if test $? -ne 0; then
19962      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19963$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19964      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19965$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19966      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19967    fi
19968
19969    # First line typically looks something like:
19970    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19971    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19972    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19973  fi
19974  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19975  CC_VERSION="$COMPILER_VERSION"
19976  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19977  CC_VENDOR="$COMPILER_VENDOR"
19978
19979  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19980$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19981
19982
19983# Now that we have resolved CC ourself, let autoconf have its go at it
19984ac_ext=c
19985ac_cpp='$CPP $CPPFLAGS'
19986ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19987ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19988ac_compiler_gnu=$ac_cv_c_compiler_gnu
19989if test -n "$ac_tool_prefix"; then
19990  for ac_prog in $CC
19991  do
19992    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19993set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19995$as_echo_n "checking for $ac_word... " >&6; }
19996if test "${ac_cv_prog_CC+set}" = set; then :
19997  $as_echo_n "(cached) " >&6
19998else
19999  if test -n "$CC"; then
20000  ac_cv_prog_CC="$CC" # Let the user override the test.
20001else
20002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20003for as_dir in $PATH
20004do
20005  IFS=$as_save_IFS
20006  test -z "$as_dir" && as_dir=.
20007    for ac_exec_ext in '' $ac_executable_extensions; do
20008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20009    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20011    break 2
20012  fi
20013done
20014  done
20015IFS=$as_save_IFS
20016
20017fi
20018fi
20019CC=$ac_cv_prog_CC
20020if test -n "$CC"; then
20021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20022$as_echo "$CC" >&6; }
20023else
20024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20025$as_echo "no" >&6; }
20026fi
20027
20028
20029    test -n "$CC" && break
20030  done
20031fi
20032if test -z "$CC"; then
20033  ac_ct_CC=$CC
20034  for ac_prog in $CC
20035do
20036  # Extract the first word of "$ac_prog", so it can be a program name with args.
20037set dummy $ac_prog; ac_word=$2
20038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20039$as_echo_n "checking for $ac_word... " >&6; }
20040if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20041  $as_echo_n "(cached) " >&6
20042else
20043  if test -n "$ac_ct_CC"; then
20044  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20045else
20046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20047for as_dir in $PATH
20048do
20049  IFS=$as_save_IFS
20050  test -z "$as_dir" && as_dir=.
20051    for ac_exec_ext in '' $ac_executable_extensions; do
20052  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20053    ac_cv_prog_ac_ct_CC="$ac_prog"
20054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20055    break 2
20056  fi
20057done
20058  done
20059IFS=$as_save_IFS
20060
20061fi
20062fi
20063ac_ct_CC=$ac_cv_prog_ac_ct_CC
20064if test -n "$ac_ct_CC"; then
20065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20066$as_echo "$ac_ct_CC" >&6; }
20067else
20068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20069$as_echo "no" >&6; }
20070fi
20071
20072
20073  test -n "$ac_ct_CC" && break
20074done
20075
20076  if test "x$ac_ct_CC" = x; then
20077    CC=""
20078  else
20079    case $cross_compiling:$ac_tool_warned in
20080yes:)
20081{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20082$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20083ac_tool_warned=yes ;;
20084esac
20085    CC=$ac_ct_CC
20086  fi
20087fi
20088
20089
20090test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20092as_fn_error $? "no acceptable C compiler found in \$PATH
20093See \`config.log' for more details" "$LINENO" 5; }
20094
20095# Provide some information about the compiler.
20096$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20097set X $ac_compile
20098ac_compiler=$2
20099for ac_option in --version -v -V -qversion; do
20100  { { ac_try="$ac_compiler $ac_option >&5"
20101case "(($ac_try" in
20102  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20103  *) ac_try_echo=$ac_try;;
20104esac
20105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20106$as_echo "$ac_try_echo"; } >&5
20107  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20108  ac_status=$?
20109  if test -s conftest.err; then
20110    sed '10a\
20111... rest of stderr output deleted ...
20112         10q' conftest.err >conftest.er1
20113    cat conftest.er1 >&5
20114  fi
20115  rm -f conftest.er1 conftest.err
20116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20117  test $ac_status = 0; }
20118done
20119
20120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20121/* end confdefs.h.  */
20122
20123int
20124main ()
20125{
20126
20127  ;
20128  return 0;
20129}
20130_ACEOF
20131ac_clean_files_save=$ac_clean_files
20132ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20133# Try to create an executable without -o first, disregard a.out.
20134# It will help us diagnose broken compilers, and finding out an intuition
20135# of exeext.
20136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20137$as_echo_n "checking whether the C compiler works... " >&6; }
20138ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20139
20140# The possible output files:
20141ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20142
20143ac_rmfiles=
20144for ac_file in $ac_files
20145do
20146  case $ac_file in
20147    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20148    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20149  esac
20150done
20151rm -f $ac_rmfiles
20152
20153if { { ac_try="$ac_link_default"
20154case "(($ac_try" in
20155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20156  *) ac_try_echo=$ac_try;;
20157esac
20158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20159$as_echo "$ac_try_echo"; } >&5
20160  (eval "$ac_link_default") 2>&5
20161  ac_status=$?
20162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20163  test $ac_status = 0; }; then :
20164  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20165# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20166# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20167# so that the user can short-circuit this test for compilers unknown to
20168# Autoconf.
20169for ac_file in $ac_files ''
20170do
20171  test -f "$ac_file" || continue
20172  case $ac_file in
20173    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20174	;;
20175    [ab].out )
20176	# We found the default executable, but exeext='' is most
20177	# certainly right.
20178	break;;
20179    *.* )
20180	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20181	then :; else
20182	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20183	fi
20184	# We set ac_cv_exeext here because the later test for it is not
20185	# safe: cross compilers may not add the suffix if given an `-o'
20186	# argument, so we may need to know it at that point already.
20187	# Even if this section looks crufty: it has the advantage of
20188	# actually working.
20189	break;;
20190    * )
20191	break;;
20192  esac
20193done
20194test "$ac_cv_exeext" = no && ac_cv_exeext=
20195
20196else
20197  ac_file=''
20198fi
20199if test -z "$ac_file"; then :
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20201$as_echo "no" >&6; }
20202$as_echo "$as_me: failed program was:" >&5
20203sed 's/^/| /' conftest.$ac_ext >&5
20204
20205{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20207as_fn_error 77 "C compiler cannot create executables
20208See \`config.log' for more details" "$LINENO" 5; }
20209else
20210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20211$as_echo "yes" >&6; }
20212fi
20213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20214$as_echo_n "checking for C compiler default output file name... " >&6; }
20215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20216$as_echo "$ac_file" >&6; }
20217ac_exeext=$ac_cv_exeext
20218
20219rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20220ac_clean_files=$ac_clean_files_save
20221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20222$as_echo_n "checking for suffix of executables... " >&6; }
20223if { { ac_try="$ac_link"
20224case "(($ac_try" in
20225  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20226  *) ac_try_echo=$ac_try;;
20227esac
20228eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20229$as_echo "$ac_try_echo"; } >&5
20230  (eval "$ac_link") 2>&5
20231  ac_status=$?
20232  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20233  test $ac_status = 0; }; then :
20234  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20235# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20236# work properly (i.e., refer to `conftest.exe'), while it won't with
20237# `rm'.
20238for ac_file in conftest.exe conftest conftest.*; do
20239  test -f "$ac_file" || continue
20240  case $ac_file in
20241    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20242    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20243	  break;;
20244    * ) break;;
20245  esac
20246done
20247else
20248  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20250as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20251See \`config.log' for more details" "$LINENO" 5; }
20252fi
20253rm -f conftest conftest$ac_cv_exeext
20254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20255$as_echo "$ac_cv_exeext" >&6; }
20256
20257rm -f conftest.$ac_ext
20258EXEEXT=$ac_cv_exeext
20259ac_exeext=$EXEEXT
20260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261/* end confdefs.h.  */
20262#include <stdio.h>
20263int
20264main ()
20265{
20266FILE *f = fopen ("conftest.out", "w");
20267 return ferror (f) || fclose (f) != 0;
20268
20269  ;
20270  return 0;
20271}
20272_ACEOF
20273ac_clean_files="$ac_clean_files conftest.out"
20274# Check that the compiler produces executables we can run.  If not, either
20275# the compiler is broken, or we cross compile.
20276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20277$as_echo_n "checking whether we are cross compiling... " >&6; }
20278if test "$cross_compiling" != yes; then
20279  { { ac_try="$ac_link"
20280case "(($ac_try" in
20281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20282  *) ac_try_echo=$ac_try;;
20283esac
20284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20285$as_echo "$ac_try_echo"; } >&5
20286  (eval "$ac_link") 2>&5
20287  ac_status=$?
20288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20289  test $ac_status = 0; }
20290  if { ac_try='./conftest$ac_cv_exeext'
20291  { { case "(($ac_try" in
20292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20293  *) ac_try_echo=$ac_try;;
20294esac
20295eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20296$as_echo "$ac_try_echo"; } >&5
20297  (eval "$ac_try") 2>&5
20298  ac_status=$?
20299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20300  test $ac_status = 0; }; }; then
20301    cross_compiling=no
20302  else
20303    if test "$cross_compiling" = maybe; then
20304	cross_compiling=yes
20305    else
20306	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20308as_fn_error $? "cannot run C compiled programs.
20309If you meant to cross compile, use \`--host'.
20310See \`config.log' for more details" "$LINENO" 5; }
20311    fi
20312  fi
20313fi
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20315$as_echo "$cross_compiling" >&6; }
20316
20317rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20318ac_clean_files=$ac_clean_files_save
20319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20320$as_echo_n "checking for suffix of object files... " >&6; }
20321if test "${ac_cv_objext+set}" = set; then :
20322  $as_echo_n "(cached) " >&6
20323else
20324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20325/* end confdefs.h.  */
20326
20327int
20328main ()
20329{
20330
20331  ;
20332  return 0;
20333}
20334_ACEOF
20335rm -f conftest.o conftest.obj
20336if { { ac_try="$ac_compile"
20337case "(($ac_try" in
20338  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20339  *) ac_try_echo=$ac_try;;
20340esac
20341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20342$as_echo "$ac_try_echo"; } >&5
20343  (eval "$ac_compile") 2>&5
20344  ac_status=$?
20345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20346  test $ac_status = 0; }; then :
20347  for ac_file in conftest.o conftest.obj conftest.*; do
20348  test -f "$ac_file" || continue;
20349  case $ac_file in
20350    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20351    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20352       break;;
20353  esac
20354done
20355else
20356  $as_echo "$as_me: failed program was:" >&5
20357sed 's/^/| /' conftest.$ac_ext >&5
20358
20359{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20361as_fn_error $? "cannot compute suffix of object files: cannot compile
20362See \`config.log' for more details" "$LINENO" 5; }
20363fi
20364rm -f conftest.$ac_cv_objext conftest.$ac_ext
20365fi
20366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20367$as_echo "$ac_cv_objext" >&6; }
20368OBJEXT=$ac_cv_objext
20369ac_objext=$OBJEXT
20370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20371$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20372if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20373  $as_echo_n "(cached) " >&6
20374else
20375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20376/* end confdefs.h.  */
20377
20378int
20379main ()
20380{
20381#ifndef __GNUC__
20382       choke me
20383#endif
20384
20385  ;
20386  return 0;
20387}
20388_ACEOF
20389if ac_fn_c_try_compile "$LINENO"; then :
20390  ac_compiler_gnu=yes
20391else
20392  ac_compiler_gnu=no
20393fi
20394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20395ac_cv_c_compiler_gnu=$ac_compiler_gnu
20396
20397fi
20398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20399$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20400if test $ac_compiler_gnu = yes; then
20401  GCC=yes
20402else
20403  GCC=
20404fi
20405ac_test_CFLAGS=${CFLAGS+set}
20406ac_save_CFLAGS=$CFLAGS
20407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20408$as_echo_n "checking whether $CC accepts -g... " >&6; }
20409if test "${ac_cv_prog_cc_g+set}" = set; then :
20410  $as_echo_n "(cached) " >&6
20411else
20412  ac_save_c_werror_flag=$ac_c_werror_flag
20413   ac_c_werror_flag=yes
20414   ac_cv_prog_cc_g=no
20415   CFLAGS="-g"
20416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20417/* end confdefs.h.  */
20418
20419int
20420main ()
20421{
20422
20423  ;
20424  return 0;
20425}
20426_ACEOF
20427if ac_fn_c_try_compile "$LINENO"; then :
20428  ac_cv_prog_cc_g=yes
20429else
20430  CFLAGS=""
20431      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20432/* end confdefs.h.  */
20433
20434int
20435main ()
20436{
20437
20438  ;
20439  return 0;
20440}
20441_ACEOF
20442if ac_fn_c_try_compile "$LINENO"; then :
20443
20444else
20445  ac_c_werror_flag=$ac_save_c_werror_flag
20446	 CFLAGS="-g"
20447	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20448/* end confdefs.h.  */
20449
20450int
20451main ()
20452{
20453
20454  ;
20455  return 0;
20456}
20457_ACEOF
20458if ac_fn_c_try_compile "$LINENO"; then :
20459  ac_cv_prog_cc_g=yes
20460fi
20461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20462fi
20463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20464fi
20465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20466   ac_c_werror_flag=$ac_save_c_werror_flag
20467fi
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20469$as_echo "$ac_cv_prog_cc_g" >&6; }
20470if test "$ac_test_CFLAGS" = set; then
20471  CFLAGS=$ac_save_CFLAGS
20472elif test $ac_cv_prog_cc_g = yes; then
20473  if test "$GCC" = yes; then
20474    CFLAGS="-g -O2"
20475  else
20476    CFLAGS="-g"
20477  fi
20478else
20479  if test "$GCC" = yes; then
20480    CFLAGS="-O2"
20481  else
20482    CFLAGS=
20483  fi
20484fi
20485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20486$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20487if test "${ac_cv_prog_cc_c89+set}" = set; then :
20488  $as_echo_n "(cached) " >&6
20489else
20490  ac_cv_prog_cc_c89=no
20491ac_save_CC=$CC
20492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20493/* end confdefs.h.  */
20494#include <stdarg.h>
20495#include <stdio.h>
20496#include <sys/types.h>
20497#include <sys/stat.h>
20498/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20499struct buf { int x; };
20500FILE * (*rcsopen) (struct buf *, struct stat *, int);
20501static char *e (p, i)
20502     char **p;
20503     int i;
20504{
20505  return p[i];
20506}
20507static char *f (char * (*g) (char **, int), char **p, ...)
20508{
20509  char *s;
20510  va_list v;
20511  va_start (v,p);
20512  s = g (p, va_arg (v,int));
20513  va_end (v);
20514  return s;
20515}
20516
20517/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20518   function prototypes and stuff, but not '\xHH' hex character constants.
20519   These don't provoke an error unfortunately, instead are silently treated
20520   as 'x'.  The following induces an error, until -std is added to get
20521   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20522   array size at least.  It's necessary to write '\x00'==0 to get something
20523   that's true only with -std.  */
20524int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20525
20526/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20527   inside strings and character constants.  */
20528#define FOO(x) 'x'
20529int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20530
20531int test (int i, double x);
20532struct s1 {int (*f) (int a);};
20533struct s2 {int (*f) (double a);};
20534int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20535int argc;
20536char **argv;
20537int
20538main ()
20539{
20540return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20541  ;
20542  return 0;
20543}
20544_ACEOF
20545for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20546	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20547do
20548  CC="$ac_save_CC $ac_arg"
20549  if ac_fn_c_try_compile "$LINENO"; then :
20550  ac_cv_prog_cc_c89=$ac_arg
20551fi
20552rm -f core conftest.err conftest.$ac_objext
20553  test "x$ac_cv_prog_cc_c89" != "xno" && break
20554done
20555rm -f conftest.$ac_ext
20556CC=$ac_save_CC
20557
20558fi
20559# AC_CACHE_VAL
20560case "x$ac_cv_prog_cc_c89" in
20561  x)
20562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20563$as_echo "none needed" >&6; } ;;
20564  xno)
20565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20566$as_echo "unsupported" >&6; } ;;
20567  *)
20568    CC="$CC $ac_cv_prog_cc_c89"
20569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20570$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20571esac
20572if test "x$ac_cv_prog_cc_c89" != xno; then :
20573
20574fi
20575
20576ac_ext=cpp
20577ac_cpp='$CXXCPP $CPPFLAGS'
20578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20581
20582
20583### Locate C++ compiler (CXX)
20584
20585if test "x$CXX" != x; then
20586  COMPILER_CHECK_LIST="$CXX"
20587elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20588  COMPILER_CHECK_LIST="cl"
20589elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20590  COMPILER_CHECK_LIST="CC g++"
20591else
20592  COMPILER_CHECK_LIST="g++ CC"
20593fi
20594
20595
20596  COMPILER_NAME=C++
20597
20598  CXX=
20599  # If TOOLS_DIR is set, check for all compiler names in there first
20600  # before checking the rest of the PATH.
20601  if test -n "$TOOLS_DIR"; then
20602    PATH_save="$PATH"
20603    PATH="$TOOLS_DIR"
20604    for ac_prog in $COMPILER_CHECK_LIST
20605do
20606  # Extract the first word of "$ac_prog", so it can be a program name with args.
20607set dummy $ac_prog; ac_word=$2
20608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20609$as_echo_n "checking for $ac_word... " >&6; }
20610if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20611  $as_echo_n "(cached) " >&6
20612else
20613  case $TOOLS_DIR_CXX in
20614  [\\/]* | ?:[\\/]*)
20615  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20616  ;;
20617  *)
20618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20619for as_dir in $PATH
20620do
20621  IFS=$as_save_IFS
20622  test -z "$as_dir" && as_dir=.
20623    for ac_exec_ext in '' $ac_executable_extensions; do
20624  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20625    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20627    break 2
20628  fi
20629done
20630  done
20631IFS=$as_save_IFS
20632
20633  ;;
20634esac
20635fi
20636TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20637if test -n "$TOOLS_DIR_CXX"; then
20638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20639$as_echo "$TOOLS_DIR_CXX" >&6; }
20640else
20641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20642$as_echo "no" >&6; }
20643fi
20644
20645
20646  test -n "$TOOLS_DIR_CXX" && break
20647done
20648
20649    CXX=$TOOLS_DIR_CXX
20650    PATH="$PATH_save"
20651  fi
20652
20653  # AC_PATH_PROGS can't be run multiple times with the same variable,
20654  # so create a new name for this run.
20655  if test "x$CXX" = x; then
20656    for ac_prog in $COMPILER_CHECK_LIST
20657do
20658  # Extract the first word of "$ac_prog", so it can be a program name with args.
20659set dummy $ac_prog; ac_word=$2
20660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20661$as_echo_n "checking for $ac_word... " >&6; }
20662if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20663  $as_echo_n "(cached) " >&6
20664else
20665  case $POTENTIAL_CXX in
20666  [\\/]* | ?:[\\/]*)
20667  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20668  ;;
20669  *)
20670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20671for as_dir in $PATH
20672do
20673  IFS=$as_save_IFS
20674  test -z "$as_dir" && as_dir=.
20675    for ac_exec_ext in '' $ac_executable_extensions; do
20676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20677    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20679    break 2
20680  fi
20681done
20682  done
20683IFS=$as_save_IFS
20684
20685  ;;
20686esac
20687fi
20688POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20689if test -n "$POTENTIAL_CXX"; then
20690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20691$as_echo "$POTENTIAL_CXX" >&6; }
20692else
20693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20694$as_echo "no" >&6; }
20695fi
20696
20697
20698  test -n "$POTENTIAL_CXX" && break
20699done
20700
20701    CXX=$POTENTIAL_CXX
20702  fi
20703
20704  if test "x$CXX" = x; then
20705
20706    # Print a helpful message on how to acquire the necessary build dependency.
20707    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20708    MISSING_DEPENDENCY=devkit
20709    PKGHANDLER_COMMAND=
20710
20711    case $PKGHANDLER in
20712	apt-get)
20713                apt_help     $MISSING_DEPENDENCY ;;
20714    yum)
20715                yum_help     $MISSING_DEPENDENCY ;;
20716	port)
20717                port_help    $MISSING_DEPENDENCY ;;
20718	pkgutil)
20719                pkgutil_help $MISSING_DEPENDENCY ;;
20720	pkgadd)
20721                pkgadd_help  $MISSING_DEPENDENCY ;;
20722    * )
20723      break ;;
20724    esac
20725
20726    if test "x$PKGHANDLER_COMMAND" != x; then
20727        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20728    fi
20729
20730      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20731  fi
20732
20733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20734
20735  # First separate the path from the arguments. This will split at the first
20736  # space.
20737  complete="$CXX"
20738  path="${complete%% *}"
20739  tmp="$complete EOL"
20740  arguments="${tmp#* }"
20741
20742  # Input might be given as Windows format, start by converting to
20743  # unix format.
20744  new_path=`$CYGPATH -u "$path"`
20745
20746  # Now try to locate executable using which
20747  new_path=`$WHICH "$new_path" 2> /dev/null`
20748  # bat and cmd files are not always considered executable in cygwin causing which
20749  # to not find them
20750  if test "x$new_path" = x \
20751           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20752           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20753    new_path=`$CYGPATH -u "$path"`
20754  fi
20755  if test "x$new_path" = x; then
20756    # Oops. Which didn't find the executable.
20757    # The splitting of arguments from the executable at a space might have been incorrect,
20758    # since paths with space are more likely in Windows. Give it another try with the whole
20759    # argument.
20760    path="$complete"
20761    arguments="EOL"
20762    new_path=`$CYGPATH -u "$path"`
20763    new_path=`$WHICH "$new_path" 2> /dev/null`
20764    # bat and cmd files are not always considered executable in cygwin causing which
20765    # to not find them
20766    if test "x$new_path" = x \
20767             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20768             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20769      new_path=`$CYGPATH -u "$path"`
20770    fi
20771    if test "x$new_path" = x; then
20772      # It's still not found. Now this is an unrecoverable error.
20773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20774$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20775      has_space=`$ECHO "$complete" | $GREP " "`
20776      if test "x$has_space" != x; then
20777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20779      fi
20780      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20781    fi
20782  fi
20783
20784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20787  # "foo.exe" is OK but "foo" is an error.
20788  #
20789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20790  # It is also a way to make sure we got the proper file name for the real test later on.
20791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20792  if test "x$test_shortpath" = x; then
20793    # Short path failed, file does not exist as specified.
20794    # Try adding .exe or .cmd
20795    if test -f "${new_path}.exe"; then
20796       input_to_shortpath="${new_path}.exe"
20797    elif test -f "${new_path}.cmd"; then
20798       input_to_shortpath="${new_path}.cmd"
20799    else
20800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20801$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20804      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20805    fi
20806  else
20807    input_to_shortpath="$new_path"
20808  fi
20809
20810  # Call helper function which possibly converts this using DOS-style short mode.
20811  # If so, the updated path is stored in $new_path.
20812  new_path="$input_to_shortpath"
20813
20814  input_path="$input_to_shortpath"
20815  # Check if we need to convert this using DOS-style short mode. If the path
20816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20817  # take no chances and rewrite it.
20818  # Note: m4 eats our [], so we need to use [ and ] instead.
20819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20820  if test "x$has_forbidden_chars" != x; then
20821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20825      # Going to short mode and back again did indeed matter. Since short mode is
20826      # case insensitive, let's make it lowercase to improve readability.
20827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20828      # Now convert it back to Unix-stile (cygpath)
20829      input_path=`$CYGPATH -u "$shortmode_path"`
20830      new_path="$input_path"
20831    fi
20832  fi
20833
20834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20835  if test "x$test_cygdrive_prefix" = x; then
20836    # As a simple fix, exclude /usr/bin since it's not a real path.
20837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20839      # a path prefixed by /cygdrive for fixpath to work.
20840      new_path="$CYGWIN_ROOT_PATH$input_path"
20841    fi
20842  fi
20843
20844  # remove trailing .exe if any
20845  new_path="${new_path/%.exe/}"
20846
20847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20848
20849  # First separate the path from the arguments. This will split at the first
20850  # space.
20851  complete="$CXX"
20852  path="${complete%% *}"
20853  tmp="$complete EOL"
20854  arguments="${tmp#* }"
20855
20856  # Input might be given as Windows format, start by converting to
20857  # unix format.
20858  new_path="$path"
20859
20860  windows_path="$new_path"
20861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20862    unix_path=`$CYGPATH -u "$windows_path"`
20863    new_path="$unix_path"
20864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20866    new_path="$unix_path"
20867  fi
20868
20869
20870  # Now try to locate executable using which
20871  new_path=`$WHICH "$new_path" 2> /dev/null`
20872
20873  if test "x$new_path" = x; then
20874    # Oops. Which didn't find the executable.
20875    # The splitting of arguments from the executable at a space might have been incorrect,
20876    # since paths with space are more likely in Windows. Give it another try with the whole
20877    # argument.
20878    path="$complete"
20879    arguments="EOL"
20880    new_path="$path"
20881
20882  windows_path="$new_path"
20883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20884    unix_path=`$CYGPATH -u "$windows_path"`
20885    new_path="$unix_path"
20886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20888    new_path="$unix_path"
20889  fi
20890
20891
20892    new_path=`$WHICH "$new_path" 2> /dev/null`
20893
20894    if test "x$new_path" = x; then
20895      # It's still not found. Now this is an unrecoverable error.
20896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20897$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20898      has_space=`$ECHO "$complete" | $GREP " "`
20899      if test "x$has_space" != x; then
20900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20902      fi
20903      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20904    fi
20905  fi
20906
20907  # Now new_path has a complete unix path to the binary
20908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20909    # Keep paths in /bin as-is, but remove trailing .exe if any
20910    new_path="${new_path/%.exe/}"
20911    # Do not save /bin paths to all_fixpath_prefixes!
20912  else
20913    # Not in mixed or Windows style, start by that.
20914    new_path=`cmd //c echo $new_path`
20915
20916  input_path="$new_path"
20917  # Check if we need to convert this using DOS-style short mode. If the path
20918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20919  # take no chances and rewrite it.
20920  # Note: m4 eats our [], so we need to use [ and ] instead.
20921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20922  if test "x$has_forbidden_chars" != x; then
20923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20925  fi
20926
20927    # Output is in $new_path
20928
20929  windows_path="$new_path"
20930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20931    unix_path=`$CYGPATH -u "$windows_path"`
20932    new_path="$unix_path"
20933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20935    new_path="$unix_path"
20936  fi
20937
20938    # remove trailing .exe if any
20939    new_path="${new_path/%.exe/}"
20940
20941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20943  fi
20944
20945  else
20946    # We're on a posix platform. Hooray! :)
20947    # First separate the path from the arguments. This will split at the first
20948    # space.
20949    complete="$CXX"
20950    path="${complete%% *}"
20951    tmp="$complete EOL"
20952    arguments="${tmp#* }"
20953
20954    # Cannot rely on the command "which" here since it doesn't always work.
20955    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20956    if test -z "$is_absolute_path"; then
20957      # Path to executable is not absolute. Find it.
20958      IFS_save="$IFS"
20959      IFS=:
20960      for p in $PATH; do
20961        if test -f "$p/$path" && test -x "$p/$path"; then
20962          new_path="$p/$path"
20963          break
20964        fi
20965      done
20966      IFS="$IFS_save"
20967    else
20968      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20969$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20970      new_path="$path"
20971    fi
20972
20973    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
20979$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
20986      if test "x$arguments" != xEOL; then
20987        new_complete="$new_path ${arguments% *}"
20988      else
20989        new_complete="$new_path"
20990      fi
20991
20992  if test "x$complete" != "x$new_complete"; then
20993      CXX="$new_complete"
20994      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20995$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20996    fi
20997
20998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20999$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21000  TEST_COMPILER="$CXX"
21001
21002    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21003        # Follow a chain of symbolic links. Use readlink
21004        # where it exists, else fall back to horribly
21005        # complicated shell code.
21006        if test "x$READLINK_TESTED" != yes; then
21007            # On MacOSX there is a readlink tool with a different
21008            # purpose than the GNU readlink tool. Check the found readlink.
21009            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21010            if test "x$ISGNU" = x; then
21011                 # A readlink that we do not know how to use.
21012                 # Are there other non-GNU readlinks out there?
21013                 READLINK_TESTED=yes
21014                 READLINK=
21015            fi
21016        fi
21017
21018        if test "x$READLINK" != x; then
21019            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21020        else
21021            # Save the current directory for restoring afterwards
21022            STARTDIR=$PWD
21023            COUNTER=0
21024            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21025            sym_link_file=`$BASENAME $TEST_COMPILER`
21026            cd $sym_link_dir
21027            # Use -P flag to resolve symlinks in directories.
21028            cd `$THEPWDCMD -P`
21029            sym_link_dir=`$THEPWDCMD -P`
21030            # Resolve file symlinks
21031            while test $COUNTER -lt 20; do
21032                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21033                if test "x$ISLINK" == x; then
21034                    # This is not a symbolic link! We are done!
21035                    break
21036                fi
21037                # Again resolve directory symlinks since the target of the just found
21038                # link could be in a different directory
21039                cd `$DIRNAME $ISLINK`
21040                sym_link_dir=`$THEPWDCMD -P`
21041                sym_link_file=`$BASENAME $ISLINK`
21042                let COUNTER=COUNTER+1
21043            done
21044            cd $STARTDIR
21045            TEST_COMPILER=$sym_link_dir/$sym_link_file
21046        fi
21047    fi
21048
21049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21050$as_echo "$TEST_COMPILER" >&6; }
21051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21052$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21053
21054  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21055  if test "x$COMPILER_BASENAME" = "xccache"; then
21056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21057$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21058    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21059    # We want to control ccache invocation ourselves, so ignore this cc and try
21060    # searching again.
21061
21062    # Remove the path to the fake ccache cc from the PATH
21063    RETRY_COMPILER_SAVED_PATH="$PATH"
21064    COMPILER_DIRNAME=`$DIRNAME $CXX`
21065    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21066
21067    # Try again looking for our compiler
21068    if test -n "$ac_tool_prefix"; then
21069  for ac_prog in $COMPILER_CHECK_LIST
21070  do
21071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21074$as_echo_n "checking for $ac_word... " >&6; }
21075if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21076  $as_echo_n "(cached) " >&6
21077else
21078  if test -n "$PROPER_COMPILER_CXX"; then
21079  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21080else
21081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21082for as_dir in $PATH
21083do
21084  IFS=$as_save_IFS
21085  test -z "$as_dir" && as_dir=.
21086    for ac_exec_ext in '' $ac_executable_extensions; do
21087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21088    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21090    break 2
21091  fi
21092done
21093  done
21094IFS=$as_save_IFS
21095
21096fi
21097fi
21098PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21099if test -n "$PROPER_COMPILER_CXX"; then
21100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21101$as_echo "$PROPER_COMPILER_CXX" >&6; }
21102else
21103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21104$as_echo "no" >&6; }
21105fi
21106
21107
21108    test -n "$PROPER_COMPILER_CXX" && break
21109  done
21110fi
21111if test -z "$PROPER_COMPILER_CXX"; then
21112  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21113  for ac_prog in $COMPILER_CHECK_LIST
21114do
21115  # Extract the first word of "$ac_prog", so it can be a program name with args.
21116set dummy $ac_prog; ac_word=$2
21117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21118$as_echo_n "checking for $ac_word... " >&6; }
21119if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21120  $as_echo_n "(cached) " >&6
21121else
21122  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21123  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21124else
21125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21126for as_dir in $PATH
21127do
21128  IFS=$as_save_IFS
21129  test -z "$as_dir" && as_dir=.
21130    for ac_exec_ext in '' $ac_executable_extensions; do
21131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21132    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21134    break 2
21135  fi
21136done
21137  done
21138IFS=$as_save_IFS
21139
21140fi
21141fi
21142ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21143if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21145$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21146else
21147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21148$as_echo "no" >&6; }
21149fi
21150
21151
21152  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21153done
21154
21155  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21156    PROPER_COMPILER_CXX=""
21157  else
21158    case $cross_compiling:$ac_tool_warned in
21159yes:)
21160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21162ac_tool_warned=yes ;;
21163esac
21164    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21165  fi
21166fi
21167
21168
21169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170
21171  # First separate the path from the arguments. This will split at the first
21172  # space.
21173  complete="$PROPER_COMPILER_CXX"
21174  path="${complete%% *}"
21175  tmp="$complete EOL"
21176  arguments="${tmp#* }"
21177
21178  # Input might be given as Windows format, start by converting to
21179  # unix format.
21180  new_path=`$CYGPATH -u "$path"`
21181
21182  # Now try to locate executable using which
21183  new_path=`$WHICH "$new_path" 2> /dev/null`
21184  # bat and cmd files are not always considered executable in cygwin causing which
21185  # to not find them
21186  if test "x$new_path" = x \
21187           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21188           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21189    new_path=`$CYGPATH -u "$path"`
21190  fi
21191  if test "x$new_path" = x; then
21192    # Oops. Which didn't find the executable.
21193    # The splitting of arguments from the executable at a space might have been incorrect,
21194    # since paths with space are more likely in Windows. Give it another try with the whole
21195    # argument.
21196    path="$complete"
21197    arguments="EOL"
21198    new_path=`$CYGPATH -u "$path"`
21199    new_path=`$WHICH "$new_path" 2> /dev/null`
21200    # bat and cmd files are not always considered executable in cygwin causing which
21201    # to not find them
21202    if test "x$new_path" = x \
21203             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21204             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21205      new_path=`$CYGPATH -u "$path"`
21206    fi
21207    if test "x$new_path" = x; then
21208      # It's still not found. Now this is an unrecoverable error.
21209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21210$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21211      has_space=`$ECHO "$complete" | $GREP " "`
21212      if test "x$has_space" != x; then
21213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21215      fi
21216      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21217    fi
21218  fi
21219
21220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21223  # "foo.exe" is OK but "foo" is an error.
21224  #
21225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21226  # It is also a way to make sure we got the proper file name for the real test later on.
21227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21228  if test "x$test_shortpath" = x; then
21229    # Short path failed, file does not exist as specified.
21230    # Try adding .exe or .cmd
21231    if test -f "${new_path}.exe"; then
21232       input_to_shortpath="${new_path}.exe"
21233    elif test -f "${new_path}.cmd"; then
21234       input_to_shortpath="${new_path}.cmd"
21235    else
21236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21237$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21238      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21239$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21241    fi
21242  else
21243    input_to_shortpath="$new_path"
21244  fi
21245
21246  # Call helper function which possibly converts this using DOS-style short mode.
21247  # If so, the updated path is stored in $new_path.
21248  new_path="$input_to_shortpath"
21249
21250  input_path="$input_to_shortpath"
21251  # Check if we need to convert this using DOS-style short mode. If the path
21252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21253  # take no chances and rewrite it.
21254  # Note: m4 eats our [], so we need to use [ and ] instead.
21255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21256  if test "x$has_forbidden_chars" != x; then
21257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21261      # Going to short mode and back again did indeed matter. Since short mode is
21262      # case insensitive, let's make it lowercase to improve readability.
21263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21264      # Now convert it back to Unix-stile (cygpath)
21265      input_path=`$CYGPATH -u "$shortmode_path"`
21266      new_path="$input_path"
21267    fi
21268  fi
21269
21270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21271  if test "x$test_cygdrive_prefix" = x; then
21272    # As a simple fix, exclude /usr/bin since it's not a real path.
21273    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21275      # a path prefixed by /cygdrive for fixpath to work.
21276      new_path="$CYGWIN_ROOT_PATH$input_path"
21277    fi
21278  fi
21279
21280  # remove trailing .exe if any
21281  new_path="${new_path/%.exe/}"
21282
21283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21284
21285  # First separate the path from the arguments. This will split at the first
21286  # space.
21287  complete="$PROPER_COMPILER_CXX"
21288  path="${complete%% *}"
21289  tmp="$complete EOL"
21290  arguments="${tmp#* }"
21291
21292  # Input might be given as Windows format, start by converting to
21293  # unix format.
21294  new_path="$path"
21295
21296  windows_path="$new_path"
21297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21298    unix_path=`$CYGPATH -u "$windows_path"`
21299    new_path="$unix_path"
21300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21302    new_path="$unix_path"
21303  fi
21304
21305
21306  # Now try to locate executable using which
21307  new_path=`$WHICH "$new_path" 2> /dev/null`
21308
21309  if test "x$new_path" = x; then
21310    # Oops. Which didn't find the executable.
21311    # The splitting of arguments from the executable at a space might have been incorrect,
21312    # since paths with space are more likely in Windows. Give it another try with the whole
21313    # argument.
21314    path="$complete"
21315    arguments="EOL"
21316    new_path="$path"
21317
21318  windows_path="$new_path"
21319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21320    unix_path=`$CYGPATH -u "$windows_path"`
21321    new_path="$unix_path"
21322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21324    new_path="$unix_path"
21325  fi
21326
21327
21328    new_path=`$WHICH "$new_path" 2> /dev/null`
21329
21330    if test "x$new_path" = x; then
21331      # It's still not found. Now this is an unrecoverable error.
21332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21333$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21334      has_space=`$ECHO "$complete" | $GREP " "`
21335      if test "x$has_space" != x; then
21336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21338      fi
21339      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21340    fi
21341  fi
21342
21343  # Now new_path has a complete unix path to the binary
21344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21345    # Keep paths in /bin as-is, but remove trailing .exe if any
21346    new_path="${new_path/%.exe/}"
21347    # Do not save /bin paths to all_fixpath_prefixes!
21348  else
21349    # Not in mixed or Windows style, start by that.
21350    new_path=`cmd //c echo $new_path`
21351
21352  input_path="$new_path"
21353  # Check if we need to convert this using DOS-style short mode. If the path
21354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21355  # take no chances and rewrite it.
21356  # Note: m4 eats our [], so we need to use [ and ] instead.
21357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21358  if test "x$has_forbidden_chars" != x; then
21359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21361  fi
21362
21363    # Output is in $new_path
21364
21365  windows_path="$new_path"
21366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21367    unix_path=`$CYGPATH -u "$windows_path"`
21368    new_path="$unix_path"
21369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21371    new_path="$unix_path"
21372  fi
21373
21374    # remove trailing .exe if any
21375    new_path="${new_path/%.exe/}"
21376
21377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21379  fi
21380
21381  else
21382    # We're on a posix platform. Hooray! :)
21383    # First separate the path from the arguments. This will split at the first
21384    # space.
21385    complete="$PROPER_COMPILER_CXX"
21386    path="${complete%% *}"
21387    tmp="$complete EOL"
21388    arguments="${tmp#* }"
21389
21390    # Cannot rely on the command "which" here since it doesn't always work.
21391    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21392    if test -z "$is_absolute_path"; then
21393      # Path to executable is not absolute. Find it.
21394      IFS_save="$IFS"
21395      IFS=:
21396      for p in $PATH; do
21397        if test -f "$p/$path" && test -x "$p/$path"; then
21398          new_path="$p/$path"
21399          break
21400        fi
21401      done
21402      IFS="$IFS_save"
21403    else
21404      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21405$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21406      new_path="$path"
21407    fi
21408
21409    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
21415$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
21422      if test "x$arguments" != xEOL; then
21423        new_complete="$new_path ${arguments% *}"
21424      else
21425        new_complete="$new_path"
21426      fi
21427
21428  if test "x$complete" != "x$new_complete"; then
21429      PROPER_COMPILER_CXX="$new_complete"
21430      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21431$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21432    fi
21433
21434    PATH="$RETRY_COMPILER_SAVED_PATH"
21435
21436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21437$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21438
21439    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21440        # Follow a chain of symbolic links. Use readlink
21441        # where it exists, else fall back to horribly
21442        # complicated shell code.
21443        if test "x$READLINK_TESTED" != yes; then
21444            # On MacOSX there is a readlink tool with a different
21445            # purpose than the GNU readlink tool. Check the found readlink.
21446            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21447            if test "x$ISGNU" = x; then
21448                 # A readlink that we do not know how to use.
21449                 # Are there other non-GNU readlinks out there?
21450                 READLINK_TESTED=yes
21451                 READLINK=
21452            fi
21453        fi
21454
21455        if test "x$READLINK" != x; then
21456            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21457        else
21458            # Save the current directory for restoring afterwards
21459            STARTDIR=$PWD
21460            COUNTER=0
21461            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21462            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21463            cd $sym_link_dir
21464            # Use -P flag to resolve symlinks in directories.
21465            cd `$THEPWDCMD -P`
21466            sym_link_dir=`$THEPWDCMD -P`
21467            # Resolve file symlinks
21468            while test $COUNTER -lt 20; do
21469                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21470                if test "x$ISLINK" == x; then
21471                    # This is not a symbolic link! We are done!
21472                    break
21473                fi
21474                # Again resolve directory symlinks since the target of the just found
21475                # link could be in a different directory
21476                cd `$DIRNAME $ISLINK`
21477                sym_link_dir=`$THEPWDCMD -P`
21478                sym_link_file=`$BASENAME $ISLINK`
21479                let COUNTER=COUNTER+1
21480            done
21481            cd $STARTDIR
21482            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21483        fi
21484    fi
21485
21486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21487$as_echo "$PROPER_COMPILER_CXX" >&6; }
21488    CXX="$PROPER_COMPILER_CXX"
21489  else
21490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21491$as_echo "no, keeping CXX" >&6; }
21492    CXX="$TEST_COMPILER"
21493  fi
21494
21495  COMPILER=$CXX
21496  COMPILER_NAME=$COMPILER_NAME
21497
21498  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21499    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21500    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21501    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21502    if test $? -ne 0; then
21503      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21504
21505      { $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
21506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21508$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21509      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21510    else
21511      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21512      COMPILER_VENDOR="Sun Studio"
21513    fi
21514  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21515    # First line typically looks something like:
21516    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21517    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21518    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21519    COMPILER_VENDOR="Microsoft CL.EXE"
21520    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21521    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21522      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21523        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21524      fi
21525    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21526      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21527        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21528      fi
21529    fi
21530  else
21531    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21532    # Check that this is likely to be GCC.
21533    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21534    if test $? -ne 0; then
21535      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21536$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21537      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21538$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21539      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21540    fi
21541
21542    # First line typically looks something like:
21543    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21544    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21545    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21546  fi
21547  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21548  CXX_VERSION="$COMPILER_VERSION"
21549  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21550  CXX_VENDOR="$COMPILER_VENDOR"
21551
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21553$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21554
21555
21556# Now that we have resolved CXX ourself, let autoconf have its go at it
21557ac_ext=cpp
21558ac_cpp='$CXXCPP $CPPFLAGS'
21559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21562if test -z "$CXX"; then
21563  if test -n "$CCC"; then
21564    CXX=$CCC
21565  else
21566    if test -n "$ac_tool_prefix"; then
21567  for ac_prog in $CXX
21568  do
21569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21572$as_echo_n "checking for $ac_word... " >&6; }
21573if test "${ac_cv_prog_CXX+set}" = set; then :
21574  $as_echo_n "(cached) " >&6
21575else
21576  if test -n "$CXX"; then
21577  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21578else
21579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21580for as_dir in $PATH
21581do
21582  IFS=$as_save_IFS
21583  test -z "$as_dir" && as_dir=.
21584    for ac_exec_ext in '' $ac_executable_extensions; do
21585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21586    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21588    break 2
21589  fi
21590done
21591  done
21592IFS=$as_save_IFS
21593
21594fi
21595fi
21596CXX=$ac_cv_prog_CXX
21597if test -n "$CXX"; then
21598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21599$as_echo "$CXX" >&6; }
21600else
21601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21602$as_echo "no" >&6; }
21603fi
21604
21605
21606    test -n "$CXX" && break
21607  done
21608fi
21609if test -z "$CXX"; then
21610  ac_ct_CXX=$CXX
21611  for ac_prog in $CXX
21612do
21613  # Extract the first word of "$ac_prog", so it can be a program name with args.
21614set dummy $ac_prog; ac_word=$2
21615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21616$as_echo_n "checking for $ac_word... " >&6; }
21617if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21618  $as_echo_n "(cached) " >&6
21619else
21620  if test -n "$ac_ct_CXX"; then
21621  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21622else
21623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21624for as_dir in $PATH
21625do
21626  IFS=$as_save_IFS
21627  test -z "$as_dir" && as_dir=.
21628    for ac_exec_ext in '' $ac_executable_extensions; do
21629  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21630    ac_cv_prog_ac_ct_CXX="$ac_prog"
21631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21632    break 2
21633  fi
21634done
21635  done
21636IFS=$as_save_IFS
21637
21638fi
21639fi
21640ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21641if test -n "$ac_ct_CXX"; then
21642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21643$as_echo "$ac_ct_CXX" >&6; }
21644else
21645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21646$as_echo "no" >&6; }
21647fi
21648
21649
21650  test -n "$ac_ct_CXX" && break
21651done
21652
21653  if test "x$ac_ct_CXX" = x; then
21654    CXX="g++"
21655  else
21656    case $cross_compiling:$ac_tool_warned in
21657yes:)
21658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21660ac_tool_warned=yes ;;
21661esac
21662    CXX=$ac_ct_CXX
21663  fi
21664fi
21665
21666  fi
21667fi
21668# Provide some information about the compiler.
21669$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21670set X $ac_compile
21671ac_compiler=$2
21672for ac_option in --version -v -V -qversion; do
21673  { { ac_try="$ac_compiler $ac_option >&5"
21674case "(($ac_try" in
21675  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21676  *) ac_try_echo=$ac_try;;
21677esac
21678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21679$as_echo "$ac_try_echo"; } >&5
21680  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21681  ac_status=$?
21682  if test -s conftest.err; then
21683    sed '10a\
21684... rest of stderr output deleted ...
21685         10q' conftest.err >conftest.er1
21686    cat conftest.er1 >&5
21687  fi
21688  rm -f conftest.er1 conftest.err
21689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21690  test $ac_status = 0; }
21691done
21692
21693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21694$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21695if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21696  $as_echo_n "(cached) " >&6
21697else
21698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699/* end confdefs.h.  */
21700
21701int
21702main ()
21703{
21704#ifndef __GNUC__
21705       choke me
21706#endif
21707
21708  ;
21709  return 0;
21710}
21711_ACEOF
21712if ac_fn_cxx_try_compile "$LINENO"; then :
21713  ac_compiler_gnu=yes
21714else
21715  ac_compiler_gnu=no
21716fi
21717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21718ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21719
21720fi
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21722$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21723if test $ac_compiler_gnu = yes; then
21724  GXX=yes
21725else
21726  GXX=
21727fi
21728ac_test_CXXFLAGS=${CXXFLAGS+set}
21729ac_save_CXXFLAGS=$CXXFLAGS
21730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21731$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21732if test "${ac_cv_prog_cxx_g+set}" = set; then :
21733  $as_echo_n "(cached) " >&6
21734else
21735  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21736   ac_cxx_werror_flag=yes
21737   ac_cv_prog_cxx_g=no
21738   CXXFLAGS="-g"
21739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21740/* end confdefs.h.  */
21741
21742int
21743main ()
21744{
21745
21746  ;
21747  return 0;
21748}
21749_ACEOF
21750if ac_fn_cxx_try_compile "$LINENO"; then :
21751  ac_cv_prog_cxx_g=yes
21752else
21753  CXXFLAGS=""
21754      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21755/* end confdefs.h.  */
21756
21757int
21758main ()
21759{
21760
21761  ;
21762  return 0;
21763}
21764_ACEOF
21765if ac_fn_cxx_try_compile "$LINENO"; then :
21766
21767else
21768  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21769	 CXXFLAGS="-g"
21770	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21771/* end confdefs.h.  */
21772
21773int
21774main ()
21775{
21776
21777  ;
21778  return 0;
21779}
21780_ACEOF
21781if ac_fn_cxx_try_compile "$LINENO"; then :
21782  ac_cv_prog_cxx_g=yes
21783fi
21784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21785fi
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21787fi
21788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21789   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21790fi
21791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21792$as_echo "$ac_cv_prog_cxx_g" >&6; }
21793if test "$ac_test_CXXFLAGS" = set; then
21794  CXXFLAGS=$ac_save_CXXFLAGS
21795elif test $ac_cv_prog_cxx_g = yes; then
21796  if test "$GXX" = yes; then
21797    CXXFLAGS="-g -O2"
21798  else
21799    CXXFLAGS="-g"
21800  fi
21801else
21802  if test "$GXX" = yes; then
21803    CXXFLAGS="-O2"
21804  else
21805    CXXFLAGS=
21806  fi
21807fi
21808ac_ext=cpp
21809ac_cpp='$CXXCPP $CPPFLAGS'
21810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21813
21814
21815### Locate other tools
21816
21817if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21818    ac_ext=m
21819ac_cpp='$OBJCPP $CPPFLAGS'
21820ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21821ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21822ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21823if test -n "$ac_tool_prefix"; then
21824  for ac_prog in gcc objcc objc cc CC
21825  do
21826    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21827set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21829$as_echo_n "checking for $ac_word... " >&6; }
21830if test "${ac_cv_prog_OBJC+set}" = set; then :
21831  $as_echo_n "(cached) " >&6
21832else
21833  if test -n "$OBJC"; then
21834  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21835else
21836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21837for as_dir in $PATH
21838do
21839  IFS=$as_save_IFS
21840  test -z "$as_dir" && as_dir=.
21841    for ac_exec_ext in '' $ac_executable_extensions; do
21842  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21843    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21845    break 2
21846  fi
21847done
21848  done
21849IFS=$as_save_IFS
21850
21851fi
21852fi
21853OBJC=$ac_cv_prog_OBJC
21854if test -n "$OBJC"; then
21855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21856$as_echo "$OBJC" >&6; }
21857else
21858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21859$as_echo "no" >&6; }
21860fi
21861
21862
21863    test -n "$OBJC" && break
21864  done
21865fi
21866if test -z "$OBJC"; then
21867  ac_ct_OBJC=$OBJC
21868  for ac_prog in gcc objcc objc cc CC
21869do
21870  # Extract the first word of "$ac_prog", so it can be a program name with args.
21871set dummy $ac_prog; ac_word=$2
21872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21873$as_echo_n "checking for $ac_word... " >&6; }
21874if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21875  $as_echo_n "(cached) " >&6
21876else
21877  if test -n "$ac_ct_OBJC"; then
21878  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21879else
21880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21881for as_dir in $PATH
21882do
21883  IFS=$as_save_IFS
21884  test -z "$as_dir" && as_dir=.
21885    for ac_exec_ext in '' $ac_executable_extensions; do
21886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21887    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21889    break 2
21890  fi
21891done
21892  done
21893IFS=$as_save_IFS
21894
21895fi
21896fi
21897ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21898if test -n "$ac_ct_OBJC"; then
21899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21900$as_echo "$ac_ct_OBJC" >&6; }
21901else
21902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21903$as_echo "no" >&6; }
21904fi
21905
21906
21907  test -n "$ac_ct_OBJC" && break
21908done
21909
21910  if test "x$ac_ct_OBJC" = x; then
21911    OBJC="gcc"
21912  else
21913    case $cross_compiling:$ac_tool_warned in
21914yes:)
21915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21917ac_tool_warned=yes ;;
21918esac
21919    OBJC=$ac_ct_OBJC
21920  fi
21921fi
21922
21923# Provide some information about the compiler.
21924$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21925set X $ac_compile
21926ac_compiler=$2
21927for ac_option in --version -v -V -qversion; do
21928  { { ac_try="$ac_compiler $ac_option >&5"
21929case "(($ac_try" in
21930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21931  *) ac_try_echo=$ac_try;;
21932esac
21933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21934$as_echo "$ac_try_echo"; } >&5
21935  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21936  ac_status=$?
21937  if test -s conftest.err; then
21938    sed '10a\
21939... rest of stderr output deleted ...
21940         10q' conftest.err >conftest.er1
21941    cat conftest.er1 >&5
21942  fi
21943  rm -f conftest.er1 conftest.err
21944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21945  test $ac_status = 0; }
21946done
21947
21948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21949$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21950if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21951  $as_echo_n "(cached) " >&6
21952else
21953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21954/* end confdefs.h.  */
21955
21956int
21957main ()
21958{
21959#ifndef __GNUC__
21960       choke me
21961#endif
21962
21963  ;
21964  return 0;
21965}
21966_ACEOF
21967if ac_fn_objc_try_compile "$LINENO"; then :
21968  ac_compiler_gnu=yes
21969else
21970  ac_compiler_gnu=no
21971fi
21972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21973ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21974
21975fi
21976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21977$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21978if test $ac_compiler_gnu = yes; then
21979  GOBJC=yes
21980else
21981  GOBJC=
21982fi
21983ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21984ac_save_OBJCFLAGS=$OBJCFLAGS
21985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21986$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21987if test "${ac_cv_prog_objc_g+set}" = set; then :
21988  $as_echo_n "(cached) " >&6
21989else
21990  ac_save_objc_werror_flag=$ac_objc_werror_flag
21991   ac_objc_werror_flag=yes
21992   ac_cv_prog_objc_g=no
21993   OBJCFLAGS="-g"
21994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21995/* end confdefs.h.  */
21996
21997int
21998main ()
21999{
22000
22001  ;
22002  return 0;
22003}
22004_ACEOF
22005if ac_fn_objc_try_compile "$LINENO"; then :
22006  ac_cv_prog_objc_g=yes
22007else
22008  OBJCFLAGS=""
22009      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22010/* end confdefs.h.  */
22011
22012int
22013main ()
22014{
22015
22016  ;
22017  return 0;
22018}
22019_ACEOF
22020if ac_fn_objc_try_compile "$LINENO"; then :
22021
22022else
22023  ac_objc_werror_flag=$ac_save_objc_werror_flag
22024	 OBJCFLAGS="-g"
22025	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22026/* end confdefs.h.  */
22027
22028int
22029main ()
22030{
22031
22032  ;
22033  return 0;
22034}
22035_ACEOF
22036if ac_fn_objc_try_compile "$LINENO"; then :
22037  ac_cv_prog_objc_g=yes
22038fi
22039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22040fi
22041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22042fi
22043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044   ac_objc_werror_flag=$ac_save_objc_werror_flag
22045fi
22046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22047$as_echo "$ac_cv_prog_objc_g" >&6; }
22048if test "$ac_test_OBJCFLAGS" = set; then
22049  OBJCFLAGS=$ac_save_OBJCFLAGS
22050elif test $ac_cv_prog_objc_g = yes; then
22051  if test "$GOBJC" = yes; then
22052    OBJCFLAGS="-g -O2"
22053  else
22054    OBJCFLAGS="-g"
22055  fi
22056else
22057  if test "$GOBJC" = yes; then
22058    OBJCFLAGS="-O2"
22059  else
22060    OBJCFLAGS=
22061  fi
22062fi
22063ac_ext=cpp
22064ac_cpp='$CXXCPP $CPPFLAGS'
22065ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22066ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22067ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22068
22069
22070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22071
22072  # First separate the path from the arguments. This will split at the first
22073  # space.
22074  complete="$OBJC"
22075  path="${complete%% *}"
22076  tmp="$complete EOL"
22077  arguments="${tmp#* }"
22078
22079  # Input might be given as Windows format, start by converting to
22080  # unix format.
22081  new_path=`$CYGPATH -u "$path"`
22082
22083  # Now try to locate executable using which
22084  new_path=`$WHICH "$new_path" 2> /dev/null`
22085  # bat and cmd files are not always considered executable in cygwin causing which
22086  # to not find them
22087  if test "x$new_path" = x \
22088           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22089           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22090    new_path=`$CYGPATH -u "$path"`
22091  fi
22092  if test "x$new_path" = x; then
22093    # Oops. Which didn't find the executable.
22094    # The splitting of arguments from the executable at a space might have been incorrect,
22095    # since paths with space are more likely in Windows. Give it another try with the whole
22096    # argument.
22097    path="$complete"
22098    arguments="EOL"
22099    new_path=`$CYGPATH -u "$path"`
22100    new_path=`$WHICH "$new_path" 2> /dev/null`
22101    # bat and cmd files are not always considered executable in cygwin causing which
22102    # to not find them
22103    if test "x$new_path" = x \
22104             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22105             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22106      new_path=`$CYGPATH -u "$path"`
22107    fi
22108    if test "x$new_path" = x; then
22109      # It's still not found. Now this is an unrecoverable error.
22110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22111$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22112      has_space=`$ECHO "$complete" | $GREP " "`
22113      if test "x$has_space" != x; then
22114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22116      fi
22117      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22118    fi
22119  fi
22120
22121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22124  # "foo.exe" is OK but "foo" is an error.
22125  #
22126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22127  # It is also a way to make sure we got the proper file name for the real test later on.
22128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22129  if test "x$test_shortpath" = x; then
22130    # Short path failed, file does not exist as specified.
22131    # Try adding .exe or .cmd
22132    if test -f "${new_path}.exe"; then
22133       input_to_shortpath="${new_path}.exe"
22134    elif test -f "${new_path}.cmd"; then
22135       input_to_shortpath="${new_path}.cmd"
22136    else
22137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22138$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22139      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22140$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22141      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22142    fi
22143  else
22144    input_to_shortpath="$new_path"
22145  fi
22146
22147  # Call helper function which possibly converts this using DOS-style short mode.
22148  # If so, the updated path is stored in $new_path.
22149  new_path="$input_to_shortpath"
22150
22151  input_path="$input_to_shortpath"
22152  # Check if we need to convert this using DOS-style short mode. If the path
22153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22154  # take no chances and rewrite it.
22155  # Note: m4 eats our [], so we need to use [ and ] instead.
22156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22157  if test "x$has_forbidden_chars" != x; then
22158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22162      # Going to short mode and back again did indeed matter. Since short mode is
22163      # case insensitive, let's make it lowercase to improve readability.
22164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22165      # Now convert it back to Unix-stile (cygpath)
22166      input_path=`$CYGPATH -u "$shortmode_path"`
22167      new_path="$input_path"
22168    fi
22169  fi
22170
22171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22172  if test "x$test_cygdrive_prefix" = x; then
22173    # As a simple fix, exclude /usr/bin since it's not a real path.
22174    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22176      # a path prefixed by /cygdrive for fixpath to work.
22177      new_path="$CYGWIN_ROOT_PATH$input_path"
22178    fi
22179  fi
22180
22181  # remove trailing .exe if any
22182  new_path="${new_path/%.exe/}"
22183
22184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22185
22186  # First separate the path from the arguments. This will split at the first
22187  # space.
22188  complete="$OBJC"
22189  path="${complete%% *}"
22190  tmp="$complete EOL"
22191  arguments="${tmp#* }"
22192
22193  # Input might be given as Windows format, start by converting to
22194  # unix format.
22195  new_path="$path"
22196
22197  windows_path="$new_path"
22198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22199    unix_path=`$CYGPATH -u "$windows_path"`
22200    new_path="$unix_path"
22201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22203    new_path="$unix_path"
22204  fi
22205
22206
22207  # Now try to locate executable using which
22208  new_path=`$WHICH "$new_path" 2> /dev/null`
22209
22210  if test "x$new_path" = x; then
22211    # Oops. Which didn't find the executable.
22212    # The splitting of arguments from the executable at a space might have been incorrect,
22213    # since paths with space are more likely in Windows. Give it another try with the whole
22214    # argument.
22215    path="$complete"
22216    arguments="EOL"
22217    new_path="$path"
22218
22219  windows_path="$new_path"
22220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22221    unix_path=`$CYGPATH -u "$windows_path"`
22222    new_path="$unix_path"
22223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22225    new_path="$unix_path"
22226  fi
22227
22228
22229    new_path=`$WHICH "$new_path" 2> /dev/null`
22230
22231    if test "x$new_path" = x; then
22232      # It's still not found. Now this is an unrecoverable error.
22233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22234$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22235      has_space=`$ECHO "$complete" | $GREP " "`
22236      if test "x$has_space" != x; then
22237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22239      fi
22240      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22241    fi
22242  fi
22243
22244  # Now new_path has a complete unix path to the binary
22245  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22246    # Keep paths in /bin as-is, but remove trailing .exe if any
22247    new_path="${new_path/%.exe/}"
22248    # Do not save /bin paths to all_fixpath_prefixes!
22249  else
22250    # Not in mixed or Windows style, start by that.
22251    new_path=`cmd //c echo $new_path`
22252
22253  input_path="$new_path"
22254  # Check if we need to convert this using DOS-style short mode. If the path
22255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22256  # take no chances and rewrite it.
22257  # Note: m4 eats our [], so we need to use [ and ] instead.
22258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22259  if test "x$has_forbidden_chars" != x; then
22260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22262  fi
22263
22264    # Output is in $new_path
22265
22266  windows_path="$new_path"
22267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22268    unix_path=`$CYGPATH -u "$windows_path"`
22269    new_path="$unix_path"
22270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22272    new_path="$unix_path"
22273  fi
22274
22275    # remove trailing .exe if any
22276    new_path="${new_path/%.exe/}"
22277
22278    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22279    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22280  fi
22281
22282  else
22283    # We're on a posix platform. Hooray! :)
22284    # First separate the path from the arguments. This will split at the first
22285    # space.
22286    complete="$OBJC"
22287    path="${complete%% *}"
22288    tmp="$complete EOL"
22289    arguments="${tmp#* }"
22290
22291    # Cannot rely on the command "which" here since it doesn't always work.
22292    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22293    if test -z "$is_absolute_path"; then
22294      # Path to executable is not absolute. Find it.
22295      IFS_save="$IFS"
22296      IFS=:
22297      for p in $PATH; do
22298        if test -f "$p/$path" && test -x "$p/$path"; then
22299          new_path="$p/$path"
22300          break
22301        fi
22302      done
22303      IFS="$IFS_save"
22304    else
22305      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22306$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22307      new_path="$path"
22308    fi
22309
22310    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
22316$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
22323      if test "x$arguments" != xEOL; then
22324        new_complete="$new_path ${arguments% *}"
22325      else
22326        new_complete="$new_path"
22327      fi
22328
22329  if test "x$complete" != "x$new_complete"; then
22330      OBJC="$new_complete"
22331      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22332$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22333    fi
22334
22335else
22336    OBJC=
22337fi
22338
22339# Restore the flags to the user specified values.
22340# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22341CFLAGS="$ORG_CFLAGS"
22342CXXFLAGS="$ORG_CXXFLAGS"
22343OBJCFLAGS="$ORG_OBJCFLAGS"
22344
22345LD="$CC"
22346LDEXE="$CC"
22347LDCXX="$CXX"
22348LDEXECXX="$CXX"
22349
22350# LDEXE is the linker to use, when creating executables.
22351
22352# Linking C++ libraries.
22353
22354# Linking C++ executables.
22355
22356
22357if test "x$OPENJDK_TARGET_OS" != xwindows; then
22358    if test -n "$ac_tool_prefix"; then
22359  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22360set dummy ${ac_tool_prefix}ar; ac_word=$2
22361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22362$as_echo_n "checking for $ac_word... " >&6; }
22363if test "${ac_cv_prog_AR+set}" = set; then :
22364  $as_echo_n "(cached) " >&6
22365else
22366  if test -n "$AR"; then
22367  ac_cv_prog_AR="$AR" # Let the user override the test.
22368else
22369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22370for as_dir in $PATH
22371do
22372  IFS=$as_save_IFS
22373  test -z "$as_dir" && as_dir=.
22374    for ac_exec_ext in '' $ac_executable_extensions; do
22375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22376    ac_cv_prog_AR="${ac_tool_prefix}ar"
22377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22378    break 2
22379  fi
22380done
22381  done
22382IFS=$as_save_IFS
22383
22384fi
22385fi
22386AR=$ac_cv_prog_AR
22387if test -n "$AR"; then
22388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22389$as_echo "$AR" >&6; }
22390else
22391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22392$as_echo "no" >&6; }
22393fi
22394
22395
22396fi
22397if test -z "$ac_cv_prog_AR"; then
22398  ac_ct_AR=$AR
22399  # Extract the first word of "ar", so it can be a program name with args.
22400set dummy ar; ac_word=$2
22401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22402$as_echo_n "checking for $ac_word... " >&6; }
22403if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  if test -n "$ac_ct_AR"; then
22407  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22408else
22409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22410for as_dir in $PATH
22411do
22412  IFS=$as_save_IFS
22413  test -z "$as_dir" && as_dir=.
22414    for ac_exec_ext in '' $ac_executable_extensions; do
22415  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22416    ac_cv_prog_ac_ct_AR="ar"
22417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22418    break 2
22419  fi
22420done
22421  done
22422IFS=$as_save_IFS
22423
22424fi
22425fi
22426ac_ct_AR=$ac_cv_prog_ac_ct_AR
22427if test -n "$ac_ct_AR"; then
22428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22429$as_echo "$ac_ct_AR" >&6; }
22430else
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22432$as_echo "no" >&6; }
22433fi
22434
22435  if test "x$ac_ct_AR" = x; then
22436    AR=""
22437  else
22438    case $cross_compiling:$ac_tool_warned in
22439yes:)
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22441$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22442ac_tool_warned=yes ;;
22443esac
22444    AR=$ac_ct_AR
22445  fi
22446else
22447  AR="$ac_cv_prog_AR"
22448fi
22449
22450
22451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22452
22453  # First separate the path from the arguments. This will split at the first
22454  # space.
22455  complete="$AR"
22456  path="${complete%% *}"
22457  tmp="$complete EOL"
22458  arguments="${tmp#* }"
22459
22460  # Input might be given as Windows format, start by converting to
22461  # unix format.
22462  new_path=`$CYGPATH -u "$path"`
22463
22464  # Now try to locate executable using which
22465  new_path=`$WHICH "$new_path" 2> /dev/null`
22466  # bat and cmd files are not always considered executable in cygwin causing which
22467  # to not find them
22468  if test "x$new_path" = x \
22469           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22470           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22471    new_path=`$CYGPATH -u "$path"`
22472  fi
22473  if test "x$new_path" = x; then
22474    # Oops. Which didn't find the executable.
22475    # The splitting of arguments from the executable at a space might have been incorrect,
22476    # since paths with space are more likely in Windows. Give it another try with the whole
22477    # argument.
22478    path="$complete"
22479    arguments="EOL"
22480    new_path=`$CYGPATH -u "$path"`
22481    new_path=`$WHICH "$new_path" 2> /dev/null`
22482    # bat and cmd files are not always considered executable in cygwin causing which
22483    # to not find them
22484    if test "x$new_path" = x \
22485             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22486             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22487      new_path=`$CYGPATH -u "$path"`
22488    fi
22489    if test "x$new_path" = x; then
22490      # It's still not found. Now this is an unrecoverable error.
22491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22492$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22493      has_space=`$ECHO "$complete" | $GREP " "`
22494      if test "x$has_space" != x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22497      fi
22498      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22499    fi
22500  fi
22501
22502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22505  # "foo.exe" is OK but "foo" is an error.
22506  #
22507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22508  # It is also a way to make sure we got the proper file name for the real test later on.
22509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22510  if test "x$test_shortpath" = x; then
22511    # Short path failed, file does not exist as specified.
22512    # Try adding .exe or .cmd
22513    if test -f "${new_path}.exe"; then
22514       input_to_shortpath="${new_path}.exe"
22515    elif test -f "${new_path}.cmd"; then
22516       input_to_shortpath="${new_path}.cmd"
22517    else
22518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22519$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22520      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22521$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22522      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22523    fi
22524  else
22525    input_to_shortpath="$new_path"
22526  fi
22527
22528  # Call helper function which possibly converts this using DOS-style short mode.
22529  # If so, the updated path is stored in $new_path.
22530  new_path="$input_to_shortpath"
22531
22532  input_path="$input_to_shortpath"
22533  # Check if we need to convert this using DOS-style short mode. If the path
22534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22535  # take no chances and rewrite it.
22536  # Note: m4 eats our [], so we need to use [ and ] instead.
22537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22538  if test "x$has_forbidden_chars" != x; then
22539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22543      # Going to short mode and back again did indeed matter. Since short mode is
22544      # case insensitive, let's make it lowercase to improve readability.
22545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22546      # Now convert it back to Unix-stile (cygpath)
22547      input_path=`$CYGPATH -u "$shortmode_path"`
22548      new_path="$input_path"
22549    fi
22550  fi
22551
22552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22553  if test "x$test_cygdrive_prefix" = x; then
22554    # As a simple fix, exclude /usr/bin since it's not a real path.
22555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22557      # a path prefixed by /cygdrive for fixpath to work.
22558      new_path="$CYGWIN_ROOT_PATH$input_path"
22559    fi
22560  fi
22561
22562  # remove trailing .exe if any
22563  new_path="${new_path/%.exe/}"
22564
22565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22566
22567  # First separate the path from the arguments. This will split at the first
22568  # space.
22569  complete="$AR"
22570  path="${complete%% *}"
22571  tmp="$complete EOL"
22572  arguments="${tmp#* }"
22573
22574  # Input might be given as Windows format, start by converting to
22575  # unix format.
22576  new_path="$path"
22577
22578  windows_path="$new_path"
22579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22580    unix_path=`$CYGPATH -u "$windows_path"`
22581    new_path="$unix_path"
22582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22584    new_path="$unix_path"
22585  fi
22586
22587
22588  # Now try to locate executable using which
22589  new_path=`$WHICH "$new_path" 2> /dev/null`
22590
22591  if test "x$new_path" = x; then
22592    # Oops. Which didn't find the executable.
22593    # The splitting of arguments from the executable at a space might have been incorrect,
22594    # since paths with space are more likely in Windows. Give it another try with the whole
22595    # argument.
22596    path="$complete"
22597    arguments="EOL"
22598    new_path="$path"
22599
22600  windows_path="$new_path"
22601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22602    unix_path=`$CYGPATH -u "$windows_path"`
22603    new_path="$unix_path"
22604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22606    new_path="$unix_path"
22607  fi
22608
22609
22610    new_path=`$WHICH "$new_path" 2> /dev/null`
22611
22612    if test "x$new_path" = x; then
22613      # It's still not found. Now this is an unrecoverable error.
22614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22615$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22616      has_space=`$ECHO "$complete" | $GREP " "`
22617      if test "x$has_space" != x; then
22618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22620      fi
22621      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22622    fi
22623  fi
22624
22625  # Now new_path has a complete unix path to the binary
22626  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22627    # Keep paths in /bin as-is, but remove trailing .exe if any
22628    new_path="${new_path/%.exe/}"
22629    # Do not save /bin paths to all_fixpath_prefixes!
22630  else
22631    # Not in mixed or Windows style, start by that.
22632    new_path=`cmd //c echo $new_path`
22633
22634  input_path="$new_path"
22635  # Check if we need to convert this using DOS-style short mode. If the path
22636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22637  # take no chances and rewrite it.
22638  # Note: m4 eats our [], so we need to use [ and ] instead.
22639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22640  if test "x$has_forbidden_chars" != x; then
22641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643  fi
22644
22645    # Output is in $new_path
22646
22647  windows_path="$new_path"
22648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22649    unix_path=`$CYGPATH -u "$windows_path"`
22650    new_path="$unix_path"
22651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22653    new_path="$unix_path"
22654  fi
22655
22656    # remove trailing .exe if any
22657    new_path="${new_path/%.exe/}"
22658
22659    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22660    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22661  fi
22662
22663  else
22664    # We're on a posix platform. Hooray! :)
22665    # First separate the path from the arguments. This will split at the first
22666    # space.
22667    complete="$AR"
22668    path="${complete%% *}"
22669    tmp="$complete EOL"
22670    arguments="${tmp#* }"
22671
22672    # Cannot rely on the command "which" here since it doesn't always work.
22673    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22674    if test -z "$is_absolute_path"; then
22675      # Path to executable is not absolute. Find it.
22676      IFS_save="$IFS"
22677      IFS=:
22678      for p in $PATH; do
22679        if test -f "$p/$path" && test -x "$p/$path"; then
22680          new_path="$p/$path"
22681          break
22682        fi
22683      done
22684      IFS="$IFS_save"
22685    else
22686      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22687$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22688      new_path="$path"
22689    fi
22690
22691    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
22697$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
22704      if test "x$arguments" != xEOL; then
22705        new_complete="$new_path ${arguments% *}"
22706      else
22707        new_complete="$new_path"
22708      fi
22709
22710  if test "x$complete" != "x$new_complete"; then
22711      AR="$new_complete"
22712      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22713$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22714    fi
22715
22716fi
22717if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22718    ARFLAGS="-r"
22719else
22720    ARFLAGS=""
22721fi
22722
22723
22724# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22725HOTSPOT_CXX="$CXX"
22726HOTSPOT_LD="$LD"
22727
22728
22729
22730COMPILER_NAME=gcc
22731COMPILER_TYPE=CC
22732if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22733
22734    # For now, assume that we are always compiling using cl.exe.
22735    CC_OUT_OPTION=-Fo
22736    EXE_OUT_OPTION=-out:
22737    LD_OUT_OPTION=-out:
22738    AR_OUT_OPTION=-out:
22739    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22740    # program for something completely different.
22741    # Extract the first word of "link", so it can be a program name with args.
22742set dummy link; ac_word=$2
22743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22744$as_echo_n "checking for $ac_word... " >&6; }
22745if test "${ac_cv_prog_WINLD+set}" = set; then :
22746  $as_echo_n "(cached) " >&6
22747else
22748  if test -n "$WINLD"; then
22749  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22750else
22751  ac_prog_rejected=no
22752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22753for as_dir in $PATH
22754do
22755  IFS=$as_save_IFS
22756  test -z "$as_dir" && as_dir=.
22757    for ac_exec_ext in '' $ac_executable_extensions; do
22758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22759    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22760       ac_prog_rejected=yes
22761       continue
22762     fi
22763    ac_cv_prog_WINLD="link"
22764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22765    break 2
22766  fi
22767done
22768  done
22769IFS=$as_save_IFS
22770
22771if test $ac_prog_rejected = yes; then
22772  # We found a bogon in the path, so make sure we never use it.
22773  set dummy $ac_cv_prog_WINLD
22774  shift
22775  if test $# != 0; then
22776    # We chose a different compiler from the bogus one.
22777    # However, it has the same basename, so the bogon will be chosen
22778    # first if we set WINLD to just the basename; use the full file name.
22779    shift
22780    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22781  fi
22782fi
22783fi
22784fi
22785WINLD=$ac_cv_prog_WINLD
22786if test -n "$WINLD"; then
22787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22788$as_echo "$WINLD" >&6; }
22789else
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22791$as_echo "no" >&6; }
22792fi
22793
22794
22795    # Since we must ignore the first found link, WINLD will contain
22796    # the full path to the link.exe program.
22797
22798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22799
22800  # First separate the path from the arguments. This will split at the first
22801  # space.
22802  complete="$WINLD"
22803  path="${complete%% *}"
22804  tmp="$complete EOL"
22805  arguments="${tmp#* }"
22806
22807  # Input might be given as Windows format, start by converting to
22808  # unix format.
22809  new_path=`$CYGPATH -u "$path"`
22810
22811  # Now try to locate executable using which
22812  new_path=`$WHICH "$new_path" 2> /dev/null`
22813  # bat and cmd files are not always considered executable in cygwin causing which
22814  # to not find them
22815  if test "x$new_path" = x \
22816           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22817           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22818    new_path=`$CYGPATH -u "$path"`
22819  fi
22820  if test "x$new_path" = x; then
22821    # Oops. Which didn't find the executable.
22822    # The splitting of arguments from the executable at a space might have been incorrect,
22823    # since paths with space are more likely in Windows. Give it another try with the whole
22824    # argument.
22825    path="$complete"
22826    arguments="EOL"
22827    new_path=`$CYGPATH -u "$path"`
22828    new_path=`$WHICH "$new_path" 2> /dev/null`
22829    # bat and cmd files are not always considered executable in cygwin causing which
22830    # to not find them
22831    if test "x$new_path" = x \
22832             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22833             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22834      new_path=`$CYGPATH -u "$path"`
22835    fi
22836    if test "x$new_path" = x; then
22837      # It's still not found. Now this is an unrecoverable error.
22838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22839$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22840      has_space=`$ECHO "$complete" | $GREP " "`
22841      if test "x$has_space" != x; then
22842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22844      fi
22845      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22846    fi
22847  fi
22848
22849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22852  # "foo.exe" is OK but "foo" is an error.
22853  #
22854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22855  # It is also a way to make sure we got the proper file name for the real test later on.
22856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22857  if test "x$test_shortpath" = x; then
22858    # Short path failed, file does not exist as specified.
22859    # Try adding .exe or .cmd
22860    if test -f "${new_path}.exe"; then
22861       input_to_shortpath="${new_path}.exe"
22862    elif test -f "${new_path}.cmd"; then
22863       input_to_shortpath="${new_path}.cmd"
22864    else
22865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22866$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22869      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22870    fi
22871  else
22872    input_to_shortpath="$new_path"
22873  fi
22874
22875  # Call helper function which possibly converts this using DOS-style short mode.
22876  # If so, the updated path is stored in $new_path.
22877  new_path="$input_to_shortpath"
22878
22879  input_path="$input_to_shortpath"
22880  # Check if we need to convert this using DOS-style short mode. If the path
22881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22882  # take no chances and rewrite it.
22883  # Note: m4 eats our [], so we need to use [ and ] instead.
22884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22885  if test "x$has_forbidden_chars" != x; then
22886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22890      # Going to short mode and back again did indeed matter. Since short mode is
22891      # case insensitive, let's make it lowercase to improve readability.
22892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22893      # Now convert it back to Unix-stile (cygpath)
22894      input_path=`$CYGPATH -u "$shortmode_path"`
22895      new_path="$input_path"
22896    fi
22897  fi
22898
22899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22900  if test "x$test_cygdrive_prefix" = x; then
22901    # As a simple fix, exclude /usr/bin since it's not a real path.
22902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22904      # a path prefixed by /cygdrive for fixpath to work.
22905      new_path="$CYGWIN_ROOT_PATH$input_path"
22906    fi
22907  fi
22908
22909  # remove trailing .exe if any
22910  new_path="${new_path/%.exe/}"
22911
22912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22913
22914  # First separate the path from the arguments. This will split at the first
22915  # space.
22916  complete="$WINLD"
22917  path="${complete%% *}"
22918  tmp="$complete EOL"
22919  arguments="${tmp#* }"
22920
22921  # Input might be given as Windows format, start by converting to
22922  # unix format.
22923  new_path="$path"
22924
22925  windows_path="$new_path"
22926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22927    unix_path=`$CYGPATH -u "$windows_path"`
22928    new_path="$unix_path"
22929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22931    new_path="$unix_path"
22932  fi
22933
22934
22935  # Now try to locate executable using which
22936  new_path=`$WHICH "$new_path" 2> /dev/null`
22937
22938  if test "x$new_path" = x; then
22939    # Oops. Which didn't find the executable.
22940    # The splitting of arguments from the executable at a space might have been incorrect,
22941    # since paths with space are more likely in Windows. Give it another try with the whole
22942    # argument.
22943    path="$complete"
22944    arguments="EOL"
22945    new_path="$path"
22946
22947  windows_path="$new_path"
22948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22949    unix_path=`$CYGPATH -u "$windows_path"`
22950    new_path="$unix_path"
22951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22953    new_path="$unix_path"
22954  fi
22955
22956
22957    new_path=`$WHICH "$new_path" 2> /dev/null`
22958
22959    if test "x$new_path" = x; then
22960      # It's still not found. Now this is an unrecoverable error.
22961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22962$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22963      has_space=`$ECHO "$complete" | $GREP " "`
22964      if test "x$has_space" != x; then
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22967      fi
22968      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22969    fi
22970  fi
22971
22972  # Now new_path has a complete unix path to the binary
22973  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22974    # Keep paths in /bin as-is, but remove trailing .exe if any
22975    new_path="${new_path/%.exe/}"
22976    # Do not save /bin paths to all_fixpath_prefixes!
22977  else
22978    # Not in mixed or Windows style, start by that.
22979    new_path=`cmd //c echo $new_path`
22980
22981  input_path="$new_path"
22982  # Check if we need to convert this using DOS-style short mode. If the path
22983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22984  # take no chances and rewrite it.
22985  # Note: m4 eats our [], so we need to use [ and ] instead.
22986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22987  if test "x$has_forbidden_chars" != x; then
22988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22990  fi
22991
22992    # Output is in $new_path
22993
22994  windows_path="$new_path"
22995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22996    unix_path=`$CYGPATH -u "$windows_path"`
22997    new_path="$unix_path"
22998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23000    new_path="$unix_path"
23001  fi
23002
23003    # remove trailing .exe if any
23004    new_path="${new_path/%.exe/}"
23005
23006    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23007    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23008  fi
23009
23010  else
23011    # We're on a posix platform. Hooray! :)
23012    # First separate the path from the arguments. This will split at the first
23013    # space.
23014    complete="$WINLD"
23015    path="${complete%% *}"
23016    tmp="$complete EOL"
23017    arguments="${tmp#* }"
23018
23019    # Cannot rely on the command "which" here since it doesn't always work.
23020    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23021    if test -z "$is_absolute_path"; then
23022      # Path to executable is not absolute. Find it.
23023      IFS_save="$IFS"
23024      IFS=:
23025      for p in $PATH; do
23026        if test -f "$p/$path" && test -x "$p/$path"; then
23027          new_path="$p/$path"
23028          break
23029        fi
23030      done
23031      IFS="$IFS_save"
23032    else
23033      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23034$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23035      new_path="$path"
23036    fi
23037
23038    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
23044$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
23051      if test "x$arguments" != xEOL; then
23052        new_complete="$new_path ${arguments% *}"
23053      else
23054        new_complete="$new_path"
23055      fi
23056
23057  if test "x$complete" != "x$new_complete"; then
23058      WINLD="$new_complete"
23059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23060$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23061    fi
23062
23063    printf "Windows linker was found at $WINLD\n"
23064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23065$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23066    "$WINLD" --version > /dev/null
23067    if test $? -eq 0 ; then
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23069$as_echo "no" >&6; }
23070      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23071    else
23072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23073$as_echo "yes" >&6; }
23074    fi
23075    LD="$WINLD"
23076    LDEXE="$WINLD"
23077    LDCXX="$WINLD"
23078    LDEXECXX="$WINLD"
23079
23080    # Extract the first word of "mt", so it can be a program name with args.
23081set dummy mt; ac_word=$2
23082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23083$as_echo_n "checking for $ac_word... " >&6; }
23084if test "${ac_cv_prog_MT+set}" = set; then :
23085  $as_echo_n "(cached) " >&6
23086else
23087  if test -n "$MT"; then
23088  ac_cv_prog_MT="$MT" # Let the user override the test.
23089else
23090  ac_prog_rejected=no
23091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23092for as_dir in $PATH
23093do
23094  IFS=$as_save_IFS
23095  test -z "$as_dir" && as_dir=.
23096    for ac_exec_ext in '' $ac_executable_extensions; do
23097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23098    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23099       ac_prog_rejected=yes
23100       continue
23101     fi
23102    ac_cv_prog_MT="mt"
23103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23104    break 2
23105  fi
23106done
23107  done
23108IFS=$as_save_IFS
23109
23110if test $ac_prog_rejected = yes; then
23111  # We found a bogon in the path, so make sure we never use it.
23112  set dummy $ac_cv_prog_MT
23113  shift
23114  if test $# != 0; then
23115    # We chose a different compiler from the bogus one.
23116    # However, it has the same basename, so the bogon will be chosen
23117    # first if we set MT to just the basename; use the full file name.
23118    shift
23119    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23120  fi
23121fi
23122fi
23123fi
23124MT=$ac_cv_prog_MT
23125if test -n "$MT"; then
23126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23127$as_echo "$MT" >&6; }
23128else
23129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23130$as_echo "no" >&6; }
23131fi
23132
23133
23134
23135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23136
23137  # First separate the path from the arguments. This will split at the first
23138  # space.
23139  complete="$MT"
23140  path="${complete%% *}"
23141  tmp="$complete EOL"
23142  arguments="${tmp#* }"
23143
23144  # Input might be given as Windows format, start by converting to
23145  # unix format.
23146  new_path=`$CYGPATH -u "$path"`
23147
23148  # Now try to locate executable using which
23149  new_path=`$WHICH "$new_path" 2> /dev/null`
23150  # bat and cmd files are not always considered executable in cygwin causing which
23151  # to not find them
23152  if test "x$new_path" = x \
23153           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23154           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23155    new_path=`$CYGPATH -u "$path"`
23156  fi
23157  if test "x$new_path" = x; then
23158    # Oops. Which didn't find the executable.
23159    # The splitting of arguments from the executable at a space might have been incorrect,
23160    # since paths with space are more likely in Windows. Give it another try with the whole
23161    # argument.
23162    path="$complete"
23163    arguments="EOL"
23164    new_path=`$CYGPATH -u "$path"`
23165    new_path=`$WHICH "$new_path" 2> /dev/null`
23166    # bat and cmd files are not always considered executable in cygwin causing which
23167    # to not find them
23168    if test "x$new_path" = x \
23169             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23170             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23171      new_path=`$CYGPATH -u "$path"`
23172    fi
23173    if test "x$new_path" = x; then
23174      # It's still not found. Now this is an unrecoverable error.
23175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23176$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23177      has_space=`$ECHO "$complete" | $GREP " "`
23178      if test "x$has_space" != x; then
23179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23181      fi
23182      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23183    fi
23184  fi
23185
23186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23189  # "foo.exe" is OK but "foo" is an error.
23190  #
23191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23192  # It is also a way to make sure we got the proper file name for the real test later on.
23193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23194  if test "x$test_shortpath" = x; then
23195    # Short path failed, file does not exist as specified.
23196    # Try adding .exe or .cmd
23197    if test -f "${new_path}.exe"; then
23198       input_to_shortpath="${new_path}.exe"
23199    elif test -f "${new_path}.cmd"; then
23200       input_to_shortpath="${new_path}.cmd"
23201    else
23202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23203$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23206      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23207    fi
23208  else
23209    input_to_shortpath="$new_path"
23210  fi
23211
23212  # Call helper function which possibly converts this using DOS-style short mode.
23213  # If so, the updated path is stored in $new_path.
23214  new_path="$input_to_shortpath"
23215
23216  input_path="$input_to_shortpath"
23217  # Check if we need to convert this using DOS-style short mode. If the path
23218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23219  # take no chances and rewrite it.
23220  # Note: m4 eats our [], so we need to use [ and ] instead.
23221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23222  if test "x$has_forbidden_chars" != x; then
23223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23227      # Going to short mode and back again did indeed matter. Since short mode is
23228      # case insensitive, let's make it lowercase to improve readability.
23229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23230      # Now convert it back to Unix-stile (cygpath)
23231      input_path=`$CYGPATH -u "$shortmode_path"`
23232      new_path="$input_path"
23233    fi
23234  fi
23235
23236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23237  if test "x$test_cygdrive_prefix" = x; then
23238    # As a simple fix, exclude /usr/bin since it's not a real path.
23239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23241      # a path prefixed by /cygdrive for fixpath to work.
23242      new_path="$CYGWIN_ROOT_PATH$input_path"
23243    fi
23244  fi
23245
23246  # remove trailing .exe if any
23247  new_path="${new_path/%.exe/}"
23248
23249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23250
23251  # First separate the path from the arguments. This will split at the first
23252  # space.
23253  complete="$MT"
23254  path="${complete%% *}"
23255  tmp="$complete EOL"
23256  arguments="${tmp#* }"
23257
23258  # Input might be given as Windows format, start by converting to
23259  # unix format.
23260  new_path="$path"
23261
23262  windows_path="$new_path"
23263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23264    unix_path=`$CYGPATH -u "$windows_path"`
23265    new_path="$unix_path"
23266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23268    new_path="$unix_path"
23269  fi
23270
23271
23272  # Now try to locate executable using which
23273  new_path=`$WHICH "$new_path" 2> /dev/null`
23274
23275  if test "x$new_path" = x; then
23276    # Oops. Which didn't find the executable.
23277    # The splitting of arguments from the executable at a space might have been incorrect,
23278    # since paths with space are more likely in Windows. Give it another try with the whole
23279    # argument.
23280    path="$complete"
23281    arguments="EOL"
23282    new_path="$path"
23283
23284  windows_path="$new_path"
23285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23286    unix_path=`$CYGPATH -u "$windows_path"`
23287    new_path="$unix_path"
23288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23290    new_path="$unix_path"
23291  fi
23292
23293
23294    new_path=`$WHICH "$new_path" 2> /dev/null`
23295
23296    if test "x$new_path" = x; then
23297      # It's still not found. Now this is an unrecoverable error.
23298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23299$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23300      has_space=`$ECHO "$complete" | $GREP " "`
23301      if test "x$has_space" != x; then
23302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23304      fi
23305      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23306    fi
23307  fi
23308
23309  # Now new_path has a complete unix path to the binary
23310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23311    # Keep paths in /bin as-is, but remove trailing .exe if any
23312    new_path="${new_path/%.exe/}"
23313    # Do not save /bin paths to all_fixpath_prefixes!
23314  else
23315    # Not in mixed or Windows style, start by that.
23316    new_path=`cmd //c echo $new_path`
23317
23318  input_path="$new_path"
23319  # Check if we need to convert this using DOS-style short mode. If the path
23320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23321  # take no chances and rewrite it.
23322  # Note: m4 eats our [], so we need to use [ and ] instead.
23323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23324  if test "x$has_forbidden_chars" != x; then
23325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23327  fi
23328
23329    # Output is in $new_path
23330
23331  windows_path="$new_path"
23332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23333    unix_path=`$CYGPATH -u "$windows_path"`
23334    new_path="$unix_path"
23335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23337    new_path="$unix_path"
23338  fi
23339
23340    # remove trailing .exe if any
23341    new_path="${new_path/%.exe/}"
23342
23343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23345  fi
23346
23347  else
23348    # We're on a posix platform. Hooray! :)
23349    # First separate the path from the arguments. This will split at the first
23350    # space.
23351    complete="$MT"
23352    path="${complete%% *}"
23353    tmp="$complete EOL"
23354    arguments="${tmp#* }"
23355
23356    # Cannot rely on the command "which" here since it doesn't always work.
23357    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23358    if test -z "$is_absolute_path"; then
23359      # Path to executable is not absolute. Find it.
23360      IFS_save="$IFS"
23361      IFS=:
23362      for p in $PATH; do
23363        if test -f "$p/$path" && test -x "$p/$path"; then
23364          new_path="$p/$path"
23365          break
23366        fi
23367      done
23368      IFS="$IFS_save"
23369    else
23370      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23371$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23372      new_path="$path"
23373    fi
23374
23375    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
23381$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
23388      if test "x$arguments" != xEOL; then
23389        new_complete="$new_path ${arguments% *}"
23390      else
23391        new_complete="$new_path"
23392      fi
23393
23394  if test "x$complete" != "x$new_complete"; then
23395      MT="$new_complete"
23396      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23397$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23398    fi
23399
23400    # The resource compiler
23401    # Extract the first word of "rc", so it can be a program name with args.
23402set dummy rc; ac_word=$2
23403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23404$as_echo_n "checking for $ac_word... " >&6; }
23405if test "${ac_cv_prog_RC+set}" = set; then :
23406  $as_echo_n "(cached) " >&6
23407else
23408  if test -n "$RC"; then
23409  ac_cv_prog_RC="$RC" # Let the user override the test.
23410else
23411  ac_prog_rejected=no
23412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23413for as_dir in $PATH
23414do
23415  IFS=$as_save_IFS
23416  test -z "$as_dir" && as_dir=.
23417    for ac_exec_ext in '' $ac_executable_extensions; do
23418  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23419    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23420       ac_prog_rejected=yes
23421       continue
23422     fi
23423    ac_cv_prog_RC="rc"
23424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23425    break 2
23426  fi
23427done
23428  done
23429IFS=$as_save_IFS
23430
23431if test $ac_prog_rejected = yes; then
23432  # We found a bogon in the path, so make sure we never use it.
23433  set dummy $ac_cv_prog_RC
23434  shift
23435  if test $# != 0; then
23436    # We chose a different compiler from the bogus one.
23437    # However, it has the same basename, so the bogon will be chosen
23438    # first if we set RC to just the basename; use the full file name.
23439    shift
23440    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23441  fi
23442fi
23443fi
23444fi
23445RC=$ac_cv_prog_RC
23446if test -n "$RC"; then
23447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23448$as_echo "$RC" >&6; }
23449else
23450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23451$as_echo "no" >&6; }
23452fi
23453
23454
23455
23456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23457
23458  # First separate the path from the arguments. This will split at the first
23459  # space.
23460  complete="$RC"
23461  path="${complete%% *}"
23462  tmp="$complete EOL"
23463  arguments="${tmp#* }"
23464
23465  # Input might be given as Windows format, start by converting to
23466  # unix format.
23467  new_path=`$CYGPATH -u "$path"`
23468
23469  # Now try to locate executable using which
23470  new_path=`$WHICH "$new_path" 2> /dev/null`
23471  # bat and cmd files are not always considered executable in cygwin causing which
23472  # to not find them
23473  if test "x$new_path" = x \
23474           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23475           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23476    new_path=`$CYGPATH -u "$path"`
23477  fi
23478  if test "x$new_path" = x; then
23479    # Oops. Which didn't find the executable.
23480    # The splitting of arguments from the executable at a space might have been incorrect,
23481    # since paths with space are more likely in Windows. Give it another try with the whole
23482    # argument.
23483    path="$complete"
23484    arguments="EOL"
23485    new_path=`$CYGPATH -u "$path"`
23486    new_path=`$WHICH "$new_path" 2> /dev/null`
23487    # bat and cmd files are not always considered executable in cygwin causing which
23488    # to not find them
23489    if test "x$new_path" = x \
23490             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23491             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23492      new_path=`$CYGPATH -u "$path"`
23493    fi
23494    if test "x$new_path" = x; then
23495      # It's still not found. Now this is an unrecoverable error.
23496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23497$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23498      has_space=`$ECHO "$complete" | $GREP " "`
23499      if test "x$has_space" != x; then
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23502      fi
23503      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23504    fi
23505  fi
23506
23507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23510  # "foo.exe" is OK but "foo" is an error.
23511  #
23512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23513  # It is also a way to make sure we got the proper file name for the real test later on.
23514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23515  if test "x$test_shortpath" = x; then
23516    # Short path failed, file does not exist as specified.
23517    # Try adding .exe or .cmd
23518    if test -f "${new_path}.exe"; then
23519       input_to_shortpath="${new_path}.exe"
23520    elif test -f "${new_path}.cmd"; then
23521       input_to_shortpath="${new_path}.cmd"
23522    else
23523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23524$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23527      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23528    fi
23529  else
23530    input_to_shortpath="$new_path"
23531  fi
23532
23533  # Call helper function which possibly converts this using DOS-style short mode.
23534  # If so, the updated path is stored in $new_path.
23535  new_path="$input_to_shortpath"
23536
23537  input_path="$input_to_shortpath"
23538  # Check if we need to convert this using DOS-style short mode. If the path
23539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23540  # take no chances and rewrite it.
23541  # Note: m4 eats our [], so we need to use [ and ] instead.
23542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23543  if test "x$has_forbidden_chars" != x; then
23544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23548      # Going to short mode and back again did indeed matter. Since short mode is
23549      # case insensitive, let's make it lowercase to improve readability.
23550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23551      # Now convert it back to Unix-stile (cygpath)
23552      input_path=`$CYGPATH -u "$shortmode_path"`
23553      new_path="$input_path"
23554    fi
23555  fi
23556
23557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23558  if test "x$test_cygdrive_prefix" = x; then
23559    # As a simple fix, exclude /usr/bin since it's not a real path.
23560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23562      # a path prefixed by /cygdrive for fixpath to work.
23563      new_path="$CYGWIN_ROOT_PATH$input_path"
23564    fi
23565  fi
23566
23567  # remove trailing .exe if any
23568  new_path="${new_path/%.exe/}"
23569
23570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23571
23572  # First separate the path from the arguments. This will split at the first
23573  # space.
23574  complete="$RC"
23575  path="${complete%% *}"
23576  tmp="$complete EOL"
23577  arguments="${tmp#* }"
23578
23579  # Input might be given as Windows format, start by converting to
23580  # unix format.
23581  new_path="$path"
23582
23583  windows_path="$new_path"
23584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23585    unix_path=`$CYGPATH -u "$windows_path"`
23586    new_path="$unix_path"
23587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23589    new_path="$unix_path"
23590  fi
23591
23592
23593  # Now try to locate executable using which
23594  new_path=`$WHICH "$new_path" 2> /dev/null`
23595
23596  if test "x$new_path" = x; then
23597    # Oops. Which didn't find the executable.
23598    # The splitting of arguments from the executable at a space might have been incorrect,
23599    # since paths with space are more likely in Windows. Give it another try with the whole
23600    # argument.
23601    path="$complete"
23602    arguments="EOL"
23603    new_path="$path"
23604
23605  windows_path="$new_path"
23606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23607    unix_path=`$CYGPATH -u "$windows_path"`
23608    new_path="$unix_path"
23609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23611    new_path="$unix_path"
23612  fi
23613
23614
23615    new_path=`$WHICH "$new_path" 2> /dev/null`
23616
23617    if test "x$new_path" = x; then
23618      # It's still not found. Now this is an unrecoverable error.
23619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23620$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23621      has_space=`$ECHO "$complete" | $GREP " "`
23622      if test "x$has_space" != x; then
23623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23625      fi
23626      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23627    fi
23628  fi
23629
23630  # Now new_path has a complete unix path to the binary
23631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23632    # Keep paths in /bin as-is, but remove trailing .exe if any
23633    new_path="${new_path/%.exe/}"
23634    # Do not save /bin paths to all_fixpath_prefixes!
23635  else
23636    # Not in mixed or Windows style, start by that.
23637    new_path=`cmd //c echo $new_path`
23638
23639  input_path="$new_path"
23640  # Check if we need to convert this using DOS-style short mode. If the path
23641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23642  # take no chances and rewrite it.
23643  # Note: m4 eats our [], so we need to use [ and ] instead.
23644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23645  if test "x$has_forbidden_chars" != x; then
23646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23648  fi
23649
23650    # Output is in $new_path
23651
23652  windows_path="$new_path"
23653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23654    unix_path=`$CYGPATH -u "$windows_path"`
23655    new_path="$unix_path"
23656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23658    new_path="$unix_path"
23659  fi
23660
23661    # remove trailing .exe if any
23662    new_path="${new_path/%.exe/}"
23663
23664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23666  fi
23667
23668  else
23669    # We're on a posix platform. Hooray! :)
23670    # First separate the path from the arguments. This will split at the first
23671    # space.
23672    complete="$RC"
23673    path="${complete%% *}"
23674    tmp="$complete EOL"
23675    arguments="${tmp#* }"
23676
23677    # Cannot rely on the command "which" here since it doesn't always work.
23678    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23679    if test -z "$is_absolute_path"; then
23680      # Path to executable is not absolute. Find it.
23681      IFS_save="$IFS"
23682      IFS=:
23683      for p in $PATH; do
23684        if test -f "$p/$path" && test -x "$p/$path"; then
23685          new_path="$p/$path"
23686          break
23687        fi
23688      done
23689      IFS="$IFS_save"
23690    else
23691      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23692$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23693      new_path="$path"
23694    fi
23695
23696    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
23702$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
23709      if test "x$arguments" != xEOL; then
23710        new_complete="$new_path ${arguments% *}"
23711      else
23712        new_complete="$new_path"
23713      fi
23714
23715  if test "x$complete" != "x$new_complete"; then
23716      RC="$new_complete"
23717      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23718$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23719    fi
23720
23721
23722    # For hotspot, we need these in Windows mixed path,
23723    # so rewrite them all. Need added .exe suffix.
23724    HOTSPOT_CXX="$CXX.exe"
23725    HOTSPOT_LD="$LD.exe"
23726    HOTSPOT_MT="$MT.exe"
23727    HOTSPOT_RC="$RC.exe"
23728
23729  unix_path="$HOTSPOT_CXX"
23730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23731    windows_path=`$CYGPATH -m "$unix_path"`
23732    HOTSPOT_CXX="$windows_path"
23733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23734    windows_path=`cmd //c echo $unix_path`
23735    HOTSPOT_CXX="$windows_path"
23736  fi
23737
23738
23739  unix_path="$HOTSPOT_LD"
23740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23741    windows_path=`$CYGPATH -m "$unix_path"`
23742    HOTSPOT_LD="$windows_path"
23743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23744    windows_path=`cmd //c echo $unix_path`
23745    HOTSPOT_LD="$windows_path"
23746  fi
23747
23748
23749  unix_path="$HOTSPOT_MT"
23750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751    windows_path=`$CYGPATH -m "$unix_path"`
23752    HOTSPOT_MT="$windows_path"
23753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23754    windows_path=`cmd //c echo $unix_path`
23755    HOTSPOT_MT="$windows_path"
23756  fi
23757
23758
23759  unix_path="$HOTSPOT_RC"
23760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23761    windows_path=`$CYGPATH -m "$unix_path"`
23762    HOTSPOT_RC="$windows_path"
23763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23764    windows_path=`cmd //c echo $unix_path`
23765    HOTSPOT_RC="$windows_path"
23766  fi
23767
23768
23769
23770
23771    RC_FLAGS="-nologo -l 0x409 -r"
23772    if test "x$VARIANT" = xOPT; then :
23773
23774        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23775
23776fi
23777    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23778    if test "x$JDK_UPDATE_VERSION" = x; then :
23779
23780        JDK_UPDATE_VERSION_NOTNULL=0
23781
23782fi
23783    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23784    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23785    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23786    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23787    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23788    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23789    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23790
23791    # lib.exe is used to create static libraries.
23792    # Extract the first word of "lib", so it can be a program name with args.
23793set dummy lib; ac_word=$2
23794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23795$as_echo_n "checking for $ac_word... " >&6; }
23796if test "${ac_cv_prog_WINAR+set}" = set; then :
23797  $as_echo_n "(cached) " >&6
23798else
23799  if test -n "$WINAR"; then
23800  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23801else
23802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23803for as_dir in $PATH
23804do
23805  IFS=$as_save_IFS
23806  test -z "$as_dir" && as_dir=.
23807    for ac_exec_ext in '' $ac_executable_extensions; do
23808  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23809    ac_cv_prog_WINAR="lib"
23810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23811    break 2
23812  fi
23813done
23814  done
23815IFS=$as_save_IFS
23816
23817fi
23818fi
23819WINAR=$ac_cv_prog_WINAR
23820if test -n "$WINAR"; then
23821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23822$as_echo "$WINAR" >&6; }
23823else
23824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23825$as_echo "no" >&6; }
23826fi
23827
23828
23829
23830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23831
23832  # First separate the path from the arguments. This will split at the first
23833  # space.
23834  complete="$WINAR"
23835  path="${complete%% *}"
23836  tmp="$complete EOL"
23837  arguments="${tmp#* }"
23838
23839  # Input might be given as Windows format, start by converting to
23840  # unix format.
23841  new_path=`$CYGPATH -u "$path"`
23842
23843  # Now try to locate executable using which
23844  new_path=`$WHICH "$new_path" 2> /dev/null`
23845  # bat and cmd files are not always considered executable in cygwin causing which
23846  # to not find them
23847  if test "x$new_path" = x \
23848           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23849           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23850    new_path=`$CYGPATH -u "$path"`
23851  fi
23852  if test "x$new_path" = x; then
23853    # Oops. Which didn't find the executable.
23854    # The splitting of arguments from the executable at a space might have been incorrect,
23855    # since paths with space are more likely in Windows. Give it another try with the whole
23856    # argument.
23857    path="$complete"
23858    arguments="EOL"
23859    new_path=`$CYGPATH -u "$path"`
23860    new_path=`$WHICH "$new_path" 2> /dev/null`
23861    # bat and cmd files are not always considered executable in cygwin causing which
23862    # to not find them
23863    if test "x$new_path" = x \
23864             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23865             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23866      new_path=`$CYGPATH -u "$path"`
23867    fi
23868    if test "x$new_path" = x; then
23869      # It's still not found. Now this is an unrecoverable error.
23870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23871$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23872      has_space=`$ECHO "$complete" | $GREP " "`
23873      if test "x$has_space" != x; then
23874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23876      fi
23877      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23878    fi
23879  fi
23880
23881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23884  # "foo.exe" is OK but "foo" is an error.
23885  #
23886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23887  # It is also a way to make sure we got the proper file name for the real test later on.
23888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23889  if test "x$test_shortpath" = x; then
23890    # Short path failed, file does not exist as specified.
23891    # Try adding .exe or .cmd
23892    if test -f "${new_path}.exe"; then
23893       input_to_shortpath="${new_path}.exe"
23894    elif test -f "${new_path}.cmd"; then
23895       input_to_shortpath="${new_path}.cmd"
23896    else
23897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23898$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23901      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23902    fi
23903  else
23904    input_to_shortpath="$new_path"
23905  fi
23906
23907  # Call helper function which possibly converts this using DOS-style short mode.
23908  # If so, the updated path is stored in $new_path.
23909  new_path="$input_to_shortpath"
23910
23911  input_path="$input_to_shortpath"
23912  # Check if we need to convert this using DOS-style short mode. If the path
23913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23914  # take no chances and rewrite it.
23915  # Note: m4 eats our [], so we need to use [ and ] instead.
23916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23917  if test "x$has_forbidden_chars" != x; then
23918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23922      # Going to short mode and back again did indeed matter. Since short mode is
23923      # case insensitive, let's make it lowercase to improve readability.
23924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23925      # Now convert it back to Unix-stile (cygpath)
23926      input_path=`$CYGPATH -u "$shortmode_path"`
23927      new_path="$input_path"
23928    fi
23929  fi
23930
23931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23932  if test "x$test_cygdrive_prefix" = x; then
23933    # As a simple fix, exclude /usr/bin since it's not a real path.
23934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23936      # a path prefixed by /cygdrive for fixpath to work.
23937      new_path="$CYGWIN_ROOT_PATH$input_path"
23938    fi
23939  fi
23940
23941  # remove trailing .exe if any
23942  new_path="${new_path/%.exe/}"
23943
23944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945
23946  # First separate the path from the arguments. This will split at the first
23947  # space.
23948  complete="$WINAR"
23949  path="${complete%% *}"
23950  tmp="$complete EOL"
23951  arguments="${tmp#* }"
23952
23953  # Input might be given as Windows format, start by converting to
23954  # unix format.
23955  new_path="$path"
23956
23957  windows_path="$new_path"
23958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23959    unix_path=`$CYGPATH -u "$windows_path"`
23960    new_path="$unix_path"
23961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23963    new_path="$unix_path"
23964  fi
23965
23966
23967  # Now try to locate executable using which
23968  new_path=`$WHICH "$new_path" 2> /dev/null`
23969
23970  if test "x$new_path" = x; then
23971    # Oops. Which didn't find the executable.
23972    # The splitting of arguments from the executable at a space might have been incorrect,
23973    # since paths with space are more likely in Windows. Give it another try with the whole
23974    # argument.
23975    path="$complete"
23976    arguments="EOL"
23977    new_path="$path"
23978
23979  windows_path="$new_path"
23980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23981    unix_path=`$CYGPATH -u "$windows_path"`
23982    new_path="$unix_path"
23983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23985    new_path="$unix_path"
23986  fi
23987
23988
23989    new_path=`$WHICH "$new_path" 2> /dev/null`
23990
23991    if test "x$new_path" = x; then
23992      # It's still not found. Now this is an unrecoverable error.
23993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23994$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23995      has_space=`$ECHO "$complete" | $GREP " "`
23996      if test "x$has_space" != x; then
23997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23999      fi
24000      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24001    fi
24002  fi
24003
24004  # Now new_path has a complete unix path to the binary
24005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24006    # Keep paths in /bin as-is, but remove trailing .exe if any
24007    new_path="${new_path/%.exe/}"
24008    # Do not save /bin paths to all_fixpath_prefixes!
24009  else
24010    # Not in mixed or Windows style, start by that.
24011    new_path=`cmd //c echo $new_path`
24012
24013  input_path="$new_path"
24014  # Check if we need to convert this using DOS-style short mode. If the path
24015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24016  # take no chances and rewrite it.
24017  # Note: m4 eats our [], so we need to use [ and ] instead.
24018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24019  if test "x$has_forbidden_chars" != x; then
24020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24022  fi
24023
24024    # Output is in $new_path
24025
24026  windows_path="$new_path"
24027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24028    unix_path=`$CYGPATH -u "$windows_path"`
24029    new_path="$unix_path"
24030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24032    new_path="$unix_path"
24033  fi
24034
24035    # remove trailing .exe if any
24036    new_path="${new_path/%.exe/}"
24037
24038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24040  fi
24041
24042  else
24043    # We're on a posix platform. Hooray! :)
24044    # First separate the path from the arguments. This will split at the first
24045    # space.
24046    complete="$WINAR"
24047    path="${complete%% *}"
24048    tmp="$complete EOL"
24049    arguments="${tmp#* }"
24050
24051    # Cannot rely on the command "which" here since it doesn't always work.
24052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24053    if test -z "$is_absolute_path"; then
24054      # Path to executable is not absolute. Find it.
24055      IFS_save="$IFS"
24056      IFS=:
24057      for p in $PATH; do
24058        if test -f "$p/$path" && test -x "$p/$path"; then
24059          new_path="$p/$path"
24060          break
24061        fi
24062      done
24063      IFS="$IFS_save"
24064    else
24065      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24066$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24067      new_path="$path"
24068    fi
24069
24070    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
24076$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
24083      if test "x$arguments" != xEOL; then
24084        new_complete="$new_path ${arguments% *}"
24085      else
24086        new_complete="$new_path"
24087      fi
24088
24089  if test "x$complete" != "x$new_complete"; then
24090      WINAR="$new_complete"
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24092$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24093    fi
24094
24095    AR="$WINAR"
24096    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24097
24098    # Extract the first word of "dumpbin", so it can be a program name with args.
24099set dummy dumpbin; ac_word=$2
24100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24101$as_echo_n "checking for $ac_word... " >&6; }
24102if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24103  $as_echo_n "(cached) " >&6
24104else
24105  if test -n "$DUMPBIN"; then
24106  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24107else
24108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24109for as_dir in $PATH
24110do
24111  IFS=$as_save_IFS
24112  test -z "$as_dir" && as_dir=.
24113    for ac_exec_ext in '' $ac_executable_extensions; do
24114  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24115    ac_cv_prog_DUMPBIN="dumpbin"
24116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24117    break 2
24118  fi
24119done
24120  done
24121IFS=$as_save_IFS
24122
24123fi
24124fi
24125DUMPBIN=$ac_cv_prog_DUMPBIN
24126if test -n "$DUMPBIN"; then
24127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24128$as_echo "$DUMPBIN" >&6; }
24129else
24130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24131$as_echo "no" >&6; }
24132fi
24133
24134
24135
24136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24137
24138  # First separate the path from the arguments. This will split at the first
24139  # space.
24140  complete="$DUMPBIN"
24141  path="${complete%% *}"
24142  tmp="$complete EOL"
24143  arguments="${tmp#* }"
24144
24145  # Input might be given as Windows format, start by converting to
24146  # unix format.
24147  new_path=`$CYGPATH -u "$path"`
24148
24149  # Now try to locate executable using which
24150  new_path=`$WHICH "$new_path" 2> /dev/null`
24151  # bat and cmd files are not always considered executable in cygwin causing which
24152  # to not find them
24153  if test "x$new_path" = x \
24154           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24155           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24156    new_path=`$CYGPATH -u "$path"`
24157  fi
24158  if test "x$new_path" = x; then
24159    # Oops. Which didn't find the executable.
24160    # The splitting of arguments from the executable at a space might have been incorrect,
24161    # since paths with space are more likely in Windows. Give it another try with the whole
24162    # argument.
24163    path="$complete"
24164    arguments="EOL"
24165    new_path=`$CYGPATH -u "$path"`
24166    new_path=`$WHICH "$new_path" 2> /dev/null`
24167    # bat and cmd files are not always considered executable in cygwin causing which
24168    # to not find them
24169    if test "x$new_path" = x \
24170             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24171             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24172      new_path=`$CYGPATH -u "$path"`
24173    fi
24174    if test "x$new_path" = x; then
24175      # It's still not found. Now this is an unrecoverable error.
24176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24177$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24178      has_space=`$ECHO "$complete" | $GREP " "`
24179      if test "x$has_space" != x; then
24180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24182      fi
24183      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24184    fi
24185  fi
24186
24187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24190  # "foo.exe" is OK but "foo" is an error.
24191  #
24192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24193  # It is also a way to make sure we got the proper file name for the real test later on.
24194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24195  if test "x$test_shortpath" = x; then
24196    # Short path failed, file does not exist as specified.
24197    # Try adding .exe or .cmd
24198    if test -f "${new_path}.exe"; then
24199       input_to_shortpath="${new_path}.exe"
24200    elif test -f "${new_path}.cmd"; then
24201       input_to_shortpath="${new_path}.cmd"
24202    else
24203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24204$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24205      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24206$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24207      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24208    fi
24209  else
24210    input_to_shortpath="$new_path"
24211  fi
24212
24213  # Call helper function which possibly converts this using DOS-style short mode.
24214  # If so, the updated path is stored in $new_path.
24215  new_path="$input_to_shortpath"
24216
24217  input_path="$input_to_shortpath"
24218  # Check if we need to convert this using DOS-style short mode. If the path
24219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24220  # take no chances and rewrite it.
24221  # Note: m4 eats our [], so we need to use [ and ] instead.
24222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24223  if test "x$has_forbidden_chars" != x; then
24224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24228      # Going to short mode and back again did indeed matter. Since short mode is
24229      # case insensitive, let's make it lowercase to improve readability.
24230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231      # Now convert it back to Unix-stile (cygpath)
24232      input_path=`$CYGPATH -u "$shortmode_path"`
24233      new_path="$input_path"
24234    fi
24235  fi
24236
24237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24238  if test "x$test_cygdrive_prefix" = x; then
24239    # As a simple fix, exclude /usr/bin since it's not a real path.
24240    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24242      # a path prefixed by /cygdrive for fixpath to work.
24243      new_path="$CYGWIN_ROOT_PATH$input_path"
24244    fi
24245  fi
24246
24247  # remove trailing .exe if any
24248  new_path="${new_path/%.exe/}"
24249
24250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24251
24252  # First separate the path from the arguments. This will split at the first
24253  # space.
24254  complete="$DUMPBIN"
24255  path="${complete%% *}"
24256  tmp="$complete EOL"
24257  arguments="${tmp#* }"
24258
24259  # Input might be given as Windows format, start by converting to
24260  # unix format.
24261  new_path="$path"
24262
24263  windows_path="$new_path"
24264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24265    unix_path=`$CYGPATH -u "$windows_path"`
24266    new_path="$unix_path"
24267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24269    new_path="$unix_path"
24270  fi
24271
24272
24273  # Now try to locate executable using which
24274  new_path=`$WHICH "$new_path" 2> /dev/null`
24275
24276  if test "x$new_path" = x; then
24277    # Oops. Which didn't find the executable.
24278    # The splitting of arguments from the executable at a space might have been incorrect,
24279    # since paths with space are more likely in Windows. Give it another try with the whole
24280    # argument.
24281    path="$complete"
24282    arguments="EOL"
24283    new_path="$path"
24284
24285  windows_path="$new_path"
24286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24287    unix_path=`$CYGPATH -u "$windows_path"`
24288    new_path="$unix_path"
24289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24291    new_path="$unix_path"
24292  fi
24293
24294
24295    new_path=`$WHICH "$new_path" 2> /dev/null`
24296
24297    if test "x$new_path" = x; then
24298      # It's still not found. Now this is an unrecoverable error.
24299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24300$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24301      has_space=`$ECHO "$complete" | $GREP " "`
24302      if test "x$has_space" != x; then
24303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24305      fi
24306      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24307    fi
24308  fi
24309
24310  # Now new_path has a complete unix path to the binary
24311  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24312    # Keep paths in /bin as-is, but remove trailing .exe if any
24313    new_path="${new_path/%.exe/}"
24314    # Do not save /bin paths to all_fixpath_prefixes!
24315  else
24316    # Not in mixed or Windows style, start by that.
24317    new_path=`cmd //c echo $new_path`
24318
24319  input_path="$new_path"
24320  # Check if we need to convert this using DOS-style short mode. If the path
24321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24322  # take no chances and rewrite it.
24323  # Note: m4 eats our [], so we need to use [ and ] instead.
24324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24325  if test "x$has_forbidden_chars" != x; then
24326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24328  fi
24329
24330    # Output is in $new_path
24331
24332  windows_path="$new_path"
24333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24334    unix_path=`$CYGPATH -u "$windows_path"`
24335    new_path="$unix_path"
24336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24338    new_path="$unix_path"
24339  fi
24340
24341    # remove trailing .exe if any
24342    new_path="${new_path/%.exe/}"
24343
24344    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24345    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24346  fi
24347
24348  else
24349    # We're on a posix platform. Hooray! :)
24350    # First separate the path from the arguments. This will split at the first
24351    # space.
24352    complete="$DUMPBIN"
24353    path="${complete%% *}"
24354    tmp="$complete EOL"
24355    arguments="${tmp#* }"
24356
24357    # Cannot rely on the command "which" here since it doesn't always work.
24358    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24359    if test -z "$is_absolute_path"; then
24360      # Path to executable is not absolute. Find it.
24361      IFS_save="$IFS"
24362      IFS=:
24363      for p in $PATH; do
24364        if test -f "$p/$path" && test -x "$p/$path"; then
24365          new_path="$p/$path"
24366          break
24367        fi
24368      done
24369      IFS="$IFS_save"
24370    else
24371      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24372$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24373      new_path="$path"
24374    fi
24375
24376    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
24382$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
24389      if test "x$arguments" != xEOL; then
24390        new_complete="$new_path ${arguments% *}"
24391      else
24392        new_complete="$new_path"
24393      fi
24394
24395  if test "x$complete" != "x$new_complete"; then
24396      DUMPBIN="$new_complete"
24397      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24398$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24399    fi
24400
24401
24402    COMPILER_TYPE=CL
24403    CCXXFLAGS="$CCXXFLAGS -nologo"
24404
24405fi
24406
24407
24408
24409ac_ext=c
24410ac_cpp='$CPP $CPPFLAGS'
24411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24413ac_compiler_gnu=$ac_cv_c_compiler_gnu
24414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24415$as_echo_n "checking how to run the C preprocessor... " >&6; }
24416# On Suns, sometimes $CPP names a directory.
24417if test -n "$CPP" && test -d "$CPP"; then
24418  CPP=
24419fi
24420if test -z "$CPP"; then
24421  if test "${ac_cv_prog_CPP+set}" = set; then :
24422  $as_echo_n "(cached) " >&6
24423else
24424      # Double quotes because CPP needs to be expanded
24425    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24426    do
24427      ac_preproc_ok=false
24428for ac_c_preproc_warn_flag in '' yes
24429do
24430  # Use a header file that comes with gcc, so configuring glibc
24431  # with a fresh cross-compiler works.
24432  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24433  # <limits.h> exists even on freestanding compilers.
24434  # On the NeXT, cc -E runs the code through the compiler's parser,
24435  # not just through cpp. "Syntax error" is here to catch this case.
24436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24437/* end confdefs.h.  */
24438#ifdef __STDC__
24439# include <limits.h>
24440#else
24441# include <assert.h>
24442#endif
24443		     Syntax error
24444_ACEOF
24445if ac_fn_c_try_cpp "$LINENO"; then :
24446
24447else
24448  # Broken: fails on valid input.
24449continue
24450fi
24451rm -f conftest.err conftest.i conftest.$ac_ext
24452
24453  # OK, works on sane cases.  Now check whether nonexistent headers
24454  # can be detected and how.
24455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24456/* end confdefs.h.  */
24457#include <ac_nonexistent.h>
24458_ACEOF
24459if ac_fn_c_try_cpp "$LINENO"; then :
24460  # Broken: success on invalid input.
24461continue
24462else
24463  # Passes both tests.
24464ac_preproc_ok=:
24465break
24466fi
24467rm -f conftest.err conftest.i conftest.$ac_ext
24468
24469done
24470# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24471rm -f conftest.i conftest.err conftest.$ac_ext
24472if $ac_preproc_ok; then :
24473  break
24474fi
24475
24476    done
24477    ac_cv_prog_CPP=$CPP
24478
24479fi
24480  CPP=$ac_cv_prog_CPP
24481else
24482  ac_cv_prog_CPP=$CPP
24483fi
24484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24485$as_echo "$CPP" >&6; }
24486ac_preproc_ok=false
24487for ac_c_preproc_warn_flag in '' yes
24488do
24489  # Use a header file that comes with gcc, so configuring glibc
24490  # with a fresh cross-compiler works.
24491  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24492  # <limits.h> exists even on freestanding compilers.
24493  # On the NeXT, cc -E runs the code through the compiler's parser,
24494  # not just through cpp. "Syntax error" is here to catch this case.
24495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24496/* end confdefs.h.  */
24497#ifdef __STDC__
24498# include <limits.h>
24499#else
24500# include <assert.h>
24501#endif
24502		     Syntax error
24503_ACEOF
24504if ac_fn_c_try_cpp "$LINENO"; then :
24505
24506else
24507  # Broken: fails on valid input.
24508continue
24509fi
24510rm -f conftest.err conftest.i conftest.$ac_ext
24511
24512  # OK, works on sane cases.  Now check whether nonexistent headers
24513  # can be detected and how.
24514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24515/* end confdefs.h.  */
24516#include <ac_nonexistent.h>
24517_ACEOF
24518if ac_fn_c_try_cpp "$LINENO"; then :
24519  # Broken: success on invalid input.
24520continue
24521else
24522  # Passes both tests.
24523ac_preproc_ok=:
24524break
24525fi
24526rm -f conftest.err conftest.i conftest.$ac_ext
24527
24528done
24529# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24530rm -f conftest.i conftest.err conftest.$ac_ext
24531if $ac_preproc_ok; then :
24532
24533else
24534  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24536as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24537See \`config.log' for more details" "$LINENO" 5; }
24538fi
24539
24540ac_ext=cpp
24541ac_cpp='$CXXCPP $CPPFLAGS'
24542ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24543ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24544ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24545
24546
24547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24548
24549  # First separate the path from the arguments. This will split at the first
24550  # space.
24551  complete="$CPP"
24552  path="${complete%% *}"
24553  tmp="$complete EOL"
24554  arguments="${tmp#* }"
24555
24556  # Input might be given as Windows format, start by converting to
24557  # unix format.
24558  new_path=`$CYGPATH -u "$path"`
24559
24560  # Now try to locate executable using which
24561  new_path=`$WHICH "$new_path" 2> /dev/null`
24562  # bat and cmd files are not always considered executable in cygwin causing which
24563  # to not find them
24564  if test "x$new_path" = x \
24565           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24566           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24567    new_path=`$CYGPATH -u "$path"`
24568  fi
24569  if test "x$new_path" = x; then
24570    # Oops. Which didn't find the executable.
24571    # The splitting of arguments from the executable at a space might have been incorrect,
24572    # since paths with space are more likely in Windows. Give it another try with the whole
24573    # argument.
24574    path="$complete"
24575    arguments="EOL"
24576    new_path=`$CYGPATH -u "$path"`
24577    new_path=`$WHICH "$new_path" 2> /dev/null`
24578    # bat and cmd files are not always considered executable in cygwin causing which
24579    # to not find them
24580    if test "x$new_path" = x \
24581             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24582             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24583      new_path=`$CYGPATH -u "$path"`
24584    fi
24585    if test "x$new_path" = x; then
24586      # It's still not found. Now this is an unrecoverable error.
24587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24588$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24589      has_space=`$ECHO "$complete" | $GREP " "`
24590      if test "x$has_space" != x; then
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24593      fi
24594      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24595    fi
24596  fi
24597
24598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24601  # "foo.exe" is OK but "foo" is an error.
24602  #
24603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24604  # It is also a way to make sure we got the proper file name for the real test later on.
24605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24606  if test "x$test_shortpath" = x; then
24607    # Short path failed, file does not exist as specified.
24608    # Try adding .exe or .cmd
24609    if test -f "${new_path}.exe"; then
24610       input_to_shortpath="${new_path}.exe"
24611    elif test -f "${new_path}.cmd"; then
24612       input_to_shortpath="${new_path}.cmd"
24613    else
24614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24615$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24616      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24618      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24619    fi
24620  else
24621    input_to_shortpath="$new_path"
24622  fi
24623
24624  # Call helper function which possibly converts this using DOS-style short mode.
24625  # If so, the updated path is stored in $new_path.
24626  new_path="$input_to_shortpath"
24627
24628  input_path="$input_to_shortpath"
24629  # Check if we need to convert this using DOS-style short mode. If the path
24630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24631  # take no chances and rewrite it.
24632  # Note: m4 eats our [], so we need to use [ and ] instead.
24633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24634  if test "x$has_forbidden_chars" != x; then
24635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24639      # Going to short mode and back again did indeed matter. Since short mode is
24640      # case insensitive, let's make it lowercase to improve readability.
24641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24642      # Now convert it back to Unix-stile (cygpath)
24643      input_path=`$CYGPATH -u "$shortmode_path"`
24644      new_path="$input_path"
24645    fi
24646  fi
24647
24648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24649  if test "x$test_cygdrive_prefix" = x; then
24650    # As a simple fix, exclude /usr/bin since it's not a real path.
24651    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24653      # a path prefixed by /cygdrive for fixpath to work.
24654      new_path="$CYGWIN_ROOT_PATH$input_path"
24655    fi
24656  fi
24657
24658  # remove trailing .exe if any
24659  new_path="${new_path/%.exe/}"
24660
24661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24662
24663  # First separate the path from the arguments. This will split at the first
24664  # space.
24665  complete="$CPP"
24666  path="${complete%% *}"
24667  tmp="$complete EOL"
24668  arguments="${tmp#* }"
24669
24670  # Input might be given as Windows format, start by converting to
24671  # unix format.
24672  new_path="$path"
24673
24674  windows_path="$new_path"
24675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24676    unix_path=`$CYGPATH -u "$windows_path"`
24677    new_path="$unix_path"
24678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24680    new_path="$unix_path"
24681  fi
24682
24683
24684  # Now try to locate executable using which
24685  new_path=`$WHICH "$new_path" 2> /dev/null`
24686
24687  if test "x$new_path" = x; then
24688    # Oops. Which didn't find the executable.
24689    # The splitting of arguments from the executable at a space might have been incorrect,
24690    # since paths with space are more likely in Windows. Give it another try with the whole
24691    # argument.
24692    path="$complete"
24693    arguments="EOL"
24694    new_path="$path"
24695
24696  windows_path="$new_path"
24697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24698    unix_path=`$CYGPATH -u "$windows_path"`
24699    new_path="$unix_path"
24700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24702    new_path="$unix_path"
24703  fi
24704
24705
24706    new_path=`$WHICH "$new_path" 2> /dev/null`
24707
24708    if test "x$new_path" = x; then
24709      # It's still not found. Now this is an unrecoverable error.
24710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24711$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24712      has_space=`$ECHO "$complete" | $GREP " "`
24713      if test "x$has_space" != x; then
24714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24716      fi
24717      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24718    fi
24719  fi
24720
24721  # Now new_path has a complete unix path to the binary
24722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24723    # Keep paths in /bin as-is, but remove trailing .exe if any
24724    new_path="${new_path/%.exe/}"
24725    # Do not save /bin paths to all_fixpath_prefixes!
24726  else
24727    # Not in mixed or Windows style, start by that.
24728    new_path=`cmd //c echo $new_path`
24729
24730  input_path="$new_path"
24731  # Check if we need to convert this using DOS-style short mode. If the path
24732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733  # take no chances and rewrite it.
24734  # Note: m4 eats our [], so we need to use [ and ] instead.
24735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24736  if test "x$has_forbidden_chars" != x; then
24737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24739  fi
24740
24741    # Output is in $new_path
24742
24743  windows_path="$new_path"
24744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24745    unix_path=`$CYGPATH -u "$windows_path"`
24746    new_path="$unix_path"
24747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24749    new_path="$unix_path"
24750  fi
24751
24752    # remove trailing .exe if any
24753    new_path="${new_path/%.exe/}"
24754
24755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24757  fi
24758
24759  else
24760    # We're on a posix platform. Hooray! :)
24761    # First separate the path from the arguments. This will split at the first
24762    # space.
24763    complete="$CPP"
24764    path="${complete%% *}"
24765    tmp="$complete EOL"
24766    arguments="${tmp#* }"
24767
24768    # Cannot rely on the command "which" here since it doesn't always work.
24769    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24770    if test -z "$is_absolute_path"; then
24771      # Path to executable is not absolute. Find it.
24772      IFS_save="$IFS"
24773      IFS=:
24774      for p in $PATH; do
24775        if test -f "$p/$path" && test -x "$p/$path"; then
24776          new_path="$p/$path"
24777          break
24778        fi
24779      done
24780      IFS="$IFS_save"
24781    else
24782      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24783$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24784      new_path="$path"
24785    fi
24786
24787    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
24793$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
24800      if test "x$arguments" != xEOL; then
24801        new_complete="$new_path ${arguments% *}"
24802      else
24803        new_complete="$new_path"
24804      fi
24805
24806  if test "x$complete" != "x$new_complete"; then
24807      CPP="$new_complete"
24808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24809$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24810    fi
24811
24812
24813ac_ext=cpp
24814ac_cpp='$CXXCPP $CPPFLAGS'
24815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24819$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24820if test -z "$CXXCPP"; then
24821  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24822  $as_echo_n "(cached) " >&6
24823else
24824      # Double quotes because CXXCPP needs to be expanded
24825    for CXXCPP in "$CXX -E" "/lib/cpp"
24826    do
24827      ac_preproc_ok=false
24828for ac_cxx_preproc_warn_flag in '' yes
24829do
24830  # Use a header file that comes with gcc, so configuring glibc
24831  # with a fresh cross-compiler works.
24832  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24833  # <limits.h> exists even on freestanding compilers.
24834  # On the NeXT, cc -E runs the code through the compiler's parser,
24835  # not just through cpp. "Syntax error" is here to catch this case.
24836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24837/* end confdefs.h.  */
24838#ifdef __STDC__
24839# include <limits.h>
24840#else
24841# include <assert.h>
24842#endif
24843		     Syntax error
24844_ACEOF
24845if ac_fn_cxx_try_cpp "$LINENO"; then :
24846
24847else
24848  # Broken: fails on valid input.
24849continue
24850fi
24851rm -f conftest.err conftest.i conftest.$ac_ext
24852
24853  # OK, works on sane cases.  Now check whether nonexistent headers
24854  # can be detected and how.
24855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24856/* end confdefs.h.  */
24857#include <ac_nonexistent.h>
24858_ACEOF
24859if ac_fn_cxx_try_cpp "$LINENO"; then :
24860  # Broken: success on invalid input.
24861continue
24862else
24863  # Passes both tests.
24864ac_preproc_ok=:
24865break
24866fi
24867rm -f conftest.err conftest.i conftest.$ac_ext
24868
24869done
24870# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24871rm -f conftest.i conftest.err conftest.$ac_ext
24872if $ac_preproc_ok; then :
24873  break
24874fi
24875
24876    done
24877    ac_cv_prog_CXXCPP=$CXXCPP
24878
24879fi
24880  CXXCPP=$ac_cv_prog_CXXCPP
24881else
24882  ac_cv_prog_CXXCPP=$CXXCPP
24883fi
24884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24885$as_echo "$CXXCPP" >&6; }
24886ac_preproc_ok=false
24887for ac_cxx_preproc_warn_flag in '' yes
24888do
24889  # Use a header file that comes with gcc, so configuring glibc
24890  # with a fresh cross-compiler works.
24891  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24892  # <limits.h> exists even on freestanding compilers.
24893  # On the NeXT, cc -E runs the code through the compiler's parser,
24894  # not just through cpp. "Syntax error" is here to catch this case.
24895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24896/* end confdefs.h.  */
24897#ifdef __STDC__
24898# include <limits.h>
24899#else
24900# include <assert.h>
24901#endif
24902		     Syntax error
24903_ACEOF
24904if ac_fn_cxx_try_cpp "$LINENO"; then :
24905
24906else
24907  # Broken: fails on valid input.
24908continue
24909fi
24910rm -f conftest.err conftest.i conftest.$ac_ext
24911
24912  # OK, works on sane cases.  Now check whether nonexistent headers
24913  # can be detected and how.
24914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24915/* end confdefs.h.  */
24916#include <ac_nonexistent.h>
24917_ACEOF
24918if ac_fn_cxx_try_cpp "$LINENO"; then :
24919  # Broken: success on invalid input.
24920continue
24921else
24922  # Passes both tests.
24923ac_preproc_ok=:
24924break
24925fi
24926rm -f conftest.err conftest.i conftest.$ac_ext
24927
24928done
24929# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24930rm -f conftest.i conftest.err conftest.$ac_ext
24931if $ac_preproc_ok; then :
24932
24933else
24934  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24936as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24937See \`config.log' for more details" "$LINENO" 5; }
24938fi
24939
24940ac_ext=cpp
24941ac_cpp='$CXXCPP $CPPFLAGS'
24942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24945
24946
24947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24948
24949  # First separate the path from the arguments. This will split at the first
24950  # space.
24951  complete="$CXXCPP"
24952  path="${complete%% *}"
24953  tmp="$complete EOL"
24954  arguments="${tmp#* }"
24955
24956  # Input might be given as Windows format, start by converting to
24957  # unix format.
24958  new_path=`$CYGPATH -u "$path"`
24959
24960  # Now try to locate executable using which
24961  new_path=`$WHICH "$new_path" 2> /dev/null`
24962  # bat and cmd files are not always considered executable in cygwin causing which
24963  # to not find them
24964  if test "x$new_path" = x \
24965           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24966           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24967    new_path=`$CYGPATH -u "$path"`
24968  fi
24969  if test "x$new_path" = x; then
24970    # Oops. Which didn't find the executable.
24971    # The splitting of arguments from the executable at a space might have been incorrect,
24972    # since paths with space are more likely in Windows. Give it another try with the whole
24973    # argument.
24974    path="$complete"
24975    arguments="EOL"
24976    new_path=`$CYGPATH -u "$path"`
24977    new_path=`$WHICH "$new_path" 2> /dev/null`
24978    # bat and cmd files are not always considered executable in cygwin causing which
24979    # to not find them
24980    if test "x$new_path" = x \
24981             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24982             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24983      new_path=`$CYGPATH -u "$path"`
24984    fi
24985    if test "x$new_path" = x; then
24986      # It's still not found. Now this is an unrecoverable error.
24987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24988$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24989      has_space=`$ECHO "$complete" | $GREP " "`
24990      if test "x$has_space" != x; then
24991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24993      fi
24994      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24995    fi
24996  fi
24997
24998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25001  # "foo.exe" is OK but "foo" is an error.
25002  #
25003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25004  # It is also a way to make sure we got the proper file name for the real test later on.
25005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25006  if test "x$test_shortpath" = x; then
25007    # Short path failed, file does not exist as specified.
25008    # Try adding .exe or .cmd
25009    if test -f "${new_path}.exe"; then
25010       input_to_shortpath="${new_path}.exe"
25011    elif test -f "${new_path}.cmd"; then
25012       input_to_shortpath="${new_path}.cmd"
25013    else
25014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25015$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25018      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25019    fi
25020  else
25021    input_to_shortpath="$new_path"
25022  fi
25023
25024  # Call helper function which possibly converts this using DOS-style short mode.
25025  # If so, the updated path is stored in $new_path.
25026  new_path="$input_to_shortpath"
25027
25028  input_path="$input_to_shortpath"
25029  # Check if we need to convert this using DOS-style short mode. If the path
25030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25031  # take no chances and rewrite it.
25032  # Note: m4 eats our [], so we need to use [ and ] instead.
25033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25034  if test "x$has_forbidden_chars" != x; then
25035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25039      # Going to short mode and back again did indeed matter. Since short mode is
25040      # case insensitive, let's make it lowercase to improve readability.
25041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25042      # Now convert it back to Unix-stile (cygpath)
25043      input_path=`$CYGPATH -u "$shortmode_path"`
25044      new_path="$input_path"
25045    fi
25046  fi
25047
25048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25049  if test "x$test_cygdrive_prefix" = x; then
25050    # As a simple fix, exclude /usr/bin since it's not a real path.
25051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25053      # a path prefixed by /cygdrive for fixpath to work.
25054      new_path="$CYGWIN_ROOT_PATH$input_path"
25055    fi
25056  fi
25057
25058  # remove trailing .exe if any
25059  new_path="${new_path/%.exe/}"
25060
25061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25062
25063  # First separate the path from the arguments. This will split at the first
25064  # space.
25065  complete="$CXXCPP"
25066  path="${complete%% *}"
25067  tmp="$complete EOL"
25068  arguments="${tmp#* }"
25069
25070  # Input might be given as Windows format, start by converting to
25071  # unix format.
25072  new_path="$path"
25073
25074  windows_path="$new_path"
25075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25076    unix_path=`$CYGPATH -u "$windows_path"`
25077    new_path="$unix_path"
25078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25080    new_path="$unix_path"
25081  fi
25082
25083
25084  # Now try to locate executable using which
25085  new_path=`$WHICH "$new_path" 2> /dev/null`
25086
25087  if test "x$new_path" = x; then
25088    # Oops. Which didn't find the executable.
25089    # The splitting of arguments from the executable at a space might have been incorrect,
25090    # since paths with space are more likely in Windows. Give it another try with the whole
25091    # argument.
25092    path="$complete"
25093    arguments="EOL"
25094    new_path="$path"
25095
25096  windows_path="$new_path"
25097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25098    unix_path=`$CYGPATH -u "$windows_path"`
25099    new_path="$unix_path"
25100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25102    new_path="$unix_path"
25103  fi
25104
25105
25106    new_path=`$WHICH "$new_path" 2> /dev/null`
25107
25108    if test "x$new_path" = x; then
25109      # It's still not found. Now this is an unrecoverable error.
25110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25111$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25112      has_space=`$ECHO "$complete" | $GREP " "`
25113      if test "x$has_space" != x; then
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25116      fi
25117      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25118    fi
25119  fi
25120
25121  # Now new_path has a complete unix path to the binary
25122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25123    # Keep paths in /bin as-is, but remove trailing .exe if any
25124    new_path="${new_path/%.exe/}"
25125    # Do not save /bin paths to all_fixpath_prefixes!
25126  else
25127    # Not in mixed or Windows style, start by that.
25128    new_path=`cmd //c echo $new_path`
25129
25130  input_path="$new_path"
25131  # Check if we need to convert this using DOS-style short mode. If the path
25132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25133  # take no chances and rewrite it.
25134  # Note: m4 eats our [], so we need to use [ and ] instead.
25135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25136  if test "x$has_forbidden_chars" != x; then
25137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25139  fi
25140
25141    # Output is in $new_path
25142
25143  windows_path="$new_path"
25144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25145    unix_path=`$CYGPATH -u "$windows_path"`
25146    new_path="$unix_path"
25147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25149    new_path="$unix_path"
25150  fi
25151
25152    # remove trailing .exe if any
25153    new_path="${new_path/%.exe/}"
25154
25155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25157  fi
25158
25159  else
25160    # We're on a posix platform. Hooray! :)
25161    # First separate the path from the arguments. This will split at the first
25162    # space.
25163    complete="$CXXCPP"
25164    path="${complete%% *}"
25165    tmp="$complete EOL"
25166    arguments="${tmp#* }"
25167
25168    # Cannot rely on the command "which" here since it doesn't always work.
25169    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25170    if test -z "$is_absolute_path"; then
25171      # Path to executable is not absolute. Find it.
25172      IFS_save="$IFS"
25173      IFS=:
25174      for p in $PATH; do
25175        if test -f "$p/$path" && test -x "$p/$path"; then
25176          new_path="$p/$path"
25177          break
25178        fi
25179      done
25180      IFS="$IFS_save"
25181    else
25182      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25183$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25184      new_path="$path"
25185    fi
25186
25187    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
25193$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
25200      if test "x$arguments" != xEOL; then
25201        new_complete="$new_path ${arguments% *}"
25202      else
25203        new_complete="$new_path"
25204      fi
25205
25206  if test "x$complete" != "x$new_complete"; then
25207      CXXCPP="$new_complete"
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25209$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25210    fi
25211
25212
25213if test "x$COMPILE_TYPE" != "xcross"; then
25214    # If we are not cross compiling, use the same compilers for
25215    # building the build platform executables. The cross-compilation
25216    # case needed to be done earlier, but this can only be done after
25217    # the native tools have been localized.
25218    BUILD_CC="$CC"
25219    BUILD_CXX="$CXX"
25220    BUILD_LD="$LD"
25221fi
25222
25223# for solaris we really need solaris tools, and not gnu equivalent
25224#   these seems to normally reside in /usr/ccs/bin so add that to path before
25225#   starting to probe
25226#
25227#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25228#         so that it can be overriden --with-tools-dir
25229if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25230    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25231fi
25232
25233# Find the right assembler.
25234if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25235    # Extract the first word of "as", so it can be a program name with args.
25236set dummy as; ac_word=$2
25237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25238$as_echo_n "checking for $ac_word... " >&6; }
25239if test "${ac_cv_path_AS+set}" = set; then :
25240  $as_echo_n "(cached) " >&6
25241else
25242  case $AS in
25243  [\\/]* | ?:[\\/]*)
25244  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25245  ;;
25246  *)
25247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25248for as_dir in $PATH
25249do
25250  IFS=$as_save_IFS
25251  test -z "$as_dir" && as_dir=.
25252    for ac_exec_ext in '' $ac_executable_extensions; do
25253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25254    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25256    break 2
25257  fi
25258done
25259  done
25260IFS=$as_save_IFS
25261
25262  ;;
25263esac
25264fi
25265AS=$ac_cv_path_AS
25266if test -n "$AS"; then
25267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25268$as_echo "$AS" >&6; }
25269else
25270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25271$as_echo "no" >&6; }
25272fi
25273
25274
25275
25276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277
25278  # First separate the path from the arguments. This will split at the first
25279  # space.
25280  complete="$AS"
25281  path="${complete%% *}"
25282  tmp="$complete EOL"
25283  arguments="${tmp#* }"
25284
25285  # Input might be given as Windows format, start by converting to
25286  # unix format.
25287  new_path=`$CYGPATH -u "$path"`
25288
25289  # Now try to locate executable using which
25290  new_path=`$WHICH "$new_path" 2> /dev/null`
25291  # bat and cmd files are not always considered executable in cygwin causing which
25292  # to not find them
25293  if test "x$new_path" = x \
25294           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25295           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25296    new_path=`$CYGPATH -u "$path"`
25297  fi
25298  if test "x$new_path" = x; then
25299    # Oops. Which didn't find the executable.
25300    # The splitting of arguments from the executable at a space might have been incorrect,
25301    # since paths with space are more likely in Windows. Give it another try with the whole
25302    # argument.
25303    path="$complete"
25304    arguments="EOL"
25305    new_path=`$CYGPATH -u "$path"`
25306    new_path=`$WHICH "$new_path" 2> /dev/null`
25307    # bat and cmd files are not always considered executable in cygwin causing which
25308    # to not find them
25309    if test "x$new_path" = x \
25310             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25311             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25312      new_path=`$CYGPATH -u "$path"`
25313    fi
25314    if test "x$new_path" = x; then
25315      # It's still not found. Now this is an unrecoverable error.
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25317$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25318      has_space=`$ECHO "$complete" | $GREP " "`
25319      if test "x$has_space" != x; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25322      fi
25323      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25324    fi
25325  fi
25326
25327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25330  # "foo.exe" is OK but "foo" is an error.
25331  #
25332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25333  # It is also a way to make sure we got the proper file name for the real test later on.
25334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25335  if test "x$test_shortpath" = x; then
25336    # Short path failed, file does not exist as specified.
25337    # Try adding .exe or .cmd
25338    if test -f "${new_path}.exe"; then
25339       input_to_shortpath="${new_path}.exe"
25340    elif test -f "${new_path}.cmd"; then
25341       input_to_shortpath="${new_path}.cmd"
25342    else
25343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25344$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25347      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25348    fi
25349  else
25350    input_to_shortpath="$new_path"
25351  fi
25352
25353  # Call helper function which possibly converts this using DOS-style short mode.
25354  # If so, the updated path is stored in $new_path.
25355  new_path="$input_to_shortpath"
25356
25357  input_path="$input_to_shortpath"
25358  # Check if we need to convert this using DOS-style short mode. If the path
25359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25360  # take no chances and rewrite it.
25361  # Note: m4 eats our [], so we need to use [ and ] instead.
25362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25363  if test "x$has_forbidden_chars" != x; then
25364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25368      # Going to short mode and back again did indeed matter. Since short mode is
25369      # case insensitive, let's make it lowercase to improve readability.
25370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25371      # Now convert it back to Unix-stile (cygpath)
25372      input_path=`$CYGPATH -u "$shortmode_path"`
25373      new_path="$input_path"
25374    fi
25375  fi
25376
25377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25378  if test "x$test_cygdrive_prefix" = x; then
25379    # As a simple fix, exclude /usr/bin since it's not a real path.
25380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25382      # a path prefixed by /cygdrive for fixpath to work.
25383      new_path="$CYGWIN_ROOT_PATH$input_path"
25384    fi
25385  fi
25386
25387  # remove trailing .exe if any
25388  new_path="${new_path/%.exe/}"
25389
25390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25391
25392  # First separate the path from the arguments. This will split at the first
25393  # space.
25394  complete="$AS"
25395  path="${complete%% *}"
25396  tmp="$complete EOL"
25397  arguments="${tmp#* }"
25398
25399  # Input might be given as Windows format, start by converting to
25400  # unix format.
25401  new_path="$path"
25402
25403  windows_path="$new_path"
25404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405    unix_path=`$CYGPATH -u "$windows_path"`
25406    new_path="$unix_path"
25407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25409    new_path="$unix_path"
25410  fi
25411
25412
25413  # Now try to locate executable using which
25414  new_path=`$WHICH "$new_path" 2> /dev/null`
25415
25416  if test "x$new_path" = x; then
25417    # Oops. Which didn't find the executable.
25418    # The splitting of arguments from the executable at a space might have been incorrect,
25419    # since paths with space are more likely in Windows. Give it another try with the whole
25420    # argument.
25421    path="$complete"
25422    arguments="EOL"
25423    new_path="$path"
25424
25425  windows_path="$new_path"
25426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25427    unix_path=`$CYGPATH -u "$windows_path"`
25428    new_path="$unix_path"
25429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25431    new_path="$unix_path"
25432  fi
25433
25434
25435    new_path=`$WHICH "$new_path" 2> /dev/null`
25436
25437    if test "x$new_path" = x; then
25438      # It's still not found. Now this is an unrecoverable error.
25439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25440$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25441      has_space=`$ECHO "$complete" | $GREP " "`
25442      if test "x$has_space" != x; then
25443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25445      fi
25446      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25447    fi
25448  fi
25449
25450  # Now new_path has a complete unix path to the binary
25451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25452    # Keep paths in /bin as-is, but remove trailing .exe if any
25453    new_path="${new_path/%.exe/}"
25454    # Do not save /bin paths to all_fixpath_prefixes!
25455  else
25456    # Not in mixed or Windows style, start by that.
25457    new_path=`cmd //c echo $new_path`
25458
25459  input_path="$new_path"
25460  # Check if we need to convert this using DOS-style short mode. If the path
25461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25462  # take no chances and rewrite it.
25463  # Note: m4 eats our [], so we need to use [ and ] instead.
25464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25465  if test "x$has_forbidden_chars" != x; then
25466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25468  fi
25469
25470    # Output is in $new_path
25471
25472  windows_path="$new_path"
25473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474    unix_path=`$CYGPATH -u "$windows_path"`
25475    new_path="$unix_path"
25476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25478    new_path="$unix_path"
25479  fi
25480
25481    # remove trailing .exe if any
25482    new_path="${new_path/%.exe/}"
25483
25484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25486  fi
25487
25488  else
25489    # We're on a posix platform. Hooray! :)
25490    # First separate the path from the arguments. This will split at the first
25491    # space.
25492    complete="$AS"
25493    path="${complete%% *}"
25494    tmp="$complete EOL"
25495    arguments="${tmp#* }"
25496
25497    # Cannot rely on the command "which" here since it doesn't always work.
25498    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25499    if test -z "$is_absolute_path"; then
25500      # Path to executable is not absolute. Find it.
25501      IFS_save="$IFS"
25502      IFS=:
25503      for p in $PATH; do
25504        if test -f "$p/$path" && test -x "$p/$path"; then
25505          new_path="$p/$path"
25506          break
25507        fi
25508      done
25509      IFS="$IFS_save"
25510    else
25511      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25512$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25513      new_path="$path"
25514    fi
25515
25516    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
25522$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
25529      if test "x$arguments" != xEOL; then
25530        new_complete="$new_path ${arguments% *}"
25531      else
25532        new_complete="$new_path"
25533      fi
25534
25535  if test "x$complete" != "x$new_complete"; then
25536      AS="$new_complete"
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25538$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25539    fi
25540
25541else
25542    AS="$CC -c"
25543fi
25544
25545
25546if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25547    # Extract the first word of "nm", so it can be a program name with args.
25548set dummy nm; ac_word=$2
25549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25550$as_echo_n "checking for $ac_word... " >&6; }
25551if test "${ac_cv_path_NM+set}" = set; then :
25552  $as_echo_n "(cached) " >&6
25553else
25554  case $NM in
25555  [\\/]* | ?:[\\/]*)
25556  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25557  ;;
25558  *)
25559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25560for as_dir in $PATH
25561do
25562  IFS=$as_save_IFS
25563  test -z "$as_dir" && as_dir=.
25564    for ac_exec_ext in '' $ac_executable_extensions; do
25565  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25566    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25568    break 2
25569  fi
25570done
25571  done
25572IFS=$as_save_IFS
25573
25574  ;;
25575esac
25576fi
25577NM=$ac_cv_path_NM
25578if test -n "$NM"; then
25579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25580$as_echo "$NM" >&6; }
25581else
25582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25583$as_echo "no" >&6; }
25584fi
25585
25586
25587
25588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25589
25590  # First separate the path from the arguments. This will split at the first
25591  # space.
25592  complete="$NM"
25593  path="${complete%% *}"
25594  tmp="$complete EOL"
25595  arguments="${tmp#* }"
25596
25597  # Input might be given as Windows format, start by converting to
25598  # unix format.
25599  new_path=`$CYGPATH -u "$path"`
25600
25601  # Now try to locate executable using which
25602  new_path=`$WHICH "$new_path" 2> /dev/null`
25603  # bat and cmd files are not always considered executable in cygwin causing which
25604  # to not find them
25605  if test "x$new_path" = x \
25606           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25607           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25608    new_path=`$CYGPATH -u "$path"`
25609  fi
25610  if test "x$new_path" = x; then
25611    # Oops. Which didn't find the executable.
25612    # The splitting of arguments from the executable at a space might have been incorrect,
25613    # since paths with space are more likely in Windows. Give it another try with the whole
25614    # argument.
25615    path="$complete"
25616    arguments="EOL"
25617    new_path=`$CYGPATH -u "$path"`
25618    new_path=`$WHICH "$new_path" 2> /dev/null`
25619    # bat and cmd files are not always considered executable in cygwin causing which
25620    # to not find them
25621    if test "x$new_path" = x \
25622             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25623             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25624      new_path=`$CYGPATH -u "$path"`
25625    fi
25626    if test "x$new_path" = x; then
25627      # It's still not found. Now this is an unrecoverable error.
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25629$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25630      has_space=`$ECHO "$complete" | $GREP " "`
25631      if test "x$has_space" != x; then
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25634      fi
25635      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25636    fi
25637  fi
25638
25639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25642  # "foo.exe" is OK but "foo" is an error.
25643  #
25644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25645  # It is also a way to make sure we got the proper file name for the real test later on.
25646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25647  if test "x$test_shortpath" = x; then
25648    # Short path failed, file does not exist as specified.
25649    # Try adding .exe or .cmd
25650    if test -f "${new_path}.exe"; then
25651       input_to_shortpath="${new_path}.exe"
25652    elif test -f "${new_path}.cmd"; then
25653       input_to_shortpath="${new_path}.cmd"
25654    else
25655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25656$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25657      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25658$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25659      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25660    fi
25661  else
25662    input_to_shortpath="$new_path"
25663  fi
25664
25665  # Call helper function which possibly converts this using DOS-style short mode.
25666  # If so, the updated path is stored in $new_path.
25667  new_path="$input_to_shortpath"
25668
25669  input_path="$input_to_shortpath"
25670  # Check if we need to convert this using DOS-style short mode. If the path
25671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25672  # take no chances and rewrite it.
25673  # Note: m4 eats our [], so we need to use [ and ] instead.
25674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25675  if test "x$has_forbidden_chars" != x; then
25676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25680      # Going to short mode and back again did indeed matter. Since short mode is
25681      # case insensitive, let's make it lowercase to improve readability.
25682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25683      # Now convert it back to Unix-stile (cygpath)
25684      input_path=`$CYGPATH -u "$shortmode_path"`
25685      new_path="$input_path"
25686    fi
25687  fi
25688
25689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25690  if test "x$test_cygdrive_prefix" = x; then
25691    # As a simple fix, exclude /usr/bin since it's not a real path.
25692    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25694      # a path prefixed by /cygdrive for fixpath to work.
25695      new_path="$CYGWIN_ROOT_PATH$input_path"
25696    fi
25697  fi
25698
25699  # remove trailing .exe if any
25700  new_path="${new_path/%.exe/}"
25701
25702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703
25704  # First separate the path from the arguments. This will split at the first
25705  # space.
25706  complete="$NM"
25707  path="${complete%% *}"
25708  tmp="$complete EOL"
25709  arguments="${tmp#* }"
25710
25711  # Input might be given as Windows format, start by converting to
25712  # unix format.
25713  new_path="$path"
25714
25715  windows_path="$new_path"
25716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25717    unix_path=`$CYGPATH -u "$windows_path"`
25718    new_path="$unix_path"
25719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25721    new_path="$unix_path"
25722  fi
25723
25724
25725  # Now try to locate executable using which
25726  new_path=`$WHICH "$new_path" 2> /dev/null`
25727
25728  if test "x$new_path" = x; then
25729    # Oops. Which didn't find the executable.
25730    # The splitting of arguments from the executable at a space might have been incorrect,
25731    # since paths with space are more likely in Windows. Give it another try with the whole
25732    # argument.
25733    path="$complete"
25734    arguments="EOL"
25735    new_path="$path"
25736
25737  windows_path="$new_path"
25738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25739    unix_path=`$CYGPATH -u "$windows_path"`
25740    new_path="$unix_path"
25741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25743    new_path="$unix_path"
25744  fi
25745
25746
25747    new_path=`$WHICH "$new_path" 2> /dev/null`
25748
25749    if test "x$new_path" = x; then
25750      # It's still not found. Now this is an unrecoverable error.
25751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25752$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25753      has_space=`$ECHO "$complete" | $GREP " "`
25754      if test "x$has_space" != x; then
25755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25757      fi
25758      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25759    fi
25760  fi
25761
25762  # Now new_path has a complete unix path to the binary
25763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25764    # Keep paths in /bin as-is, but remove trailing .exe if any
25765    new_path="${new_path/%.exe/}"
25766    # Do not save /bin paths to all_fixpath_prefixes!
25767  else
25768    # Not in mixed or Windows style, start by that.
25769    new_path=`cmd //c echo $new_path`
25770
25771  input_path="$new_path"
25772  # Check if we need to convert this using DOS-style short mode. If the path
25773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25774  # take no chances and rewrite it.
25775  # Note: m4 eats our [], so we need to use [ and ] instead.
25776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25777  if test "x$has_forbidden_chars" != x; then
25778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25780  fi
25781
25782    # Output is in $new_path
25783
25784  windows_path="$new_path"
25785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25786    unix_path=`$CYGPATH -u "$windows_path"`
25787    new_path="$unix_path"
25788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25790    new_path="$unix_path"
25791  fi
25792
25793    # remove trailing .exe if any
25794    new_path="${new_path/%.exe/}"
25795
25796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25798  fi
25799
25800  else
25801    # We're on a posix platform. Hooray! :)
25802    # First separate the path from the arguments. This will split at the first
25803    # space.
25804    complete="$NM"
25805    path="${complete%% *}"
25806    tmp="$complete EOL"
25807    arguments="${tmp#* }"
25808
25809    # Cannot rely on the command "which" here since it doesn't always work.
25810    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25811    if test -z "$is_absolute_path"; then
25812      # Path to executable is not absolute. Find it.
25813      IFS_save="$IFS"
25814      IFS=:
25815      for p in $PATH; do
25816        if test -f "$p/$path" && test -x "$p/$path"; then
25817          new_path="$p/$path"
25818          break
25819        fi
25820      done
25821      IFS="$IFS_save"
25822    else
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25824$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25825      new_path="$path"
25826    fi
25827
25828    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
25834$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
25841      if test "x$arguments" != xEOL; then
25842        new_complete="$new_path ${arguments% *}"
25843      else
25844        new_complete="$new_path"
25845      fi
25846
25847  if test "x$complete" != "x$new_complete"; then
25848      NM="$new_complete"
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25850$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25851    fi
25852
25853    # Extract the first word of "gnm", so it can be a program name with args.
25854set dummy gnm; ac_word=$2
25855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25856$as_echo_n "checking for $ac_word... " >&6; }
25857if test "${ac_cv_path_GNM+set}" = set; then :
25858  $as_echo_n "(cached) " >&6
25859else
25860  case $GNM in
25861  [\\/]* | ?:[\\/]*)
25862  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25863  ;;
25864  *)
25865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25866for as_dir in $PATH
25867do
25868  IFS=$as_save_IFS
25869  test -z "$as_dir" && as_dir=.
25870    for ac_exec_ext in '' $ac_executable_extensions; do
25871  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25872    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25874    break 2
25875  fi
25876done
25877  done
25878IFS=$as_save_IFS
25879
25880  ;;
25881esac
25882fi
25883GNM=$ac_cv_path_GNM
25884if test -n "$GNM"; then
25885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25886$as_echo "$GNM" >&6; }
25887else
25888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25889$as_echo "no" >&6; }
25890fi
25891
25892
25893
25894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25895
25896  # First separate the path from the arguments. This will split at the first
25897  # space.
25898  complete="$GNM"
25899  path="${complete%% *}"
25900  tmp="$complete EOL"
25901  arguments="${tmp#* }"
25902
25903  # Input might be given as Windows format, start by converting to
25904  # unix format.
25905  new_path=`$CYGPATH -u "$path"`
25906
25907  # Now try to locate executable using which
25908  new_path=`$WHICH "$new_path" 2> /dev/null`
25909  # bat and cmd files are not always considered executable in cygwin causing which
25910  # to not find them
25911  if test "x$new_path" = x \
25912           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25913           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25914    new_path=`$CYGPATH -u "$path"`
25915  fi
25916  if test "x$new_path" = x; then
25917    # Oops. Which didn't find the executable.
25918    # The splitting of arguments from the executable at a space might have been incorrect,
25919    # since paths with space are more likely in Windows. Give it another try with the whole
25920    # argument.
25921    path="$complete"
25922    arguments="EOL"
25923    new_path=`$CYGPATH -u "$path"`
25924    new_path=`$WHICH "$new_path" 2> /dev/null`
25925    # bat and cmd files are not always considered executable in cygwin causing which
25926    # to not find them
25927    if test "x$new_path" = x \
25928             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25929             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25930      new_path=`$CYGPATH -u "$path"`
25931    fi
25932    if test "x$new_path" = x; then
25933      # It's still not found. Now this is an unrecoverable error.
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25935$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25936      has_space=`$ECHO "$complete" | $GREP " "`
25937      if test "x$has_space" != x; then
25938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25940      fi
25941      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25942    fi
25943  fi
25944
25945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25948  # "foo.exe" is OK but "foo" is an error.
25949  #
25950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25951  # It is also a way to make sure we got the proper file name for the real test later on.
25952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25953  if test "x$test_shortpath" = x; then
25954    # Short path failed, file does not exist as specified.
25955    # Try adding .exe or .cmd
25956    if test -f "${new_path}.exe"; then
25957       input_to_shortpath="${new_path}.exe"
25958    elif test -f "${new_path}.cmd"; then
25959       input_to_shortpath="${new_path}.cmd"
25960    else
25961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25962$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25965      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25966    fi
25967  else
25968    input_to_shortpath="$new_path"
25969  fi
25970
25971  # Call helper function which possibly converts this using DOS-style short mode.
25972  # If so, the updated path is stored in $new_path.
25973  new_path="$input_to_shortpath"
25974
25975  input_path="$input_to_shortpath"
25976  # Check if we need to convert this using DOS-style short mode. If the path
25977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25978  # take no chances and rewrite it.
25979  # Note: m4 eats our [], so we need to use [ and ] instead.
25980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25981  if test "x$has_forbidden_chars" != x; then
25982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25986      # Going to short mode and back again did indeed matter. Since short mode is
25987      # case insensitive, let's make it lowercase to improve readability.
25988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25989      # Now convert it back to Unix-stile (cygpath)
25990      input_path=`$CYGPATH -u "$shortmode_path"`
25991      new_path="$input_path"
25992    fi
25993  fi
25994
25995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25996  if test "x$test_cygdrive_prefix" = x; then
25997    # As a simple fix, exclude /usr/bin since it's not a real path.
25998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26000      # a path prefixed by /cygdrive for fixpath to work.
26001      new_path="$CYGWIN_ROOT_PATH$input_path"
26002    fi
26003  fi
26004
26005  # remove trailing .exe if any
26006  new_path="${new_path/%.exe/}"
26007
26008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26009
26010  # First separate the path from the arguments. This will split at the first
26011  # space.
26012  complete="$GNM"
26013  path="${complete%% *}"
26014  tmp="$complete EOL"
26015  arguments="${tmp#* }"
26016
26017  # Input might be given as Windows format, start by converting to
26018  # unix format.
26019  new_path="$path"
26020
26021  windows_path="$new_path"
26022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26023    unix_path=`$CYGPATH -u "$windows_path"`
26024    new_path="$unix_path"
26025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26027    new_path="$unix_path"
26028  fi
26029
26030
26031  # Now try to locate executable using which
26032  new_path=`$WHICH "$new_path" 2> /dev/null`
26033
26034  if test "x$new_path" = x; then
26035    # Oops. Which didn't find the executable.
26036    # The splitting of arguments from the executable at a space might have been incorrect,
26037    # since paths with space are more likely in Windows. Give it another try with the whole
26038    # argument.
26039    path="$complete"
26040    arguments="EOL"
26041    new_path="$path"
26042
26043  windows_path="$new_path"
26044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26045    unix_path=`$CYGPATH -u "$windows_path"`
26046    new_path="$unix_path"
26047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26049    new_path="$unix_path"
26050  fi
26051
26052
26053    new_path=`$WHICH "$new_path" 2> /dev/null`
26054
26055    if test "x$new_path" = x; then
26056      # It's still not found. Now this is an unrecoverable error.
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26058$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26059      has_space=`$ECHO "$complete" | $GREP " "`
26060      if test "x$has_space" != x; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26063      fi
26064      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26065    fi
26066  fi
26067
26068  # Now new_path has a complete unix path to the binary
26069  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26070    # Keep paths in /bin as-is, but remove trailing .exe if any
26071    new_path="${new_path/%.exe/}"
26072    # Do not save /bin paths to all_fixpath_prefixes!
26073  else
26074    # Not in mixed or Windows style, start by that.
26075    new_path=`cmd //c echo $new_path`
26076
26077  input_path="$new_path"
26078  # Check if we need to convert this using DOS-style short mode. If the path
26079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26080  # take no chances and rewrite it.
26081  # Note: m4 eats our [], so we need to use [ and ] instead.
26082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26083  if test "x$has_forbidden_chars" != x; then
26084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26086  fi
26087
26088    # Output is in $new_path
26089
26090  windows_path="$new_path"
26091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26092    unix_path=`$CYGPATH -u "$windows_path"`
26093    new_path="$unix_path"
26094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26096    new_path="$unix_path"
26097  fi
26098
26099    # remove trailing .exe if any
26100    new_path="${new_path/%.exe/}"
26101
26102    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26103    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26104  fi
26105
26106  else
26107    # We're on a posix platform. Hooray! :)
26108    # First separate the path from the arguments. This will split at the first
26109    # space.
26110    complete="$GNM"
26111    path="${complete%% *}"
26112    tmp="$complete EOL"
26113    arguments="${tmp#* }"
26114
26115    # Cannot rely on the command "which" here since it doesn't always work.
26116    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26117    if test -z "$is_absolute_path"; then
26118      # Path to executable is not absolute. Find it.
26119      IFS_save="$IFS"
26120      IFS=:
26121      for p in $PATH; do
26122        if test -f "$p/$path" && test -x "$p/$path"; then
26123          new_path="$p/$path"
26124          break
26125        fi
26126      done
26127      IFS="$IFS_save"
26128    else
26129      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26130$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26131      new_path="$path"
26132    fi
26133
26134    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
26140$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
26147      if test "x$arguments" != xEOL; then
26148        new_complete="$new_path ${arguments% *}"
26149      else
26150        new_complete="$new_path"
26151      fi
26152
26153  if test "x$complete" != "x$new_complete"; then
26154      GNM="$new_complete"
26155      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26156$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26157    fi
26158
26159    # Extract the first word of "strip", so it can be a program name with args.
26160set dummy strip; ac_word=$2
26161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26162$as_echo_n "checking for $ac_word... " >&6; }
26163if test "${ac_cv_path_STRIP+set}" = set; then :
26164  $as_echo_n "(cached) " >&6
26165else
26166  case $STRIP in
26167  [\\/]* | ?:[\\/]*)
26168  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26169  ;;
26170  *)
26171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26172for as_dir in $PATH
26173do
26174  IFS=$as_save_IFS
26175  test -z "$as_dir" && as_dir=.
26176    for ac_exec_ext in '' $ac_executable_extensions; do
26177  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26178    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26180    break 2
26181  fi
26182done
26183  done
26184IFS=$as_save_IFS
26185
26186  ;;
26187esac
26188fi
26189STRIP=$ac_cv_path_STRIP
26190if test -n "$STRIP"; then
26191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26192$as_echo "$STRIP" >&6; }
26193else
26194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26195$as_echo "no" >&6; }
26196fi
26197
26198
26199
26200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26201
26202  # First separate the path from the arguments. This will split at the first
26203  # space.
26204  complete="$STRIP"
26205  path="${complete%% *}"
26206  tmp="$complete EOL"
26207  arguments="${tmp#* }"
26208
26209  # Input might be given as Windows format, start by converting to
26210  # unix format.
26211  new_path=`$CYGPATH -u "$path"`
26212
26213  # Now try to locate executable using which
26214  new_path=`$WHICH "$new_path" 2> /dev/null`
26215  # bat and cmd files are not always considered executable in cygwin causing which
26216  # to not find them
26217  if test "x$new_path" = x \
26218           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26219           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26220    new_path=`$CYGPATH -u "$path"`
26221  fi
26222  if test "x$new_path" = x; then
26223    # Oops. Which didn't find the executable.
26224    # The splitting of arguments from the executable at a space might have been incorrect,
26225    # since paths with space are more likely in Windows. Give it another try with the whole
26226    # argument.
26227    path="$complete"
26228    arguments="EOL"
26229    new_path=`$CYGPATH -u "$path"`
26230    new_path=`$WHICH "$new_path" 2> /dev/null`
26231    # bat and cmd files are not always considered executable in cygwin causing which
26232    # to not find them
26233    if test "x$new_path" = x \
26234             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26235             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26236      new_path=`$CYGPATH -u "$path"`
26237    fi
26238    if test "x$new_path" = x; then
26239      # It's still not found. Now this is an unrecoverable error.
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26241$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26242      has_space=`$ECHO "$complete" | $GREP " "`
26243      if test "x$has_space" != x; then
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26246      fi
26247      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26248    fi
26249  fi
26250
26251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26254  # "foo.exe" is OK but "foo" is an error.
26255  #
26256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26257  # It is also a way to make sure we got the proper file name for the real test later on.
26258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26259  if test "x$test_shortpath" = x; then
26260    # Short path failed, file does not exist as specified.
26261    # Try adding .exe or .cmd
26262    if test -f "${new_path}.exe"; then
26263       input_to_shortpath="${new_path}.exe"
26264    elif test -f "${new_path}.cmd"; then
26265       input_to_shortpath="${new_path}.cmd"
26266    else
26267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26268$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26269      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26270$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26271      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26272    fi
26273  else
26274    input_to_shortpath="$new_path"
26275  fi
26276
26277  # Call helper function which possibly converts this using DOS-style short mode.
26278  # If so, the updated path is stored in $new_path.
26279  new_path="$input_to_shortpath"
26280
26281  input_path="$input_to_shortpath"
26282  # Check if we need to convert this using DOS-style short mode. If the path
26283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26284  # take no chances and rewrite it.
26285  # Note: m4 eats our [], so we need to use [ and ] instead.
26286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26287  if test "x$has_forbidden_chars" != x; then
26288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26292      # Going to short mode and back again did indeed matter. Since short mode is
26293      # case insensitive, let's make it lowercase to improve readability.
26294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26295      # Now convert it back to Unix-stile (cygpath)
26296      input_path=`$CYGPATH -u "$shortmode_path"`
26297      new_path="$input_path"
26298    fi
26299  fi
26300
26301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26302  if test "x$test_cygdrive_prefix" = x; then
26303    # As a simple fix, exclude /usr/bin since it's not a real path.
26304    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26306      # a path prefixed by /cygdrive for fixpath to work.
26307      new_path="$CYGWIN_ROOT_PATH$input_path"
26308    fi
26309  fi
26310
26311  # remove trailing .exe if any
26312  new_path="${new_path/%.exe/}"
26313
26314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26315
26316  # First separate the path from the arguments. This will split at the first
26317  # space.
26318  complete="$STRIP"
26319  path="${complete%% *}"
26320  tmp="$complete EOL"
26321  arguments="${tmp#* }"
26322
26323  # Input might be given as Windows format, start by converting to
26324  # unix format.
26325  new_path="$path"
26326
26327  windows_path="$new_path"
26328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26329    unix_path=`$CYGPATH -u "$windows_path"`
26330    new_path="$unix_path"
26331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26333    new_path="$unix_path"
26334  fi
26335
26336
26337  # Now try to locate executable using which
26338  new_path=`$WHICH "$new_path" 2> /dev/null`
26339
26340  if test "x$new_path" = x; then
26341    # Oops. Which didn't find the executable.
26342    # The splitting of arguments from the executable at a space might have been incorrect,
26343    # since paths with space are more likely in Windows. Give it another try with the whole
26344    # argument.
26345    path="$complete"
26346    arguments="EOL"
26347    new_path="$path"
26348
26349  windows_path="$new_path"
26350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26351    unix_path=`$CYGPATH -u "$windows_path"`
26352    new_path="$unix_path"
26353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26355    new_path="$unix_path"
26356  fi
26357
26358
26359    new_path=`$WHICH "$new_path" 2> /dev/null`
26360
26361    if test "x$new_path" = x; then
26362      # It's still not found. Now this is an unrecoverable error.
26363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26364$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26365      has_space=`$ECHO "$complete" | $GREP " "`
26366      if test "x$has_space" != x; then
26367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26369      fi
26370      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26371    fi
26372  fi
26373
26374  # Now new_path has a complete unix path to the binary
26375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26376    # Keep paths in /bin as-is, but remove trailing .exe if any
26377    new_path="${new_path/%.exe/}"
26378    # Do not save /bin paths to all_fixpath_prefixes!
26379  else
26380    # Not in mixed or Windows style, start by that.
26381    new_path=`cmd //c echo $new_path`
26382
26383  input_path="$new_path"
26384  # Check if we need to convert this using DOS-style short mode. If the path
26385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26386  # take no chances and rewrite it.
26387  # Note: m4 eats our [], so we need to use [ and ] instead.
26388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26389  if test "x$has_forbidden_chars" != x; then
26390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26392  fi
26393
26394    # Output is in $new_path
26395
26396  windows_path="$new_path"
26397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26398    unix_path=`$CYGPATH -u "$windows_path"`
26399    new_path="$unix_path"
26400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26402    new_path="$unix_path"
26403  fi
26404
26405    # remove trailing .exe if any
26406    new_path="${new_path/%.exe/}"
26407
26408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26410  fi
26411
26412  else
26413    # We're on a posix platform. Hooray! :)
26414    # First separate the path from the arguments. This will split at the first
26415    # space.
26416    complete="$STRIP"
26417    path="${complete%% *}"
26418    tmp="$complete EOL"
26419    arguments="${tmp#* }"
26420
26421    # Cannot rely on the command "which" here since it doesn't always work.
26422    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26423    if test -z "$is_absolute_path"; then
26424      # Path to executable is not absolute. Find it.
26425      IFS_save="$IFS"
26426      IFS=:
26427      for p in $PATH; do
26428        if test -f "$p/$path" && test -x "$p/$path"; then
26429          new_path="$p/$path"
26430          break
26431        fi
26432      done
26433      IFS="$IFS_save"
26434    else
26435      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26436$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26437      new_path="$path"
26438    fi
26439
26440    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
26446$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
26453      if test "x$arguments" != xEOL; then
26454        new_complete="$new_path ${arguments% *}"
26455      else
26456        new_complete="$new_path"
26457      fi
26458
26459  if test "x$complete" != "x$new_complete"; then
26460      STRIP="$new_complete"
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26462$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26463    fi
26464
26465    # Extract the first word of "mcs", so it can be a program name with args.
26466set dummy mcs; ac_word=$2
26467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26468$as_echo_n "checking for $ac_word... " >&6; }
26469if test "${ac_cv_path_MCS+set}" = set; then :
26470  $as_echo_n "(cached) " >&6
26471else
26472  case $MCS in
26473  [\\/]* | ?:[\\/]*)
26474  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26475  ;;
26476  *)
26477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26478for as_dir in $PATH
26479do
26480  IFS=$as_save_IFS
26481  test -z "$as_dir" && as_dir=.
26482    for ac_exec_ext in '' $ac_executable_extensions; do
26483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26484    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26486    break 2
26487  fi
26488done
26489  done
26490IFS=$as_save_IFS
26491
26492  ;;
26493esac
26494fi
26495MCS=$ac_cv_path_MCS
26496if test -n "$MCS"; then
26497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26498$as_echo "$MCS" >&6; }
26499else
26500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26501$as_echo "no" >&6; }
26502fi
26503
26504
26505
26506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$MCS"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path=`$CYGPATH -u "$path"`
26518
26519  # Now try to locate executable using which
26520  new_path=`$WHICH "$new_path" 2> /dev/null`
26521  # bat and cmd files are not always considered executable in cygwin causing which
26522  # to not find them
26523  if test "x$new_path" = x \
26524           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26525           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26526    new_path=`$CYGPATH -u "$path"`
26527  fi
26528  if test "x$new_path" = x; then
26529    # Oops. Which didn't find the executable.
26530    # The splitting of arguments from the executable at a space might have been incorrect,
26531    # since paths with space are more likely in Windows. Give it another try with the whole
26532    # argument.
26533    path="$complete"
26534    arguments="EOL"
26535    new_path=`$CYGPATH -u "$path"`
26536    new_path=`$WHICH "$new_path" 2> /dev/null`
26537    # bat and cmd files are not always considered executable in cygwin causing which
26538    # to not find them
26539    if test "x$new_path" = x \
26540             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26541             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26542      new_path=`$CYGPATH -u "$path"`
26543    fi
26544    if test "x$new_path" = x; then
26545      # It's still not found. Now this is an unrecoverable error.
26546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26547$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26548      has_space=`$ECHO "$complete" | $GREP " "`
26549      if test "x$has_space" != x; then
26550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26552      fi
26553      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26554    fi
26555  fi
26556
26557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26560  # "foo.exe" is OK but "foo" is an error.
26561  #
26562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26563  # It is also a way to make sure we got the proper file name for the real test later on.
26564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26565  if test "x$test_shortpath" = x; then
26566    # Short path failed, file does not exist as specified.
26567    # Try adding .exe or .cmd
26568    if test -f "${new_path}.exe"; then
26569       input_to_shortpath="${new_path}.exe"
26570    elif test -f "${new_path}.cmd"; then
26571       input_to_shortpath="${new_path}.cmd"
26572    else
26573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26574$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26577      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26578    fi
26579  else
26580    input_to_shortpath="$new_path"
26581  fi
26582
26583  # Call helper function which possibly converts this using DOS-style short mode.
26584  # If so, the updated path is stored in $new_path.
26585  new_path="$input_to_shortpath"
26586
26587  input_path="$input_to_shortpath"
26588  # Check if we need to convert this using DOS-style short mode. If the path
26589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26590  # take no chances and rewrite it.
26591  # Note: m4 eats our [], so we need to use [ and ] instead.
26592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26593  if test "x$has_forbidden_chars" != x; then
26594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26598      # Going to short mode and back again did indeed matter. Since short mode is
26599      # case insensitive, let's make it lowercase to improve readability.
26600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26601      # Now convert it back to Unix-stile (cygpath)
26602      input_path=`$CYGPATH -u "$shortmode_path"`
26603      new_path="$input_path"
26604    fi
26605  fi
26606
26607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26608  if test "x$test_cygdrive_prefix" = x; then
26609    # As a simple fix, exclude /usr/bin since it's not a real path.
26610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26612      # a path prefixed by /cygdrive for fixpath to work.
26613      new_path="$CYGWIN_ROOT_PATH$input_path"
26614    fi
26615  fi
26616
26617  # remove trailing .exe if any
26618  new_path="${new_path/%.exe/}"
26619
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621
26622  # First separate the path from the arguments. This will split at the first
26623  # space.
26624  complete="$MCS"
26625  path="${complete%% *}"
26626  tmp="$complete EOL"
26627  arguments="${tmp#* }"
26628
26629  # Input might be given as Windows format, start by converting to
26630  # unix format.
26631  new_path="$path"
26632
26633  windows_path="$new_path"
26634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26635    unix_path=`$CYGPATH -u "$windows_path"`
26636    new_path="$unix_path"
26637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26639    new_path="$unix_path"
26640  fi
26641
26642
26643  # Now try to locate executable using which
26644  new_path=`$WHICH "$new_path" 2> /dev/null`
26645
26646  if test "x$new_path" = x; then
26647    # Oops. Which didn't find the executable.
26648    # The splitting of arguments from the executable at a space might have been incorrect,
26649    # since paths with space are more likely in Windows. Give it another try with the whole
26650    # argument.
26651    path="$complete"
26652    arguments="EOL"
26653    new_path="$path"
26654
26655  windows_path="$new_path"
26656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657    unix_path=`$CYGPATH -u "$windows_path"`
26658    new_path="$unix_path"
26659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26661    new_path="$unix_path"
26662  fi
26663
26664
26665    new_path=`$WHICH "$new_path" 2> /dev/null`
26666
26667    if test "x$new_path" = x; then
26668      # It's still not found. Now this is an unrecoverable error.
26669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26670$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26671      has_space=`$ECHO "$complete" | $GREP " "`
26672      if test "x$has_space" != x; then
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26675      fi
26676      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26677    fi
26678  fi
26679
26680  # Now new_path has a complete unix path to the binary
26681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26682    # Keep paths in /bin as-is, but remove trailing .exe if any
26683    new_path="${new_path/%.exe/}"
26684    # Do not save /bin paths to all_fixpath_prefixes!
26685  else
26686    # Not in mixed or Windows style, start by that.
26687    new_path=`cmd //c echo $new_path`
26688
26689  input_path="$new_path"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26698  fi
26699
26700    # Output is in $new_path
26701
26702  windows_path="$new_path"
26703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26704    unix_path=`$CYGPATH -u "$windows_path"`
26705    new_path="$unix_path"
26706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26708    new_path="$unix_path"
26709  fi
26710
26711    # remove trailing .exe if any
26712    new_path="${new_path/%.exe/}"
26713
26714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26716  fi
26717
26718  else
26719    # We're on a posix platform. Hooray! :)
26720    # First separate the path from the arguments. This will split at the first
26721    # space.
26722    complete="$MCS"
26723    path="${complete%% *}"
26724    tmp="$complete EOL"
26725    arguments="${tmp#* }"
26726
26727    # Cannot rely on the command "which" here since it doesn't always work.
26728    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26729    if test -z "$is_absolute_path"; then
26730      # Path to executable is not absolute. Find it.
26731      IFS_save="$IFS"
26732      IFS=:
26733      for p in $PATH; do
26734        if test -f "$p/$path" && test -x "$p/$path"; then
26735          new_path="$p/$path"
26736          break
26737        fi
26738      done
26739      IFS="$IFS_save"
26740    else
26741      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26742$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26743      new_path="$path"
26744    fi
26745
26746    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
26752$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
26759      if test "x$arguments" != xEOL; then
26760        new_complete="$new_path ${arguments% *}"
26761      else
26762        new_complete="$new_path"
26763      fi
26764
26765  if test "x$complete" != "x$new_complete"; then
26766      MCS="$new_complete"
26767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26768$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26769    fi
26770
26771elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26772    if test -n "$ac_tool_prefix"; then
26773  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26774set dummy ${ac_tool_prefix}nm; ac_word=$2
26775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26776$as_echo_n "checking for $ac_word... " >&6; }
26777if test "${ac_cv_prog_NM+set}" = set; then :
26778  $as_echo_n "(cached) " >&6
26779else
26780  if test -n "$NM"; then
26781  ac_cv_prog_NM="$NM" # Let the user override the test.
26782else
26783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26784for as_dir in $PATH
26785do
26786  IFS=$as_save_IFS
26787  test -z "$as_dir" && as_dir=.
26788    for ac_exec_ext in '' $ac_executable_extensions; do
26789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26790    ac_cv_prog_NM="${ac_tool_prefix}nm"
26791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26792    break 2
26793  fi
26794done
26795  done
26796IFS=$as_save_IFS
26797
26798fi
26799fi
26800NM=$ac_cv_prog_NM
26801if test -n "$NM"; then
26802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26803$as_echo "$NM" >&6; }
26804else
26805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26806$as_echo "no" >&6; }
26807fi
26808
26809
26810fi
26811if test -z "$ac_cv_prog_NM"; then
26812  ac_ct_NM=$NM
26813  # Extract the first word of "nm", so it can be a program name with args.
26814set dummy nm; ac_word=$2
26815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26816$as_echo_n "checking for $ac_word... " >&6; }
26817if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26818  $as_echo_n "(cached) " >&6
26819else
26820  if test -n "$ac_ct_NM"; then
26821  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26822else
26823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26824for as_dir in $PATH
26825do
26826  IFS=$as_save_IFS
26827  test -z "$as_dir" && as_dir=.
26828    for ac_exec_ext in '' $ac_executable_extensions; do
26829  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26830    ac_cv_prog_ac_ct_NM="nm"
26831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26832    break 2
26833  fi
26834done
26835  done
26836IFS=$as_save_IFS
26837
26838fi
26839fi
26840ac_ct_NM=$ac_cv_prog_ac_ct_NM
26841if test -n "$ac_ct_NM"; then
26842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26843$as_echo "$ac_ct_NM" >&6; }
26844else
26845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26846$as_echo "no" >&6; }
26847fi
26848
26849  if test "x$ac_ct_NM" = x; then
26850    NM=""
26851  else
26852    case $cross_compiling:$ac_tool_warned in
26853yes:)
26854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26856ac_tool_warned=yes ;;
26857esac
26858    NM=$ac_ct_NM
26859  fi
26860else
26861  NM="$ac_cv_prog_NM"
26862fi
26863
26864
26865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26866
26867  # First separate the path from the arguments. This will split at the first
26868  # space.
26869  complete="$NM"
26870  path="${complete%% *}"
26871  tmp="$complete EOL"
26872  arguments="${tmp#* }"
26873
26874  # Input might be given as Windows format, start by converting to
26875  # unix format.
26876  new_path=`$CYGPATH -u "$path"`
26877
26878  # Now try to locate executable using which
26879  new_path=`$WHICH "$new_path" 2> /dev/null`
26880  # bat and cmd files are not always considered executable in cygwin causing which
26881  # to not find them
26882  if test "x$new_path" = x \
26883           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26884           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26885    new_path=`$CYGPATH -u "$path"`
26886  fi
26887  if test "x$new_path" = x; then
26888    # Oops. Which didn't find the executable.
26889    # The splitting of arguments from the executable at a space might have been incorrect,
26890    # since paths with space are more likely in Windows. Give it another try with the whole
26891    # argument.
26892    path="$complete"
26893    arguments="EOL"
26894    new_path=`$CYGPATH -u "$path"`
26895    new_path=`$WHICH "$new_path" 2> /dev/null`
26896    # bat and cmd files are not always considered executable in cygwin causing which
26897    # to not find them
26898    if test "x$new_path" = x \
26899             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26900             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26901      new_path=`$CYGPATH -u "$path"`
26902    fi
26903    if test "x$new_path" = x; then
26904      # It's still not found. Now this is an unrecoverable error.
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26906$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26907      has_space=`$ECHO "$complete" | $GREP " "`
26908      if test "x$has_space" != x; then
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26911      fi
26912      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26913    fi
26914  fi
26915
26916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26919  # "foo.exe" is OK but "foo" is an error.
26920  #
26921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26922  # It is also a way to make sure we got the proper file name for the real test later on.
26923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26924  if test "x$test_shortpath" = x; then
26925    # Short path failed, file does not exist as specified.
26926    # Try adding .exe or .cmd
26927    if test -f "${new_path}.exe"; then
26928       input_to_shortpath="${new_path}.exe"
26929    elif test -f "${new_path}.cmd"; then
26930       input_to_shortpath="${new_path}.cmd"
26931    else
26932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26933$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26936      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26937    fi
26938  else
26939    input_to_shortpath="$new_path"
26940  fi
26941
26942  # Call helper function which possibly converts this using DOS-style short mode.
26943  # If so, the updated path is stored in $new_path.
26944  new_path="$input_to_shortpath"
26945
26946  input_path="$input_to_shortpath"
26947  # Check if we need to convert this using DOS-style short mode. If the path
26948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26949  # take no chances and rewrite it.
26950  # Note: m4 eats our [], so we need to use [ and ] instead.
26951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26952  if test "x$has_forbidden_chars" != x; then
26953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26957      # Going to short mode and back again did indeed matter. Since short mode is
26958      # case insensitive, let's make it lowercase to improve readability.
26959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26960      # Now convert it back to Unix-stile (cygpath)
26961      input_path=`$CYGPATH -u "$shortmode_path"`
26962      new_path="$input_path"
26963    fi
26964  fi
26965
26966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26967  if test "x$test_cygdrive_prefix" = x; then
26968    # As a simple fix, exclude /usr/bin since it's not a real path.
26969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26971      # a path prefixed by /cygdrive for fixpath to work.
26972      new_path="$CYGWIN_ROOT_PATH$input_path"
26973    fi
26974  fi
26975
26976  # remove trailing .exe if any
26977  new_path="${new_path/%.exe/}"
26978
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980
26981  # First separate the path from the arguments. This will split at the first
26982  # space.
26983  complete="$NM"
26984  path="${complete%% *}"
26985  tmp="$complete EOL"
26986  arguments="${tmp#* }"
26987
26988  # Input might be given as Windows format, start by converting to
26989  # unix format.
26990  new_path="$path"
26991
26992  windows_path="$new_path"
26993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26994    unix_path=`$CYGPATH -u "$windows_path"`
26995    new_path="$unix_path"
26996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26998    new_path="$unix_path"
26999  fi
27000
27001
27002  # Now try to locate executable using which
27003  new_path=`$WHICH "$new_path" 2> /dev/null`
27004
27005  if test "x$new_path" = x; then
27006    # Oops. Which didn't find the executable.
27007    # The splitting of arguments from the executable at a space might have been incorrect,
27008    # since paths with space are more likely in Windows. Give it another try with the whole
27009    # argument.
27010    path="$complete"
27011    arguments="EOL"
27012    new_path="$path"
27013
27014  windows_path="$new_path"
27015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27016    unix_path=`$CYGPATH -u "$windows_path"`
27017    new_path="$unix_path"
27018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27020    new_path="$unix_path"
27021  fi
27022
27023
27024    new_path=`$WHICH "$new_path" 2> /dev/null`
27025
27026    if test "x$new_path" = x; then
27027      # It's still not found. Now this is an unrecoverable error.
27028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27029$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27030      has_space=`$ECHO "$complete" | $GREP " "`
27031      if test "x$has_space" != x; then
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27034      fi
27035      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27036    fi
27037  fi
27038
27039  # Now new_path has a complete unix path to the binary
27040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27041    # Keep paths in /bin as-is, but remove trailing .exe if any
27042    new_path="${new_path/%.exe/}"
27043    # Do not save /bin paths to all_fixpath_prefixes!
27044  else
27045    # Not in mixed or Windows style, start by that.
27046    new_path=`cmd //c echo $new_path`
27047
27048  input_path="$new_path"
27049  # Check if we need to convert this using DOS-style short mode. If the path
27050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27051  # take no chances and rewrite it.
27052  # Note: m4 eats our [], so we need to use [ and ] instead.
27053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27054  if test "x$has_forbidden_chars" != x; then
27055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27057  fi
27058
27059    # Output is in $new_path
27060
27061  windows_path="$new_path"
27062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063    unix_path=`$CYGPATH -u "$windows_path"`
27064    new_path="$unix_path"
27065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067    new_path="$unix_path"
27068  fi
27069
27070    # remove trailing .exe if any
27071    new_path="${new_path/%.exe/}"
27072
27073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27075  fi
27076
27077  else
27078    # We're on a posix platform. Hooray! :)
27079    # First separate the path from the arguments. This will split at the first
27080    # space.
27081    complete="$NM"
27082    path="${complete%% *}"
27083    tmp="$complete EOL"
27084    arguments="${tmp#* }"
27085
27086    # Cannot rely on the command "which" here since it doesn't always work.
27087    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27088    if test -z "$is_absolute_path"; then
27089      # Path to executable is not absolute. Find it.
27090      IFS_save="$IFS"
27091      IFS=:
27092      for p in $PATH; do
27093        if test -f "$p/$path" && test -x "$p/$path"; then
27094          new_path="$p/$path"
27095          break
27096        fi
27097      done
27098      IFS="$IFS_save"
27099    else
27100      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27101$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27102      new_path="$path"
27103    fi
27104
27105    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
27111$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
27118      if test "x$arguments" != xEOL; then
27119        new_complete="$new_path ${arguments% *}"
27120      else
27121        new_complete="$new_path"
27122      fi
27123
27124  if test "x$complete" != "x$new_complete"; then
27125      NM="$new_complete"
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27127$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27128    fi
27129
27130    GNM="$NM"
27131
27132    if test -n "$ac_tool_prefix"; then
27133  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27134set dummy ${ac_tool_prefix}strip; ac_word=$2
27135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27136$as_echo_n "checking for $ac_word... " >&6; }
27137if test "${ac_cv_prog_STRIP+set}" = set; then :
27138  $as_echo_n "(cached) " >&6
27139else
27140  if test -n "$STRIP"; then
27141  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27142else
27143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27144for as_dir in $PATH
27145do
27146  IFS=$as_save_IFS
27147  test -z "$as_dir" && as_dir=.
27148    for ac_exec_ext in '' $ac_executable_extensions; do
27149  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27150    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27152    break 2
27153  fi
27154done
27155  done
27156IFS=$as_save_IFS
27157
27158fi
27159fi
27160STRIP=$ac_cv_prog_STRIP
27161if test -n "$STRIP"; then
27162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27163$as_echo "$STRIP" >&6; }
27164else
27165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27166$as_echo "no" >&6; }
27167fi
27168
27169
27170fi
27171if test -z "$ac_cv_prog_STRIP"; then
27172  ac_ct_STRIP=$STRIP
27173  # Extract the first word of "strip", so it can be a program name with args.
27174set dummy strip; ac_word=$2
27175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27176$as_echo_n "checking for $ac_word... " >&6; }
27177if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27178  $as_echo_n "(cached) " >&6
27179else
27180  if test -n "$ac_ct_STRIP"; then
27181  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27182else
27183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27184for as_dir in $PATH
27185do
27186  IFS=$as_save_IFS
27187  test -z "$as_dir" && as_dir=.
27188    for ac_exec_ext in '' $ac_executable_extensions; do
27189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27190    ac_cv_prog_ac_ct_STRIP="strip"
27191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27192    break 2
27193  fi
27194done
27195  done
27196IFS=$as_save_IFS
27197
27198fi
27199fi
27200ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27201if test -n "$ac_ct_STRIP"; then
27202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27203$as_echo "$ac_ct_STRIP" >&6; }
27204else
27205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27206$as_echo "no" >&6; }
27207fi
27208
27209  if test "x$ac_ct_STRIP" = x; then
27210    STRIP=""
27211  else
27212    case $cross_compiling:$ac_tool_warned in
27213yes:)
27214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27216ac_tool_warned=yes ;;
27217esac
27218    STRIP=$ac_ct_STRIP
27219  fi
27220else
27221  STRIP="$ac_cv_prog_STRIP"
27222fi
27223
27224
27225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27226
27227  # First separate the path from the arguments. This will split at the first
27228  # space.
27229  complete="$STRIP"
27230  path="${complete%% *}"
27231  tmp="$complete EOL"
27232  arguments="${tmp#* }"
27233
27234  # Input might be given as Windows format, start by converting to
27235  # unix format.
27236  new_path=`$CYGPATH -u "$path"`
27237
27238  # Now try to locate executable using which
27239  new_path=`$WHICH "$new_path" 2> /dev/null`
27240  # bat and cmd files are not always considered executable in cygwin causing which
27241  # to not find them
27242  if test "x$new_path" = x \
27243           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27244           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27245    new_path=`$CYGPATH -u "$path"`
27246  fi
27247  if test "x$new_path" = x; then
27248    # Oops. Which didn't find the executable.
27249    # The splitting of arguments from the executable at a space might have been incorrect,
27250    # since paths with space are more likely in Windows. Give it another try with the whole
27251    # argument.
27252    path="$complete"
27253    arguments="EOL"
27254    new_path=`$CYGPATH -u "$path"`
27255    new_path=`$WHICH "$new_path" 2> /dev/null`
27256    # bat and cmd files are not always considered executable in cygwin causing which
27257    # to not find them
27258    if test "x$new_path" = x \
27259             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27260             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27261      new_path=`$CYGPATH -u "$path"`
27262    fi
27263    if test "x$new_path" = x; then
27264      # It's still not found. Now this is an unrecoverable error.
27265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27266$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27267      has_space=`$ECHO "$complete" | $GREP " "`
27268      if test "x$has_space" != x; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27271      fi
27272      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27273    fi
27274  fi
27275
27276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27279  # "foo.exe" is OK but "foo" is an error.
27280  #
27281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27282  # It is also a way to make sure we got the proper file name for the real test later on.
27283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27284  if test "x$test_shortpath" = x; then
27285    # Short path failed, file does not exist as specified.
27286    # Try adding .exe or .cmd
27287    if test -f "${new_path}.exe"; then
27288       input_to_shortpath="${new_path}.exe"
27289    elif test -f "${new_path}.cmd"; then
27290       input_to_shortpath="${new_path}.cmd"
27291    else
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27293$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27296      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27297    fi
27298  else
27299    input_to_shortpath="$new_path"
27300  fi
27301
27302  # Call helper function which possibly converts this using DOS-style short mode.
27303  # If so, the updated path is stored in $new_path.
27304  new_path="$input_to_shortpath"
27305
27306  input_path="$input_to_shortpath"
27307  # Check if we need to convert this using DOS-style short mode. If the path
27308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27309  # take no chances and rewrite it.
27310  # Note: m4 eats our [], so we need to use [ and ] instead.
27311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27312  if test "x$has_forbidden_chars" != x; then
27313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27317      # Going to short mode and back again did indeed matter. Since short mode is
27318      # case insensitive, let's make it lowercase to improve readability.
27319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27320      # Now convert it back to Unix-stile (cygpath)
27321      input_path=`$CYGPATH -u "$shortmode_path"`
27322      new_path="$input_path"
27323    fi
27324  fi
27325
27326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27327  if test "x$test_cygdrive_prefix" = x; then
27328    # As a simple fix, exclude /usr/bin since it's not a real path.
27329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27331      # a path prefixed by /cygdrive for fixpath to work.
27332      new_path="$CYGWIN_ROOT_PATH$input_path"
27333    fi
27334  fi
27335
27336  # remove trailing .exe if any
27337  new_path="${new_path/%.exe/}"
27338
27339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27340
27341  # First separate the path from the arguments. This will split at the first
27342  # space.
27343  complete="$STRIP"
27344  path="${complete%% *}"
27345  tmp="$complete EOL"
27346  arguments="${tmp#* }"
27347
27348  # Input might be given as Windows format, start by converting to
27349  # unix format.
27350  new_path="$path"
27351
27352  windows_path="$new_path"
27353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27354    unix_path=`$CYGPATH -u "$windows_path"`
27355    new_path="$unix_path"
27356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27358    new_path="$unix_path"
27359  fi
27360
27361
27362  # Now try to locate executable using which
27363  new_path=`$WHICH "$new_path" 2> /dev/null`
27364
27365  if test "x$new_path" = x; then
27366    # Oops. Which didn't find the executable.
27367    # The splitting of arguments from the executable at a space might have been incorrect,
27368    # since paths with space are more likely in Windows. Give it another try with the whole
27369    # argument.
27370    path="$complete"
27371    arguments="EOL"
27372    new_path="$path"
27373
27374  windows_path="$new_path"
27375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27376    unix_path=`$CYGPATH -u "$windows_path"`
27377    new_path="$unix_path"
27378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27380    new_path="$unix_path"
27381  fi
27382
27383
27384    new_path=`$WHICH "$new_path" 2> /dev/null`
27385
27386    if test "x$new_path" = x; then
27387      # It's still not found. Now this is an unrecoverable error.
27388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27389$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27390      has_space=`$ECHO "$complete" | $GREP " "`
27391      if test "x$has_space" != x; then
27392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27394      fi
27395      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27396    fi
27397  fi
27398
27399  # Now new_path has a complete unix path to the binary
27400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27401    # Keep paths in /bin as-is, but remove trailing .exe if any
27402    new_path="${new_path/%.exe/}"
27403    # Do not save /bin paths to all_fixpath_prefixes!
27404  else
27405    # Not in mixed or Windows style, start by that.
27406    new_path=`cmd //c echo $new_path`
27407
27408  input_path="$new_path"
27409  # Check if we need to convert this using DOS-style short mode. If the path
27410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27411  # take no chances and rewrite it.
27412  # Note: m4 eats our [], so we need to use [ and ] instead.
27413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27414  if test "x$has_forbidden_chars" != x; then
27415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27417  fi
27418
27419    # Output is in $new_path
27420
27421  windows_path="$new_path"
27422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27423    unix_path=`$CYGPATH -u "$windows_path"`
27424    new_path="$unix_path"
27425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27427    new_path="$unix_path"
27428  fi
27429
27430    # remove trailing .exe if any
27431    new_path="${new_path/%.exe/}"
27432
27433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27435  fi
27436
27437  else
27438    # We're on a posix platform. Hooray! :)
27439    # First separate the path from the arguments. This will split at the first
27440    # space.
27441    complete="$STRIP"
27442    path="${complete%% *}"
27443    tmp="$complete EOL"
27444    arguments="${tmp#* }"
27445
27446    # Cannot rely on the command "which" here since it doesn't always work.
27447    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27448    if test -z "$is_absolute_path"; then
27449      # Path to executable is not absolute. Find it.
27450      IFS_save="$IFS"
27451      IFS=:
27452      for p in $PATH; do
27453        if test -f "$p/$path" && test -x "$p/$path"; then
27454          new_path="$p/$path"
27455          break
27456        fi
27457      done
27458      IFS="$IFS_save"
27459    else
27460      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27461$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27462      new_path="$path"
27463    fi
27464
27465    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
27471$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
27478      if test "x$arguments" != xEOL; then
27479        new_complete="$new_path ${arguments% *}"
27480      else
27481        new_complete="$new_path"
27482      fi
27483
27484  if test "x$complete" != "x$new_complete"; then
27485      STRIP="$new_complete"
27486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27487$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27488    fi
27489
27490fi
27491
27492# objcopy is used for moving debug symbols to separate files when
27493# full debug symbols are enabled.
27494if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27495    if test -n "$ac_tool_prefix"; then
27496  for ac_prog in gobjcopy objcopy
27497  do
27498    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27499set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27501$as_echo_n "checking for $ac_word... " >&6; }
27502if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27503  $as_echo_n "(cached) " >&6
27504else
27505  if test -n "$OBJCOPY"; then
27506  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27507else
27508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27509for as_dir in $PATH
27510do
27511  IFS=$as_save_IFS
27512  test -z "$as_dir" && as_dir=.
27513    for ac_exec_ext in '' $ac_executable_extensions; do
27514  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27515    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27517    break 2
27518  fi
27519done
27520  done
27521IFS=$as_save_IFS
27522
27523fi
27524fi
27525OBJCOPY=$ac_cv_prog_OBJCOPY
27526if test -n "$OBJCOPY"; then
27527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27528$as_echo "$OBJCOPY" >&6; }
27529else
27530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27531$as_echo "no" >&6; }
27532fi
27533
27534
27535    test -n "$OBJCOPY" && break
27536  done
27537fi
27538if test -z "$OBJCOPY"; then
27539  ac_ct_OBJCOPY=$OBJCOPY
27540  for ac_prog in gobjcopy objcopy
27541do
27542  # Extract the first word of "$ac_prog", so it can be a program name with args.
27543set dummy $ac_prog; ac_word=$2
27544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27545$as_echo_n "checking for $ac_word... " >&6; }
27546if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27547  $as_echo_n "(cached) " >&6
27548else
27549  if test -n "$ac_ct_OBJCOPY"; then
27550  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27551else
27552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27553for as_dir in $PATH
27554do
27555  IFS=$as_save_IFS
27556  test -z "$as_dir" && as_dir=.
27557    for ac_exec_ext in '' $ac_executable_extensions; do
27558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27559    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27561    break 2
27562  fi
27563done
27564  done
27565IFS=$as_save_IFS
27566
27567fi
27568fi
27569ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27570if test -n "$ac_ct_OBJCOPY"; then
27571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27572$as_echo "$ac_ct_OBJCOPY" >&6; }
27573else
27574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27575$as_echo "no" >&6; }
27576fi
27577
27578
27579  test -n "$ac_ct_OBJCOPY" && break
27580done
27581
27582  if test "x$ac_ct_OBJCOPY" = x; then
27583    OBJCOPY=""
27584  else
27585    case $cross_compiling:$ac_tool_warned in
27586yes:)
27587{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27588$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27589ac_tool_warned=yes ;;
27590esac
27591    OBJCOPY=$ac_ct_OBJCOPY
27592  fi
27593fi
27594
27595    # Only call fixup if objcopy was found.
27596    if test -n "$OBJCOPY"; then
27597
27598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27599
27600  # First separate the path from the arguments. This will split at the first
27601  # space.
27602  complete="$OBJCOPY"
27603  path="${complete%% *}"
27604  tmp="$complete EOL"
27605  arguments="${tmp#* }"
27606
27607  # Input might be given as Windows format, start by converting to
27608  # unix format.
27609  new_path=`$CYGPATH -u "$path"`
27610
27611  # Now try to locate executable using which
27612  new_path=`$WHICH "$new_path" 2> /dev/null`
27613  # bat and cmd files are not always considered executable in cygwin causing which
27614  # to not find them
27615  if test "x$new_path" = x \
27616           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27617           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27618    new_path=`$CYGPATH -u "$path"`
27619  fi
27620  if test "x$new_path" = x; then
27621    # Oops. Which didn't find the executable.
27622    # The splitting of arguments from the executable at a space might have been incorrect,
27623    # since paths with space are more likely in Windows. Give it another try with the whole
27624    # argument.
27625    path="$complete"
27626    arguments="EOL"
27627    new_path=`$CYGPATH -u "$path"`
27628    new_path=`$WHICH "$new_path" 2> /dev/null`
27629    # bat and cmd files are not always considered executable in cygwin causing which
27630    # to not find them
27631    if test "x$new_path" = x \
27632             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27633             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27634      new_path=`$CYGPATH -u "$path"`
27635    fi
27636    if test "x$new_path" = x; then
27637      # It's still not found. Now this is an unrecoverable error.
27638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27639$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27640      has_space=`$ECHO "$complete" | $GREP " "`
27641      if test "x$has_space" != x; then
27642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27644      fi
27645      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27646    fi
27647  fi
27648
27649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27652  # "foo.exe" is OK but "foo" is an error.
27653  #
27654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27655  # It is also a way to make sure we got the proper file name for the real test later on.
27656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27657  if test "x$test_shortpath" = x; then
27658    # Short path failed, file does not exist as specified.
27659    # Try adding .exe or .cmd
27660    if test -f "${new_path}.exe"; then
27661       input_to_shortpath="${new_path}.exe"
27662    elif test -f "${new_path}.cmd"; then
27663       input_to_shortpath="${new_path}.cmd"
27664    else
27665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27666$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27669      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27670    fi
27671  else
27672    input_to_shortpath="$new_path"
27673  fi
27674
27675  # Call helper function which possibly converts this using DOS-style short mode.
27676  # If so, the updated path is stored in $new_path.
27677  new_path="$input_to_shortpath"
27678
27679  input_path="$input_to_shortpath"
27680  # Check if we need to convert this using DOS-style short mode. If the path
27681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27682  # take no chances and rewrite it.
27683  # Note: m4 eats our [], so we need to use [ and ] instead.
27684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27685  if test "x$has_forbidden_chars" != x; then
27686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27690      # Going to short mode and back again did indeed matter. Since short mode is
27691      # case insensitive, let's make it lowercase to improve readability.
27692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27693      # Now convert it back to Unix-stile (cygpath)
27694      input_path=`$CYGPATH -u "$shortmode_path"`
27695      new_path="$input_path"
27696    fi
27697  fi
27698
27699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27700  if test "x$test_cygdrive_prefix" = x; then
27701    # As a simple fix, exclude /usr/bin since it's not a real path.
27702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27704      # a path prefixed by /cygdrive for fixpath to work.
27705      new_path="$CYGWIN_ROOT_PATH$input_path"
27706    fi
27707  fi
27708
27709  # remove trailing .exe if any
27710  new_path="${new_path/%.exe/}"
27711
27712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27713
27714  # First separate the path from the arguments. This will split at the first
27715  # space.
27716  complete="$OBJCOPY"
27717  path="${complete%% *}"
27718  tmp="$complete EOL"
27719  arguments="${tmp#* }"
27720
27721  # Input might be given as Windows format, start by converting to
27722  # unix format.
27723  new_path="$path"
27724
27725  windows_path="$new_path"
27726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727    unix_path=`$CYGPATH -u "$windows_path"`
27728    new_path="$unix_path"
27729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27731    new_path="$unix_path"
27732  fi
27733
27734
27735  # Now try to locate executable using which
27736  new_path=`$WHICH "$new_path" 2> /dev/null`
27737
27738  if test "x$new_path" = x; then
27739    # Oops. Which didn't find the executable.
27740    # The splitting of arguments from the executable at a space might have been incorrect,
27741    # since paths with space are more likely in Windows. Give it another try with the whole
27742    # argument.
27743    path="$complete"
27744    arguments="EOL"
27745    new_path="$path"
27746
27747  windows_path="$new_path"
27748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27749    unix_path=`$CYGPATH -u "$windows_path"`
27750    new_path="$unix_path"
27751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27753    new_path="$unix_path"
27754  fi
27755
27756
27757    new_path=`$WHICH "$new_path" 2> /dev/null`
27758
27759    if test "x$new_path" = x; then
27760      # It's still not found. Now this is an unrecoverable error.
27761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27762$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27763      has_space=`$ECHO "$complete" | $GREP " "`
27764      if test "x$has_space" != x; then
27765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27767      fi
27768      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27769    fi
27770  fi
27771
27772  # Now new_path has a complete unix path to the binary
27773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27774    # Keep paths in /bin as-is, but remove trailing .exe if any
27775    new_path="${new_path/%.exe/}"
27776    # Do not save /bin paths to all_fixpath_prefixes!
27777  else
27778    # Not in mixed or Windows style, start by that.
27779    new_path=`cmd //c echo $new_path`
27780
27781  input_path="$new_path"
27782  # Check if we need to convert this using DOS-style short mode. If the path
27783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27784  # take no chances and rewrite it.
27785  # Note: m4 eats our [], so we need to use [ and ] instead.
27786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27787  if test "x$has_forbidden_chars" != x; then
27788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27790  fi
27791
27792    # Output is in $new_path
27793
27794  windows_path="$new_path"
27795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27796    unix_path=`$CYGPATH -u "$windows_path"`
27797    new_path="$unix_path"
27798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27800    new_path="$unix_path"
27801  fi
27802
27803    # remove trailing .exe if any
27804    new_path="${new_path/%.exe/}"
27805
27806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27808  fi
27809
27810  else
27811    # We're on a posix platform. Hooray! :)
27812    # First separate the path from the arguments. This will split at the first
27813    # space.
27814    complete="$OBJCOPY"
27815    path="${complete%% *}"
27816    tmp="$complete EOL"
27817    arguments="${tmp#* }"
27818
27819    # Cannot rely on the command "which" here since it doesn't always work.
27820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27821    if test -z "$is_absolute_path"; then
27822      # Path to executable is not absolute. Find it.
27823      IFS_save="$IFS"
27824      IFS=:
27825      for p in $PATH; do
27826        if test -f "$p/$path" && test -x "$p/$path"; then
27827          new_path="$p/$path"
27828          break
27829        fi
27830      done
27831      IFS="$IFS_save"
27832    else
27833      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27834$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27835      new_path="$path"
27836    fi
27837
27838    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
27844$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
27851      if test "x$arguments" != xEOL; then
27852        new_complete="$new_path ${arguments% *}"
27853      else
27854        new_complete="$new_path"
27855      fi
27856
27857  if test "x$complete" != "x$new_complete"; then
27858      OBJCOPY="$new_complete"
27859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27860$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27861    fi
27862
27863    fi
27864fi
27865
27866if test -n "$ac_tool_prefix"; then
27867  for ac_prog in gobjdump objdump
27868  do
27869    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27870set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27872$as_echo_n "checking for $ac_word... " >&6; }
27873if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27874  $as_echo_n "(cached) " >&6
27875else
27876  if test -n "$OBJDUMP"; then
27877  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27878else
27879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27880for as_dir in $PATH
27881do
27882  IFS=$as_save_IFS
27883  test -z "$as_dir" && as_dir=.
27884    for ac_exec_ext in '' $ac_executable_extensions; do
27885  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27886    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27888    break 2
27889  fi
27890done
27891  done
27892IFS=$as_save_IFS
27893
27894fi
27895fi
27896OBJDUMP=$ac_cv_prog_OBJDUMP
27897if test -n "$OBJDUMP"; then
27898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27899$as_echo "$OBJDUMP" >&6; }
27900else
27901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27902$as_echo "no" >&6; }
27903fi
27904
27905
27906    test -n "$OBJDUMP" && break
27907  done
27908fi
27909if test -z "$OBJDUMP"; then
27910  ac_ct_OBJDUMP=$OBJDUMP
27911  for ac_prog in gobjdump objdump
27912do
27913  # Extract the first word of "$ac_prog", so it can be a program name with args.
27914set dummy $ac_prog; ac_word=$2
27915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27916$as_echo_n "checking for $ac_word... " >&6; }
27917if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27918  $as_echo_n "(cached) " >&6
27919else
27920  if test -n "$ac_ct_OBJDUMP"; then
27921  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27922else
27923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27924for as_dir in $PATH
27925do
27926  IFS=$as_save_IFS
27927  test -z "$as_dir" && as_dir=.
27928    for ac_exec_ext in '' $ac_executable_extensions; do
27929  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27930    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27932    break 2
27933  fi
27934done
27935  done
27936IFS=$as_save_IFS
27937
27938fi
27939fi
27940ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27941if test -n "$ac_ct_OBJDUMP"; then
27942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27943$as_echo "$ac_ct_OBJDUMP" >&6; }
27944else
27945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27946$as_echo "no" >&6; }
27947fi
27948
27949
27950  test -n "$ac_ct_OBJDUMP" && break
27951done
27952
27953  if test "x$ac_ct_OBJDUMP" = x; then
27954    OBJDUMP=""
27955  else
27956    case $cross_compiling:$ac_tool_warned in
27957yes:)
27958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27960ac_tool_warned=yes ;;
27961esac
27962    OBJDUMP=$ac_ct_OBJDUMP
27963  fi
27964fi
27965
27966if test "x$OBJDUMP" != x; then
27967  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27968
27969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27970
27971  # First separate the path from the arguments. This will split at the first
27972  # space.
27973  complete="$OBJDUMP"
27974  path="${complete%% *}"
27975  tmp="$complete EOL"
27976  arguments="${tmp#* }"
27977
27978  # Input might be given as Windows format, start by converting to
27979  # unix format.
27980  new_path=`$CYGPATH -u "$path"`
27981
27982  # Now try to locate executable using which
27983  new_path=`$WHICH "$new_path" 2> /dev/null`
27984  # bat and cmd files are not always considered executable in cygwin causing which
27985  # to not find them
27986  if test "x$new_path" = x \
27987           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27988           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27989    new_path=`$CYGPATH -u "$path"`
27990  fi
27991  if test "x$new_path" = x; then
27992    # Oops. Which didn't find the executable.
27993    # The splitting of arguments from the executable at a space might have been incorrect,
27994    # since paths with space are more likely in Windows. Give it another try with the whole
27995    # argument.
27996    path="$complete"
27997    arguments="EOL"
27998    new_path=`$CYGPATH -u "$path"`
27999    new_path=`$WHICH "$new_path" 2> /dev/null`
28000    # bat and cmd files are not always considered executable in cygwin causing which
28001    # to not find them
28002    if test "x$new_path" = x \
28003             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28004             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28005      new_path=`$CYGPATH -u "$path"`
28006    fi
28007    if test "x$new_path" = x; then
28008      # It's still not found. Now this is an unrecoverable error.
28009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28010$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28011      has_space=`$ECHO "$complete" | $GREP " "`
28012      if test "x$has_space" != x; then
28013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28015      fi
28016      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28017    fi
28018  fi
28019
28020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28023  # "foo.exe" is OK but "foo" is an error.
28024  #
28025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28026  # It is also a way to make sure we got the proper file name for the real test later on.
28027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28028  if test "x$test_shortpath" = x; then
28029    # Short path failed, file does not exist as specified.
28030    # Try adding .exe or .cmd
28031    if test -f "${new_path}.exe"; then
28032       input_to_shortpath="${new_path}.exe"
28033    elif test -f "${new_path}.cmd"; then
28034       input_to_shortpath="${new_path}.cmd"
28035    else
28036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28037$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28040      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28041    fi
28042  else
28043    input_to_shortpath="$new_path"
28044  fi
28045
28046  # Call helper function which possibly converts this using DOS-style short mode.
28047  # If so, the updated path is stored in $new_path.
28048  new_path="$input_to_shortpath"
28049
28050  input_path="$input_to_shortpath"
28051  # Check if we need to convert this using DOS-style short mode. If the path
28052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28053  # take no chances and rewrite it.
28054  # Note: m4 eats our [], so we need to use [ and ] instead.
28055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28056  if test "x$has_forbidden_chars" != x; then
28057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28061      # Going to short mode and back again did indeed matter. Since short mode is
28062      # case insensitive, let's make it lowercase to improve readability.
28063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28064      # Now convert it back to Unix-stile (cygpath)
28065      input_path=`$CYGPATH -u "$shortmode_path"`
28066      new_path="$input_path"
28067    fi
28068  fi
28069
28070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28071  if test "x$test_cygdrive_prefix" = x; then
28072    # As a simple fix, exclude /usr/bin since it's not a real path.
28073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28075      # a path prefixed by /cygdrive for fixpath to work.
28076      new_path="$CYGWIN_ROOT_PATH$input_path"
28077    fi
28078  fi
28079
28080  # remove trailing .exe if any
28081  new_path="${new_path/%.exe/}"
28082
28083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28084
28085  # First separate the path from the arguments. This will split at the first
28086  # space.
28087  complete="$OBJDUMP"
28088  path="${complete%% *}"
28089  tmp="$complete EOL"
28090  arguments="${tmp#* }"
28091
28092  # Input might be given as Windows format, start by converting to
28093  # unix format.
28094  new_path="$path"
28095
28096  windows_path="$new_path"
28097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098    unix_path=`$CYGPATH -u "$windows_path"`
28099    new_path="$unix_path"
28100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28102    new_path="$unix_path"
28103  fi
28104
28105
28106  # Now try to locate executable using which
28107  new_path=`$WHICH "$new_path" 2> /dev/null`
28108
28109  if test "x$new_path" = x; then
28110    # Oops. Which didn't find the executable.
28111    # The splitting of arguments from the executable at a space might have been incorrect,
28112    # since paths with space are more likely in Windows. Give it another try with the whole
28113    # argument.
28114    path="$complete"
28115    arguments="EOL"
28116    new_path="$path"
28117
28118  windows_path="$new_path"
28119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28120    unix_path=`$CYGPATH -u "$windows_path"`
28121    new_path="$unix_path"
28122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28124    new_path="$unix_path"
28125  fi
28126
28127
28128    new_path=`$WHICH "$new_path" 2> /dev/null`
28129
28130    if test "x$new_path" = x; then
28131      # It's still not found. Now this is an unrecoverable error.
28132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28133$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28134      has_space=`$ECHO "$complete" | $GREP " "`
28135      if test "x$has_space" != x; then
28136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28138      fi
28139      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28140    fi
28141  fi
28142
28143  # Now new_path has a complete unix path to the binary
28144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28145    # Keep paths in /bin as-is, but remove trailing .exe if any
28146    new_path="${new_path/%.exe/}"
28147    # Do not save /bin paths to all_fixpath_prefixes!
28148  else
28149    # Not in mixed or Windows style, start by that.
28150    new_path=`cmd //c echo $new_path`
28151
28152  input_path="$new_path"
28153  # Check if we need to convert this using DOS-style short mode. If the path
28154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28155  # take no chances and rewrite it.
28156  # Note: m4 eats our [], so we need to use [ and ] instead.
28157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28158  if test "x$has_forbidden_chars" != x; then
28159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28161  fi
28162
28163    # Output is in $new_path
28164
28165  windows_path="$new_path"
28166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28167    unix_path=`$CYGPATH -u "$windows_path"`
28168    new_path="$unix_path"
28169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28171    new_path="$unix_path"
28172  fi
28173
28174    # remove trailing .exe if any
28175    new_path="${new_path/%.exe/}"
28176
28177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28179  fi
28180
28181  else
28182    # We're on a posix platform. Hooray! :)
28183    # First separate the path from the arguments. This will split at the first
28184    # space.
28185    complete="$OBJDUMP"
28186    path="${complete%% *}"
28187    tmp="$complete EOL"
28188    arguments="${tmp#* }"
28189
28190    # Cannot rely on the command "which" here since it doesn't always work.
28191    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28192    if test -z "$is_absolute_path"; then
28193      # Path to executable is not absolute. Find it.
28194      IFS_save="$IFS"
28195      IFS=:
28196      for p in $PATH; do
28197        if test -f "$p/$path" && test -x "$p/$path"; then
28198          new_path="$p/$path"
28199          break
28200        fi
28201      done
28202      IFS="$IFS_save"
28203    else
28204      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28205$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28206      new_path="$path"
28207    fi
28208
28209    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
28215$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
28222      if test "x$arguments" != xEOL; then
28223        new_complete="$new_path ${arguments% *}"
28224      else
28225        new_complete="$new_path"
28226      fi
28227
28228  if test "x$complete" != "x$new_complete"; then
28229      OBJDUMP="$new_complete"
28230      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28231$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28232    fi
28233
28234fi
28235
28236if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28237   # Extract the first word of "lipo", so it can be a program name with args.
28238set dummy lipo; ac_word=$2
28239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28240$as_echo_n "checking for $ac_word... " >&6; }
28241if test "${ac_cv_path_LIPO+set}" = set; then :
28242  $as_echo_n "(cached) " >&6
28243else
28244  case $LIPO in
28245  [\\/]* | ?:[\\/]*)
28246  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28247  ;;
28248  *)
28249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28250for as_dir in $PATH
28251do
28252  IFS=$as_save_IFS
28253  test -z "$as_dir" && as_dir=.
28254    for ac_exec_ext in '' $ac_executable_extensions; do
28255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28256    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28258    break 2
28259  fi
28260done
28261  done
28262IFS=$as_save_IFS
28263
28264  ;;
28265esac
28266fi
28267LIPO=$ac_cv_path_LIPO
28268if test -n "$LIPO"; then
28269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28270$as_echo "$LIPO" >&6; }
28271else
28272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28273$as_echo "no" >&6; }
28274fi
28275
28276
28277
28278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28279
28280  # First separate the path from the arguments. This will split at the first
28281  # space.
28282  complete="$LIPO"
28283  path="${complete%% *}"
28284  tmp="$complete EOL"
28285  arguments="${tmp#* }"
28286
28287  # Input might be given as Windows format, start by converting to
28288  # unix format.
28289  new_path=`$CYGPATH -u "$path"`
28290
28291  # Now try to locate executable using which
28292  new_path=`$WHICH "$new_path" 2> /dev/null`
28293  # bat and cmd files are not always considered executable in cygwin causing which
28294  # to not find them
28295  if test "x$new_path" = x \
28296           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28297           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28298    new_path=`$CYGPATH -u "$path"`
28299  fi
28300  if test "x$new_path" = x; then
28301    # Oops. Which didn't find the executable.
28302    # The splitting of arguments from the executable at a space might have been incorrect,
28303    # since paths with space are more likely in Windows. Give it another try with the whole
28304    # argument.
28305    path="$complete"
28306    arguments="EOL"
28307    new_path=`$CYGPATH -u "$path"`
28308    new_path=`$WHICH "$new_path" 2> /dev/null`
28309    # bat and cmd files are not always considered executable in cygwin causing which
28310    # to not find them
28311    if test "x$new_path" = x \
28312             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28313             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28314      new_path=`$CYGPATH -u "$path"`
28315    fi
28316    if test "x$new_path" = x; then
28317      # It's still not found. Now this is an unrecoverable error.
28318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28319$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28320      has_space=`$ECHO "$complete" | $GREP " "`
28321      if test "x$has_space" != x; then
28322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28324      fi
28325      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28326    fi
28327  fi
28328
28329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28332  # "foo.exe" is OK but "foo" is an error.
28333  #
28334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28335  # It is also a way to make sure we got the proper file name for the real test later on.
28336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28337  if test "x$test_shortpath" = x; then
28338    # Short path failed, file does not exist as specified.
28339    # Try adding .exe or .cmd
28340    if test -f "${new_path}.exe"; then
28341       input_to_shortpath="${new_path}.exe"
28342    elif test -f "${new_path}.cmd"; then
28343       input_to_shortpath="${new_path}.cmd"
28344    else
28345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28346$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28349      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28350    fi
28351  else
28352    input_to_shortpath="$new_path"
28353  fi
28354
28355  # Call helper function which possibly converts this using DOS-style short mode.
28356  # If so, the updated path is stored in $new_path.
28357  new_path="$input_to_shortpath"
28358
28359  input_path="$input_to_shortpath"
28360  # Check if we need to convert this using DOS-style short mode. If the path
28361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28362  # take no chances and rewrite it.
28363  # Note: m4 eats our [], so we need to use [ and ] instead.
28364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28365  if test "x$has_forbidden_chars" != x; then
28366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28370      # Going to short mode and back again did indeed matter. Since short mode is
28371      # case insensitive, let's make it lowercase to improve readability.
28372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28373      # Now convert it back to Unix-stile (cygpath)
28374      input_path=`$CYGPATH -u "$shortmode_path"`
28375      new_path="$input_path"
28376    fi
28377  fi
28378
28379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28380  if test "x$test_cygdrive_prefix" = x; then
28381    # As a simple fix, exclude /usr/bin since it's not a real path.
28382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28384      # a path prefixed by /cygdrive for fixpath to work.
28385      new_path="$CYGWIN_ROOT_PATH$input_path"
28386    fi
28387  fi
28388
28389  # remove trailing .exe if any
28390  new_path="${new_path/%.exe/}"
28391
28392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28393
28394  # First separate the path from the arguments. This will split at the first
28395  # space.
28396  complete="$LIPO"
28397  path="${complete%% *}"
28398  tmp="$complete EOL"
28399  arguments="${tmp#* }"
28400
28401  # Input might be given as Windows format, start by converting to
28402  # unix format.
28403  new_path="$path"
28404
28405  windows_path="$new_path"
28406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28407    unix_path=`$CYGPATH -u "$windows_path"`
28408    new_path="$unix_path"
28409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28411    new_path="$unix_path"
28412  fi
28413
28414
28415  # Now try to locate executable using which
28416  new_path=`$WHICH "$new_path" 2> /dev/null`
28417
28418  if test "x$new_path" = x; then
28419    # Oops. Which didn't find the executable.
28420    # The splitting of arguments from the executable at a space might have been incorrect,
28421    # since paths with space are more likely in Windows. Give it another try with the whole
28422    # argument.
28423    path="$complete"
28424    arguments="EOL"
28425    new_path="$path"
28426
28427  windows_path="$new_path"
28428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28429    unix_path=`$CYGPATH -u "$windows_path"`
28430    new_path="$unix_path"
28431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28433    new_path="$unix_path"
28434  fi
28435
28436
28437    new_path=`$WHICH "$new_path" 2> /dev/null`
28438
28439    if test "x$new_path" = x; then
28440      # It's still not found. Now this is an unrecoverable error.
28441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28442$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28443      has_space=`$ECHO "$complete" | $GREP " "`
28444      if test "x$has_space" != x; then
28445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28447      fi
28448      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28449    fi
28450  fi
28451
28452  # Now new_path has a complete unix path to the binary
28453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28454    # Keep paths in /bin as-is, but remove trailing .exe if any
28455    new_path="${new_path/%.exe/}"
28456    # Do not save /bin paths to all_fixpath_prefixes!
28457  else
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $new_path`
28460
28461  input_path="$new_path"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28470  fi
28471
28472    # Output is in $new_path
28473
28474  windows_path="$new_path"
28475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476    unix_path=`$CYGPATH -u "$windows_path"`
28477    new_path="$unix_path"
28478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28480    new_path="$unix_path"
28481  fi
28482
28483    # remove trailing .exe if any
28484    new_path="${new_path/%.exe/}"
28485
28486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28488  fi
28489
28490  else
28491    # We're on a posix platform. Hooray! :)
28492    # First separate the path from the arguments. This will split at the first
28493    # space.
28494    complete="$LIPO"
28495    path="${complete%% *}"
28496    tmp="$complete EOL"
28497    arguments="${tmp#* }"
28498
28499    # Cannot rely on the command "which" here since it doesn't always work.
28500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28501    if test -z "$is_absolute_path"; then
28502      # Path to executable is not absolute. Find it.
28503      IFS_save="$IFS"
28504      IFS=:
28505      for p in $PATH; do
28506        if test -f "$p/$path" && test -x "$p/$path"; then
28507          new_path="$p/$path"
28508          break
28509        fi
28510      done
28511      IFS="$IFS_save"
28512    else
28513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28514$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28515      new_path="$path"
28516    fi
28517
28518    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
28524$as_echo "$as_me: This might be caused by spaces in the path, 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      # Now join together the path and the arguments once again
28531      if test "x$arguments" != xEOL; then
28532        new_complete="$new_path ${arguments% *}"
28533      else
28534        new_complete="$new_path"
28535      fi
28536
28537  if test "x$complete" != "x$new_complete"; then
28538      LIPO="$new_complete"
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28540$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28541    fi
28542
28543fi
28544
28545
28546
28547# Restore old path without tools dir
28548PATH="$OLD_PATH"
28549
28550
28551# FIXME: Currently we must test this after paths but before flags. Fix!
28552
28553# And we can test some aspects on the target using configure macros.
28554
28555
28556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28557$as_echo_n "checking for ANSI C header files... " >&6; }
28558if test "${ac_cv_header_stdc+set}" = set; then :
28559  $as_echo_n "(cached) " >&6
28560else
28561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28562/* end confdefs.h.  */
28563#include <stdlib.h>
28564#include <stdarg.h>
28565#include <string.h>
28566#include <float.h>
28567
28568int
28569main ()
28570{
28571
28572  ;
28573  return 0;
28574}
28575_ACEOF
28576if ac_fn_cxx_try_compile "$LINENO"; then :
28577  ac_cv_header_stdc=yes
28578else
28579  ac_cv_header_stdc=no
28580fi
28581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28582
28583if test $ac_cv_header_stdc = yes; then
28584  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28586/* end confdefs.h.  */
28587#include <string.h>
28588
28589_ACEOF
28590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28591  $EGREP "memchr" >/dev/null 2>&1; then :
28592
28593else
28594  ac_cv_header_stdc=no
28595fi
28596rm -f conftest*
28597
28598fi
28599
28600if test $ac_cv_header_stdc = yes; then
28601  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28603/* end confdefs.h.  */
28604#include <stdlib.h>
28605
28606_ACEOF
28607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28608  $EGREP "free" >/dev/null 2>&1; then :
28609
28610else
28611  ac_cv_header_stdc=no
28612fi
28613rm -f conftest*
28614
28615fi
28616
28617if test $ac_cv_header_stdc = yes; then
28618  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28619  if test "$cross_compiling" = yes; then :
28620  :
28621else
28622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28623/* end confdefs.h.  */
28624#include <ctype.h>
28625#include <stdlib.h>
28626#if ((' ' & 0x0FF) == 0x020)
28627# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28628# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28629#else
28630# define ISLOWER(c) \
28631		   (('a' <= (c) && (c) <= 'i') \
28632		     || ('j' <= (c) && (c) <= 'r') \
28633		     || ('s' <= (c) && (c) <= 'z'))
28634# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28635#endif
28636
28637#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28638int
28639main ()
28640{
28641  int i;
28642  for (i = 0; i < 256; i++)
28643    if (XOR (islower (i), ISLOWER (i))
28644	|| toupper (i) != TOUPPER (i))
28645      return 2;
28646  return 0;
28647}
28648_ACEOF
28649if ac_fn_cxx_try_run "$LINENO"; then :
28650
28651else
28652  ac_cv_header_stdc=no
28653fi
28654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28655  conftest.$ac_objext conftest.beam conftest.$ac_ext
28656fi
28657
28658fi
28659fi
28660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28661$as_echo "$ac_cv_header_stdc" >&6; }
28662if test $ac_cv_header_stdc = yes; then
28663
28664$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28665
28666fi
28667
28668# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28669for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28670		  inttypes.h stdint.h unistd.h
28671do :
28672  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28673ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28674"
28675if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28676  cat >>confdefs.h <<_ACEOF
28677#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28678_ACEOF
28679
28680fi
28681
28682done
28683
28684
28685
28686###############################################################################
28687#
28688# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28689# (The JVM can use 32 or 64 bit Java pointers but that decision
28690# is made at runtime.)
28691#
28692
28693if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28694  # Always specify -m flags on Solaris
28695
28696  # keep track of c/cxx flags that we added outselves...
28697  #   to prevent emitting warning...
28698  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28699  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28700  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28701
28702  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28703  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28704  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28705
28706  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28707  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28708  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28709
28710elif test "x$COMPILE_TYPE" = xreduced; then
28711  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28712    # Specify -m if running reduced on other Posix platforms
28713
28714  # keep track of c/cxx flags that we added outselves...
28715  #   to prevent emitting warning...
28716  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28717  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28718  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28719
28720  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28721  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28722  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28723
28724  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28725  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28726  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28727
28728  fi
28729fi
28730
28731# Make compilation sanity check
28732for ac_header in stdio.h
28733do :
28734  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28735if test "x$ac_cv_header_stdio_h" = x""yes; then :
28736  cat >>confdefs.h <<_ACEOF
28737#define HAVE_STDIO_H 1
28738_ACEOF
28739
28740else
28741
28742  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28743$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28744  if test "x$COMPILE_TYPE" = xreduced; then
28745    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28746$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28747  elif test "x$COMPILE_TYPE" = xcross; then
28748    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28749$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28750  fi
28751  as_fn_error $? "Cannot continue." "$LINENO" 5
28752
28753fi
28754
28755done
28756
28757
28758# The cast to long int works around a bug in the HP C Compiler
28759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28761# This bug is HP SR number 8606223364.
28762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28763$as_echo_n "checking size of int *... " >&6; }
28764if test "${ac_cv_sizeof_int_p+set}" = set; then :
28765  $as_echo_n "(cached) " >&6
28766else
28767  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28768
28769else
28770  if test "$ac_cv_type_int_p" = yes; then
28771     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28773as_fn_error 77 "cannot compute sizeof (int *)
28774See \`config.log' for more details" "$LINENO" 5; }
28775   else
28776     ac_cv_sizeof_int_p=0
28777   fi
28778fi
28779
28780fi
28781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28782$as_echo "$ac_cv_sizeof_int_p" >&6; }
28783
28784
28785
28786cat >>confdefs.h <<_ACEOF
28787#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28788_ACEOF
28789
28790
28791
28792if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28793  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28794  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28795fi
28796
28797if test "x$SIZEOF_INT_P" = x; then
28798    # The test failed, lets stick to the assumed value.
28799    { $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
28800$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28801else
28802    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28803
28804    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28805        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
28806    fi
28807fi
28808
28809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28810$as_echo_n "checking for target address size... " >&6; }
28811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28812$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28813
28814
28815###############################################################################
28816#
28817# Is the target little of big endian?
28818#
28819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28820$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28821if test "${ac_cv_c_bigendian+set}" = set; then :
28822  $as_echo_n "(cached) " >&6
28823else
28824  ac_cv_c_bigendian=unknown
28825    # See if we're dealing with a universal compiler.
28826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827/* end confdefs.h.  */
28828#ifndef __APPLE_CC__
28829	       not a universal capable compiler
28830	     #endif
28831	     typedef int dummy;
28832
28833_ACEOF
28834if ac_fn_cxx_try_compile "$LINENO"; then :
28835
28836	# Check for potential -arch flags.  It is not universal unless
28837	# there are at least two -arch flags with different values.
28838	ac_arch=
28839	ac_prev=
28840	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28841	 if test -n "$ac_prev"; then
28842	   case $ac_word in
28843	     i?86 | x86_64 | ppc | ppc64)
28844	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28845		 ac_arch=$ac_word
28846	       else
28847		 ac_cv_c_bigendian=universal
28848		 break
28849	       fi
28850	       ;;
28851	   esac
28852	   ac_prev=
28853	 elif test "x$ac_word" = "x-arch"; then
28854	   ac_prev=arch
28855	 fi
28856       done
28857fi
28858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28859    if test $ac_cv_c_bigendian = unknown; then
28860      # See if sys/param.h defines the BYTE_ORDER macro.
28861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28862/* end confdefs.h.  */
28863#include <sys/types.h>
28864	     #include <sys/param.h>
28865
28866int
28867main ()
28868{
28869#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28870		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28871		     && LITTLE_ENDIAN)
28872	      bogus endian macros
28873	     #endif
28874
28875  ;
28876  return 0;
28877}
28878_ACEOF
28879if ac_fn_cxx_try_compile "$LINENO"; then :
28880  # It does; now see whether it defined to BIG_ENDIAN or not.
28881	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28882/* end confdefs.h.  */
28883#include <sys/types.h>
28884		#include <sys/param.h>
28885
28886int
28887main ()
28888{
28889#if BYTE_ORDER != BIG_ENDIAN
28890		 not big endian
28891		#endif
28892
28893  ;
28894  return 0;
28895}
28896_ACEOF
28897if ac_fn_cxx_try_compile "$LINENO"; then :
28898  ac_cv_c_bigendian=yes
28899else
28900  ac_cv_c_bigendian=no
28901fi
28902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28903fi
28904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28905    fi
28906    if test $ac_cv_c_bigendian = unknown; then
28907      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28908      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28909/* end confdefs.h.  */
28910#include <limits.h>
28911
28912int
28913main ()
28914{
28915#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28916	      bogus endian macros
28917	     #endif
28918
28919  ;
28920  return 0;
28921}
28922_ACEOF
28923if ac_fn_cxx_try_compile "$LINENO"; then :
28924  # It does; now see whether it defined to _BIG_ENDIAN or not.
28925	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28926/* end confdefs.h.  */
28927#include <limits.h>
28928
28929int
28930main ()
28931{
28932#ifndef _BIG_ENDIAN
28933		 not big endian
28934		#endif
28935
28936  ;
28937  return 0;
28938}
28939_ACEOF
28940if ac_fn_cxx_try_compile "$LINENO"; then :
28941  ac_cv_c_bigendian=yes
28942else
28943  ac_cv_c_bigendian=no
28944fi
28945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28946fi
28947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28948    fi
28949    if test $ac_cv_c_bigendian = unknown; then
28950      # Compile a test program.
28951      if test "$cross_compiling" = yes; then :
28952  # Try to guess by grepping values from an object file.
28953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28954/* end confdefs.h.  */
28955short int ascii_mm[] =
28956		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28957		short int ascii_ii[] =
28958		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28959		int use_ascii (int i) {
28960		  return ascii_mm[i] + ascii_ii[i];
28961		}
28962		short int ebcdic_ii[] =
28963		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28964		short int ebcdic_mm[] =
28965		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28966		int use_ebcdic (int i) {
28967		  return ebcdic_mm[i] + ebcdic_ii[i];
28968		}
28969		extern int foo;
28970
28971int
28972main ()
28973{
28974return use_ascii (foo) == use_ebcdic (foo);
28975  ;
28976  return 0;
28977}
28978_ACEOF
28979if ac_fn_cxx_try_compile "$LINENO"; then :
28980  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28981	      ac_cv_c_bigendian=yes
28982	    fi
28983	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28984	      if test "$ac_cv_c_bigendian" = unknown; then
28985		ac_cv_c_bigendian=no
28986	      else
28987		# finding both strings is unlikely to happen, but who knows?
28988		ac_cv_c_bigendian=unknown
28989	      fi
28990	    fi
28991fi
28992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28993else
28994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28995/* end confdefs.h.  */
28996$ac_includes_default
28997int
28998main ()
28999{
29000
29001	     /* Are we little or big endian?  From Harbison&Steele.  */
29002	     union
29003	     {
29004	       long int l;
29005	       char c[sizeof (long int)];
29006	     } u;
29007	     u.l = 1;
29008	     return u.c[sizeof (long int) - 1] == 1;
29009
29010  ;
29011  return 0;
29012}
29013_ACEOF
29014if ac_fn_cxx_try_run "$LINENO"; then :
29015  ac_cv_c_bigendian=no
29016else
29017  ac_cv_c_bigendian=yes
29018fi
29019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29020  conftest.$ac_objext conftest.beam conftest.$ac_ext
29021fi
29022
29023    fi
29024fi
29025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29026$as_echo "$ac_cv_c_bigendian" >&6; }
29027 case $ac_cv_c_bigendian in #(
29028   yes)
29029     ENDIAN="big";; #(
29030   no)
29031     ENDIAN="little" ;; #(
29032   universal)
29033     ENDIAN="universal_endianness"
29034     ;; #(
29035   *)
29036     ENDIAN="unknown" ;;
29037 esac
29038
29039
29040if test "x$ENDIAN" = xuniversal_endianness; then
29041    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29042fi
29043if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29044    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
29045fi
29046
29047
29048# Configure flags for the tools
29049
29050
29051###############################################################################
29052#
29053# How to compile shared libraries.
29054#
29055
29056if test "x$GCC" = xyes; then
29057    COMPILER_NAME=gcc
29058    PICFLAG="-fPIC"
29059    LIBRARY_PREFIX=lib
29060    SHARED_LIBRARY='lib$1.so'
29061    STATIC_LIBRARY='lib$1.a'
29062    SHARED_LIBRARY_FLAGS="-shared"
29063    SHARED_LIBRARY_SUFFIX='.so'
29064    STATIC_LIBRARY_SUFFIX='.a'
29065    OBJ_SUFFIX='.o'
29066    EXE_SUFFIX=''
29067    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29068    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29069    C_FLAG_REORDER=''
29070    CXX_FLAG_REORDER=''
29071    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29072    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29073    LD="$CC"
29074    LDEXE="$CC"
29075    LDCXX="$CXX"
29076    LDEXECXX="$CXX"
29077    POST_STRIP_CMD="$STRIP -g"
29078
29079    # Linking is different on MacOSX
29080    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29081        # Might change in the future to clang.
29082        COMPILER_NAME=gcc
29083        SHARED_LIBRARY='lib$1.dylib'
29084        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29085        SHARED_LIBRARY_SUFFIX='.dylib'
29086        EXE_SUFFIX=''
29087        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29088        SET_SHARED_LIBRARY_MAPFILE=''
29089        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29090        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29091        POST_STRIP_CMD="$STRIP -S"
29092    fi
29093else
29094    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29095        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29096        COMPILER_NAME=ossc
29097        PICFLAG="-KPIC"
29098        LIBRARY_PREFIX=lib
29099        SHARED_LIBRARY='lib$1.so'
29100        STATIC_LIBRARY='lib$1.a'
29101        SHARED_LIBRARY_FLAGS="-G"
29102        SHARED_LIBRARY_SUFFIX='.so'
29103        STATIC_LIBRARY_SUFFIX='.a'
29104        OBJ_SUFFIX='.o'
29105        EXE_SUFFIX=''
29106        SET_SHARED_LIBRARY_NAME=''
29107        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29108	C_FLAG_REORDER='-xF'
29109	CXX_FLAG_REORDER='-xF'
29110        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29111        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29112        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29113        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29114        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29115        POST_STRIP_CMD="$STRIP -x"
29116        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29117    fi
29118    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29119        # If it is not gcc, then assume it is the MS Visual Studio compiler
29120        COMPILER_NAME=cl
29121        PICFLAG=""
29122        LIBRARY_PREFIX=
29123        SHARED_LIBRARY='$1.dll'
29124        STATIC_LIBRARY='$1.lib'
29125        SHARED_LIBRARY_FLAGS="-LD"
29126        SHARED_LIBRARY_SUFFIX='.dll'
29127        STATIC_LIBRARY_SUFFIX='.lib'
29128        OBJ_SUFFIX='.obj'
29129        EXE_SUFFIX='.exe'
29130        SET_SHARED_LIBRARY_NAME=''
29131        SET_SHARED_LIBRARY_MAPFILE=''
29132        SET_SHARED_LIBRARY_ORIGIN=''
29133        SET_EXECUTABLE_ORIGIN=''
29134    fi
29135fi
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155# The (cross) compiler is now configured, we can now test capabilities
29156# of the target platform.
29157
29158
29159
29160###############################################################################
29161#
29162# Setup the opt flags for different compilers
29163# and different operating systems.
29164#
29165
29166#
29167# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29168#
29169if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29170    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29171    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29172    CFLAGS="$CFLAGS -mstackrealign"
29173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29174$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29175    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29176/* end confdefs.h.  */
29177int main() { return 0; }
29178_ACEOF
29179if ac_fn_cxx_try_link "$LINENO"; then :
29180
29181		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29182$as_echo "yes" >&6; }
29183
29184else
29185
29186		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29187$as_echo "no" >&6; }
29188	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29189
29190fi
29191rm -f core conftest.err conftest.$ac_objext \
29192    conftest$ac_exeext conftest.$ac_ext
29193fi
29194
29195C_FLAG_DEPS="-MMD -MF"
29196CXX_FLAG_DEPS="-MMD -MF"
29197
29198case $COMPILER_TYPE in
29199  CC )
29200    case $COMPILER_NAME in
29201      gcc )
29202      	case $OPENJDK_TARGET_OS in
29203	  macosx )
29204	    # On MacOSX we optimize for size, something
29205	    # we should do for all platforms?
29206	    C_O_FLAG_HI="-Os"
29207	    C_O_FLAG_NORM="-Os"
29208	    C_O_FLAG_NONE=""
29209	    ;;
29210	  *)
29211	    C_O_FLAG_HI="-O3"
29212	    C_O_FLAG_NORM="-O2"
29213	    C_O_FLAG_NONE="-O0"
29214	    ;;
29215	esac
29216        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29217        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29218        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29219        CFLAGS_DEBUG_SYMBOLS="-g"
29220        CXXFLAGS_DEBUG_SYMBOLS="-g"
29221        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29222            CFLAGS_DEBUG_SYMBOLS="-g1"
29223            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29224        fi
29225        ;;
29226      ossc )
29227        #
29228        # Forte has different names for this with their C++ compiler...
29229        #
29230        C_FLAG_DEPS="-xMMD -xMF"
29231        CXX_FLAG_DEPS="-xMMD -xMF"
29232
29233        # Extra options used with HIGHEST
29234        #
29235        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29236        #          done with care, there are some assumptions below that need to
29237        #          be understood about the use of pointers, and IEEE behavior.
29238        #
29239        # Use non-standard floating point mode (not IEEE 754)
29240        CC_HIGHEST="$CC_HIGHEST -fns"
29241        # Do some simplification of floating point arithmetic (not IEEE 754)
29242        CC_HIGHEST="$CC_HIGHEST -fsimple"
29243        # Use single precision floating point with 'float'
29244        CC_HIGHEST="$CC_HIGHEST -fsingle"
29245        # Assume memory references via basic pointer types do not alias
29246        #   (Source with excessing pointer casting and data access with mixed
29247        #    pointer types are not recommended)
29248        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29249        # Use intrinsic or inline versions for math/std functions
29250        #   (If you expect perfect errno behavior, do not use this)
29251        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29252        # Loop data dependency optimizations (need -xO3 or higher)
29253        CC_HIGHEST="$CC_HIGHEST -xdepend"
29254        # Pointer parameters to functions do not overlap
29255        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29256        #    If you pass in multiple pointers to the same data, do not use this)
29257        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29258        # Inline some library routines
29259        #   (If you expect perfect errno behavior, do not use this)
29260        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29261        # Use optimized math routines
29262        #   (If you expect perfect errno behavior, do not use this)
29263        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29264        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29265
29266        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29267          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29268          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29269        fi
29270
29271        case $OPENJDK_TARGET_CPU_ARCH in
29272          x86)
29273            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29274            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29275            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29276            C_O_FLAG_NONE="-xregs=no%frameptr"
29277            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29278            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29279            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29280            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29281            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29282               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29283               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29284            fi
29285            ;;
29286          sparc)
29287            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29288            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29289            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29290            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29291            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29292            C_O_FLAG_NONE=""
29293            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29294            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29295            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29296            CXX_O_FLAG_NONE=""
29297            ;;
29298        esac
29299
29300    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29301    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29302    esac
29303    ;;
29304  CL )
29305    C_O_FLAG_HIGHEST="-O2"
29306    C_O_FLAG_HI="-O1"
29307    C_O_FLAG_NORM="-O1"
29308    C_O_FLAG_NONE="-Od"
29309    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29310    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29311    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29312    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29313    ;;
29314esac
29315
29316if test -z "$C_O_FLAG_HIGHEST"; then
29317   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29318fi
29319
29320if test -z "$CXX_O_FLAG_HIGHEST"; then
29321   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29322fi
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29338   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29339$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29340fi
29341
29342if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29343   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29344$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29345fi
29346
29347if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29348   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29349$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29350fi
29351
29352
29353# Check whether --with-extra-cflags was given.
29354if test "${with_extra_cflags+set}" = set; then :
29355  withval=$with_extra_cflags;
29356fi
29357
29358
29359
29360# Check whether --with-extra-cxxflags was given.
29361if test "${with_extra_cxxflags+set}" = set; then :
29362  withval=$with_extra_cxxflags;
29363fi
29364
29365
29366
29367# Check whether --with-extra-ldflags was given.
29368if test "${with_extra_ldflags+set}" = set; then :
29369  withval=$with_extra_ldflags;
29370fi
29371
29372
29373CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29374CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29375LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29376
29377# Hotspot needs these set in their legacy form
29378LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29379LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29380LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29381
29382
29383
29384
29385
29386###############################################################################
29387#
29388# Now setup the CFLAGS and LDFLAGS for the JDK build.
29389# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29390#
29391case $COMPILER_NAME in
29392      gcc )
29393      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29394                          -pipe \
29395                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29396	  case $OPENJDK_TARGET_CPU_ARCH in
29397	  arm )
29398            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29399	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29400	  ;;
29401	  ppc )
29402            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29403	  ;;
29404	  * )
29405	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29406	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29407          ;;
29408	  esac
29409          ;;
29410      ossc )
29411          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29412          case $OPENJDK_TARGET_CPU_ARCH in
29413          x86 )
29414            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29415       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29416          ;;
29417          esac
29418
29419      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29420      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29421
29422          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29423          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29424          ;;
29425      cl )
29426          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29427               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29428	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29429	       -DWIN32 -DIAL"
29430          case $OPENJDK_TARGET_CPU in
29431              x86 )
29432                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29433                  ;;
29434              x86_64 )
29435                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29436                  ;;
29437          esac
29438          ;;
29439esac
29440
29441###############################################################################
29442
29443# Adjust flags according to debug level.
29444case $DEBUG_LEVEL in
29445      fastdebug )
29446              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29447              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29448	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29449	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29450	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29451	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29452              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29453              ;;
29454      slowdebug )
29455              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29456              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29457	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29458	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29459	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29460	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29461              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29462              ;;
29463esac
29464
29465CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29466
29467# The package path is used only on macosx?
29468PACKAGE_PATH=/opt/local
29469
29470
29471if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29472    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29473    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29474    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29475    #   Note: -Dmacro         is the same as    #define macro 1
29476    #         -Dmacro=	    is the same as    #define macro
29477    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29478        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29479    else
29480        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29481    fi
29482else
29483    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29484fi
29485if test "x$OPENJDK_TARGET_OS" = xlinux; then
29486    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29487fi
29488if test "x$OPENJDK_TARGET_OS" = xwindows; then
29489    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29490fi
29491if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29492    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29493fi
29494if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29495    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29496    # Setting these parameters makes it an error to link to macosx APIs that are
29497    # newer than the given OS version and makes the linked binaries compatible even
29498    # if built on a newer version of the OS.
29499    # The expected format is X.Y.Z
29500    MACOSX_VERSION_MIN=10.7.0
29501
29502    # The macro takes the version with no dots, ex: 1070
29503    # Let the flags variables get resolved in make for easier override on make
29504    # command line.
29505    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29506    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29507fi
29508if test "x$OPENJDK_TARGET_OS" = xbsd; then
29509    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29510fi
29511if test "x$DEBUG_LEVEL" = xrelease; then
29512    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29513    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29514        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29515    fi
29516else
29517    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29518fi
29519
29520CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29521CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29522
29523CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29524        -I${JDK_OUTPUTDIR}/include \
29525        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29526        -I${JDK_TOPDIR}/src/share/javavm/export \
29527        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29528        -I${JDK_TOPDIR}/src/share/native/common \
29529        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29530
29531# The shared libraries are compiled using the picflag.
29532CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29533CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29534
29535# Executable flags
29536CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29537CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29538
29539# Now this is odd. The JDK native libraries have to link against libjvm.so
29540# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29541# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29542# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29543# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29544# libraries will link to whatever is in memory. Yuck.
29545#
29546# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29547if test "x$COMPILER_NAME" = xcl; then
29548    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29549    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29550        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29551    fi
29552    # TODO: make -debug optional "--disable-full-debug-symbols"
29553    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29554    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29555    LDFLAGS_JDKLIB_SUFFIX=""
29556    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29557        LDFLAGS_STACK_SIZE=1048576
29558    else
29559        LDFLAGS_STACK_SIZE=327680
29560    fi
29561    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29562else
29563    if test "x$COMPILER_NAME" = xgcc; then
29564        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29565        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29566        if test -n "$HAS_GNU_HASH"; then
29567            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29568        fi
29569        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29570          # And since we now know that the linker is gnu, then add -z defs, to forbid
29571          # undefined symbols in object files.
29572          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29573          if test "x$DEBUG_LEVEL" = "xrelease"; then
29574              # When building release libraries, tell the linker optimize them.
29575              # Should this be supplied to the OSS linker as well?
29576              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29577          fi
29578        fi
29579    fi
29580    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29581                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29582
29583    # On some platforms (mac) the linker warns about non existing -L dirs.
29584    # Add server first if available. Linking aginst client does not always produce the same results.
29585    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29586    # Default to server for other variants.
29587    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29588        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29589    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29590        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29591    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29592        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29593    else
29594        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29595    fi
29596
29597    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29598    if test "x$COMPILER_NAME" = xossc; then
29599        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29600    fi
29601
29602    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29603    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29604        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29605    fi
29606fi
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622  # Some Zero and Shark settings.
29623  # ZERO_ARCHFLAG tells the compiler which mode to build for
29624  case "${OPENJDK_TARGET_CPU}" in
29625    s390)
29626      ZERO_ARCHFLAG="-m31"
29627      ;;
29628    *)
29629      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29630  esac
29631
29632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29633$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29634  supports=yes
29635
29636  saved_cflags="$CFLAGS"
29637  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29638  ac_ext=c
29639ac_cpp='$CPP $CPPFLAGS'
29640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29642ac_compiler_gnu=$ac_cv_c_compiler_gnu
29643
29644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29645/* end confdefs.h.  */
29646
29647    int i;
29648
29649_ACEOF
29650if ac_fn_c_try_compile "$LINENO"; then :
29651
29652else
29653  supports=no
29654fi
29655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29656  ac_ext=cpp
29657ac_cpp='$CXXCPP $CPPFLAGS'
29658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29661
29662  CFLAGS="$saved_cflags"
29663
29664  saved_cxxflags="$CXXFLAGS"
29665  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29666  ac_ext=cpp
29667ac_cpp='$CXXCPP $CPPFLAGS'
29668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29671
29672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29673/* end confdefs.h.  */
29674
29675    int i;
29676
29677_ACEOF
29678if ac_fn_cxx_try_compile "$LINENO"; then :
29679
29680else
29681  supports=no
29682fi
29683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29684  ac_ext=cpp
29685ac_cpp='$CXXCPP $CPPFLAGS'
29686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29689
29690  CXXFLAGS="$saved_cxxflags"
29691
29692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29693$as_echo "$supports" >&6; }
29694  if test "x$supports" = "xyes" ; then
29695    :
29696  else
29697    ZERO_ARCHFLAG=""
29698  fi
29699
29700
29701
29702  # Check that the compiler supports -mX flags
29703  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29704
29705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29706$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29707  supports=yes
29708
29709  saved_cflags="$CFLAGS"
29710  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29711  ac_ext=c
29712ac_cpp='$CPP $CPPFLAGS'
29713ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29714ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29715ac_compiler_gnu=$ac_cv_c_compiler_gnu
29716
29717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29718/* end confdefs.h.  */
29719
29720    int i;
29721
29722_ACEOF
29723if ac_fn_c_try_compile "$LINENO"; then :
29724
29725else
29726  supports=no
29727fi
29728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29729  ac_ext=cpp
29730ac_cpp='$CXXCPP $CPPFLAGS'
29731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29734
29735  CFLAGS="$saved_cflags"
29736
29737  saved_cxxflags="$CXXFLAGS"
29738  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29739  ac_ext=cpp
29740ac_cpp='$CXXCPP $CPPFLAGS'
29741ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29742ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29743ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29744
29745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29746/* end confdefs.h.  */
29747
29748    int i;
29749
29750_ACEOF
29751if ac_fn_cxx_try_compile "$LINENO"; then :
29752
29753else
29754  supports=no
29755fi
29756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29757  ac_ext=cpp
29758ac_cpp='$CXXCPP $CPPFLAGS'
29759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29762
29763  CXXFLAGS="$saved_cxxflags"
29764
29765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29766$as_echo "$supports" >&6; }
29767  if test "x$supports" = "xyes" ; then
29768    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29769  else
29770    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29771  fi
29772
29773
29774
29775
29776  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
29777  USING_BROKEN_SUSE_LD=no
29778  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
29779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
29780$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
29781    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
29782    echo "int main() { }" > main.c
29783    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
29784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29785$as_echo "no" >&6; }
29786      USING_BROKEN_SUSE_LD=no
29787    else
29788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29789$as_echo "yes" >&6; }
29790      USING_BROKEN_SUSE_LD=yes
29791    fi
29792    rm -rf version-script.map main.c
29793  fi
29794
29795
29796
29797# Setup debug symbols (need objcopy from the toolchain for that)
29798
29799#
29800# ENABLE_DEBUG_SYMBOLS
29801# This must be done after the toolchain is setup, since we're looking at objcopy.
29802#
29803# Check whether --enable-debug-symbols was given.
29804if test "${enable_debug_symbols+set}" = set; then :
29805  enableval=$enable_debug_symbols;
29806fi
29807
29808
29809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29810$as_echo_n "checking if we should generate debug symbols... " >&6; }
29811
29812if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29813   # explicit enabling of enable-debug-symbols and can't find objcopy
29814   #   this is an error
29815   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29816fi
29817
29818if test "x$enable_debug_symbols" = "xyes"; then
29819  ENABLE_DEBUG_SYMBOLS=true
29820elif test "x$enable_debug_symbols" = "xno"; then
29821  ENABLE_DEBUG_SYMBOLS=false
29822else
29823  # default on macosx is false
29824  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29825    ENABLE_DEBUG_SYMBOLS=false
29826  # Default is on if objcopy is found, otherwise off
29827  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29828    ENABLE_DEBUG_SYMBOLS=true
29829  else
29830    ENABLE_DEBUG_SYMBOLS=false
29831  fi
29832fi
29833
29834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29835$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29836
29837#
29838# ZIP_DEBUGINFO_FILES
29839#
29840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29841$as_echo_n "checking if we should zip debug-info files... " >&6; }
29842# Check whether --enable-zip-debug-info was given.
29843if test "${enable_zip_debug_info+set}" = set; then :
29844  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29845else
29846  enable_zip_debug_info="yes"
29847fi
29848
29849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29850$as_echo "${enable_zip_debug_info}" >&6; }
29851
29852if test "x${enable_zip_debug_info}" = "xno"; then
29853   ZIP_DEBUGINFO_FILES=false
29854else
29855   ZIP_DEBUGINFO_FILES=true
29856fi
29857
29858
29859
29860
29861
29862
29863
29864###############################################################################
29865#
29866# Check dependencies for external and internal libraries.
29867#
29868###############################################################################
29869
29870
29871
29872###############################################################################
29873#
29874# OS specific settings that we never will need to probe.
29875#
29876if test "x$OPENJDK_TARGET_OS" = xlinux; then
29877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29878$as_echo_n "checking what is not needed on Linux?... " >&6; }
29879    PULSE_NOT_NEEDED=yes
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29881$as_echo "pulse" >&6; }
29882fi
29883
29884if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29886$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29887    ALSA_NOT_NEEDED=yes
29888    PULSE_NOT_NEEDED=yes
29889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29890$as_echo "alsa pulse" >&6; }
29891fi
29892
29893if test "x$OPENJDK_TARGET_OS" = xwindows; then
29894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29895$as_echo_n "checking what is not needed on Windows?... " >&6; }
29896    CUPS_NOT_NEEDED=yes
29897    ALSA_NOT_NEEDED=yes
29898    PULSE_NOT_NEEDED=yes
29899    X11_NOT_NEEDED=yes
29900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29901$as_echo "alsa cups pulse x11" >&6; }
29902fi
29903
29904if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29906$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29907    ALSA_NOT_NEEDED=yes
29908    PULSE_NOT_NEEDED=yes
29909    X11_NOT_NEEDED=yes
29910    FREETYPE2_NOT_NEEDED=yes
29911    # If the java runtime framework is disabled, then we need X11.
29912    # This will be adjusted below.
29913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29914$as_echo "alsa pulse x11" >&6; }
29915fi
29916
29917if test "x$OPENJDK_TARGET_OS" = xbsd; then
29918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29919$as_echo_n "checking what is not needed on bsd?... " >&6; }
29920    ALSA_NOT_NEEDED=yes
29921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29922$as_echo "alsa" >&6; }
29923fi
29924
29925if test "x$OPENJDK" = "xfalse"; then
29926    FREETYPE2_NOT_NEEDED=yes
29927fi
29928
29929if test "x$SUPPORT_HEADFUL" = xno; then
29930    X11_NOT_NEEDED=yes
29931fi
29932
29933###############################################################################
29934#
29935# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29936# that uses this API.
29937#
29938# Check whether --enable-macosx-runtime-support was given.
29939if test "${enable_macosx_runtime_support+set}" = set; then :
29940  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29941else
29942  MACOSX_RUNTIME_SUPPORT="no"
29943fi
29944
29945
29946USE_MACOSX_RUNTIME_SUPPORT=no
29947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29948$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29949if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29950    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29951        MACOSX_RUNTIME_SUPPORT=yes
29952        USE_MACOSX_RUNTIME_SUPPORT=yes
29953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29954$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29955    else
29956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29957$as_echo "yes, but explicitly disabled." >&6; }
29958    fi
29959else
29960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29961$as_echo "no" >&6; }
29962fi
29963
29964if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29966$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29967    X11_NOT_NEEDED=
29968    FREETYPE2_NOT_NEEDED=
29969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29970$as_echo "alsa pulse" >&6; }
29971fi
29972
29973
29974
29975###############################################################################
29976#
29977# Check for X Windows
29978#
29979
29980# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29981# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29982# --x-libraries for the sysroot, if that seems to be correct.
29983if test "x$SYS_ROOT" != "x/"; then
29984  if test "x$x_includes" = xNONE; then
29985    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29986      x_includes="$SYS_ROOT/usr/X11R6/include"
29987    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29988      x_includes="$SYS_ROOT/usr/include"
29989    fi
29990  fi
29991  if test "x$x_libraries" = xNONE; then
29992    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29993      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29994    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29995      x_libraries="$SYS_ROOT/usr/lib64"
29996    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29997      x_libraries="$SYS_ROOT/usr/lib"
29998    fi
29999  fi
30000fi
30001
30002# Now let autoconf do it's magic
30003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30004$as_echo_n "checking for X... " >&6; }
30005
30006
30007# Check whether --with-x was given.
30008if test "${with_x+set}" = set; then :
30009  withval=$with_x;
30010fi
30011
30012# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30013if test "x$with_x" = xno; then
30014  # The user explicitly disabled X.
30015  have_x=disabled
30016else
30017  case $x_includes,$x_libraries in #(
30018    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30019    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30020  $as_echo_n "(cached) " >&6
30021else
30022  # One or both of the vars are not set, and there is no cached value.
30023ac_x_includes=no ac_x_libraries=no
30024rm -f -r conftest.dir
30025if mkdir conftest.dir; then
30026  cd conftest.dir
30027  cat >Imakefile <<'_ACEOF'
30028incroot:
30029	@echo incroot='${INCROOT}'
30030usrlibdir:
30031	@echo usrlibdir='${USRLIBDIR}'
30032libdir:
30033	@echo libdir='${LIBDIR}'
30034_ACEOF
30035  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30036    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30037    for ac_var in incroot usrlibdir libdir; do
30038      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30039    done
30040    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30041    for ac_extension in a so sl dylib la dll; do
30042      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30043	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30044	ac_im_usrlibdir=$ac_im_libdir; break
30045      fi
30046    done
30047    # Screen out bogus values from the imake configuration.  They are
30048    # bogus both because they are the default anyway, and because
30049    # using them would break gcc on systems where it needs fixed includes.
30050    case $ac_im_incroot in
30051	/usr/include) ac_x_includes= ;;
30052	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30053    esac
30054    case $ac_im_usrlibdir in
30055	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30056	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30057    esac
30058  fi
30059  cd ..
30060  rm -f -r conftest.dir
30061fi
30062
30063# Standard set of common directories for X headers.
30064# Check X11 before X11Rn because it is often a symlink to the current release.
30065ac_x_header_dirs='
30066/usr/X11/include
30067/usr/X11R7/include
30068/usr/X11R6/include
30069/usr/X11R5/include
30070/usr/X11R4/include
30071
30072/usr/include/X11
30073/usr/include/X11R7
30074/usr/include/X11R6
30075/usr/include/X11R5
30076/usr/include/X11R4
30077
30078/usr/local/X11/include
30079/usr/local/X11R7/include
30080/usr/local/X11R6/include
30081/usr/local/X11R5/include
30082/usr/local/X11R4/include
30083
30084/usr/local/include/X11
30085/usr/local/include/X11R7
30086/usr/local/include/X11R6
30087/usr/local/include/X11R5
30088/usr/local/include/X11R4
30089
30090/usr/X386/include
30091/usr/x386/include
30092/usr/XFree86/include/X11
30093
30094/usr/include
30095/usr/local/include
30096/usr/unsupported/include
30097/usr/athena/include
30098/usr/local/x11r5/include
30099/usr/lpp/Xamples/include
30100
30101/usr/openwin/include
30102/usr/openwin/share/include'
30103
30104if test "$ac_x_includes" = no; then
30105  # Guess where to find include files, by looking for Xlib.h.
30106  # First, try using that file with no special directory specified.
30107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30108/* end confdefs.h.  */
30109#include <X11/Xlib.h>
30110_ACEOF
30111if ac_fn_cxx_try_cpp "$LINENO"; then :
30112  # We can compile using X headers with no special include directory.
30113ac_x_includes=
30114else
30115  for ac_dir in $ac_x_header_dirs; do
30116  if test -r "$ac_dir/X11/Xlib.h"; then
30117    ac_x_includes=$ac_dir
30118    break
30119  fi
30120done
30121fi
30122rm -f conftest.err conftest.i conftest.$ac_ext
30123fi # $ac_x_includes = no
30124
30125if test "$ac_x_libraries" = no; then
30126  # Check for the libraries.
30127  # See if we find them without any special options.
30128  # Don't add to $LIBS permanently.
30129  ac_save_LIBS=$LIBS
30130  LIBS="-lX11 $LIBS"
30131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30132/* end confdefs.h.  */
30133#include <X11/Xlib.h>
30134int
30135main ()
30136{
30137XrmInitialize ()
30138  ;
30139  return 0;
30140}
30141_ACEOF
30142if ac_fn_cxx_try_link "$LINENO"; then :
30143  LIBS=$ac_save_LIBS
30144# We can link X programs with no special library path.
30145ac_x_libraries=
30146else
30147  LIBS=$ac_save_LIBS
30148for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30149do
30150  # Don't even attempt the hair of trying to link an X program!
30151  for ac_extension in a so sl dylib la dll; do
30152    if test -r "$ac_dir/libX11.$ac_extension"; then
30153      ac_x_libraries=$ac_dir
30154      break 2
30155    fi
30156  done
30157done
30158fi
30159rm -f core conftest.err conftest.$ac_objext \
30160    conftest$ac_exeext conftest.$ac_ext
30161fi # $ac_x_libraries = no
30162
30163case $ac_x_includes,$ac_x_libraries in #(
30164  no,* | *,no | *\'*)
30165    # Didn't find X, or a directory has "'" in its name.
30166    ac_cv_have_x="have_x=no";; #(
30167  *)
30168    # Record where we found X for the cache.
30169    ac_cv_have_x="have_x=yes\
30170	ac_x_includes='$ac_x_includes'\
30171	ac_x_libraries='$ac_x_libraries'"
30172esac
30173fi
30174;; #(
30175    *) have_x=yes;;
30176  esac
30177  eval "$ac_cv_have_x"
30178fi # $with_x != no
30179
30180if test "$have_x" != yes; then
30181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30182$as_echo "$have_x" >&6; }
30183  no_x=yes
30184else
30185  # If each of the values was on the command line, it overrides each guess.
30186  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30187  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30188  # Update the cache value to reflect the command line values.
30189  ac_cv_have_x="have_x=yes\
30190	ac_x_includes='$x_includes'\
30191	ac_x_libraries='$x_libraries'"
30192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30193$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30194fi
30195
30196if test "$no_x" = yes; then
30197  # Not all programs may use this symbol, but it does not hurt to define it.
30198
30199$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30200
30201  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30202else
30203  if test -n "$x_includes"; then
30204    X_CFLAGS="$X_CFLAGS -I$x_includes"
30205  fi
30206
30207  # It would also be nice to do this for all -L options, not just this one.
30208  if test -n "$x_libraries"; then
30209    X_LIBS="$X_LIBS -L$x_libraries"
30210    # For Solaris; some versions of Sun CC require a space after -R and
30211    # others require no space.  Words are not sufficient . . . .
30212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30213$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30214    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30215    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30216    ac_cxx_werror_flag=yes
30217    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30218/* end confdefs.h.  */
30219
30220int
30221main ()
30222{
30223
30224  ;
30225  return 0;
30226}
30227_ACEOF
30228if ac_fn_cxx_try_link "$LINENO"; then :
30229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30230$as_echo "no" >&6; }
30231       X_LIBS="$X_LIBS -R$x_libraries"
30232else
30233  LIBS="$ac_xsave_LIBS -R $x_libraries"
30234       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30235/* end confdefs.h.  */
30236
30237int
30238main ()
30239{
30240
30241  ;
30242  return 0;
30243}
30244_ACEOF
30245if ac_fn_cxx_try_link "$LINENO"; then :
30246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30247$as_echo "yes" >&6; }
30248	  X_LIBS="$X_LIBS -R $x_libraries"
30249else
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30251$as_echo "neither works" >&6; }
30252fi
30253rm -f core conftest.err conftest.$ac_objext \
30254    conftest$ac_exeext conftest.$ac_ext
30255fi
30256rm -f core conftest.err conftest.$ac_objext \
30257    conftest$ac_exeext conftest.$ac_ext
30258    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30259    LIBS=$ac_xsave_LIBS
30260  fi
30261
30262  # Check for system-dependent libraries X programs must link with.
30263  # Do this before checking for the system-independent R6 libraries
30264  # (-lICE), since we may need -lsocket or whatever for X linking.
30265
30266  if test "$ISC" = yes; then
30267    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30268  else
30269    # Martyn Johnson says this is needed for Ultrix, if the X
30270    # libraries were built with DECnet support.  And Karl Berry says
30271    # the Alpha needs dnet_stub (dnet does not exist).
30272    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30273    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30274/* end confdefs.h.  */
30275
30276/* Override any GCC internal prototype to avoid an error.
30277   Use char because int might match the return type of a GCC
30278   builtin and then its argument prototype would still apply.  */
30279#ifdef __cplusplus
30280extern "C"
30281#endif
30282char XOpenDisplay ();
30283int
30284main ()
30285{
30286return XOpenDisplay ();
30287  ;
30288  return 0;
30289}
30290_ACEOF
30291if ac_fn_cxx_try_link "$LINENO"; then :
30292
30293else
30294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30295$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30296if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30297  $as_echo_n "(cached) " >&6
30298else
30299  ac_check_lib_save_LIBS=$LIBS
30300LIBS="-ldnet  $LIBS"
30301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30302/* end confdefs.h.  */
30303
30304/* Override any GCC internal prototype to avoid an error.
30305   Use char because int might match the return type of a GCC
30306   builtin and then its argument prototype would still apply.  */
30307#ifdef __cplusplus
30308extern "C"
30309#endif
30310char dnet_ntoa ();
30311int
30312main ()
30313{
30314return dnet_ntoa ();
30315  ;
30316  return 0;
30317}
30318_ACEOF
30319if ac_fn_cxx_try_link "$LINENO"; then :
30320  ac_cv_lib_dnet_dnet_ntoa=yes
30321else
30322  ac_cv_lib_dnet_dnet_ntoa=no
30323fi
30324rm -f core conftest.err conftest.$ac_objext \
30325    conftest$ac_exeext conftest.$ac_ext
30326LIBS=$ac_check_lib_save_LIBS
30327fi
30328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30329$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30330if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30331  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30332fi
30333
30334    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30336$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30337if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30338  $as_echo_n "(cached) " >&6
30339else
30340  ac_check_lib_save_LIBS=$LIBS
30341LIBS="-ldnet_stub  $LIBS"
30342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30343/* end confdefs.h.  */
30344
30345/* Override any GCC internal prototype to avoid an error.
30346   Use char because int might match the return type of a GCC
30347   builtin and then its argument prototype would still apply.  */
30348#ifdef __cplusplus
30349extern "C"
30350#endif
30351char dnet_ntoa ();
30352int
30353main ()
30354{
30355return dnet_ntoa ();
30356  ;
30357  return 0;
30358}
30359_ACEOF
30360if ac_fn_cxx_try_link "$LINENO"; then :
30361  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30362else
30363  ac_cv_lib_dnet_stub_dnet_ntoa=no
30364fi
30365rm -f core conftest.err conftest.$ac_objext \
30366    conftest$ac_exeext conftest.$ac_ext
30367LIBS=$ac_check_lib_save_LIBS
30368fi
30369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30370$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30371if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30372  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30373fi
30374
30375    fi
30376fi
30377rm -f core conftest.err conftest.$ac_objext \
30378    conftest$ac_exeext conftest.$ac_ext
30379    LIBS="$ac_xsave_LIBS"
30380
30381    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30382    # to get the SysV transport functions.
30383    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30384    # needs -lnsl.
30385    # The nsl library prevents programs from opening the X display
30386    # on Irix 5.2, according to T.E. Dickey.
30387    # The functions gethostbyname, getservbyname, and inet_addr are
30388    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30389    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30390if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30391
30392fi
30393
30394    if test $ac_cv_func_gethostbyname = no; then
30395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30396$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30397if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30398  $as_echo_n "(cached) " >&6
30399else
30400  ac_check_lib_save_LIBS=$LIBS
30401LIBS="-lnsl  $LIBS"
30402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30403/* end confdefs.h.  */
30404
30405/* Override any GCC internal prototype to avoid an error.
30406   Use char because int might match the return type of a GCC
30407   builtin and then its argument prototype would still apply.  */
30408#ifdef __cplusplus
30409extern "C"
30410#endif
30411char gethostbyname ();
30412int
30413main ()
30414{
30415return gethostbyname ();
30416  ;
30417  return 0;
30418}
30419_ACEOF
30420if ac_fn_cxx_try_link "$LINENO"; then :
30421  ac_cv_lib_nsl_gethostbyname=yes
30422else
30423  ac_cv_lib_nsl_gethostbyname=no
30424fi
30425rm -f core conftest.err conftest.$ac_objext \
30426    conftest$ac_exeext conftest.$ac_ext
30427LIBS=$ac_check_lib_save_LIBS
30428fi
30429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30430$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30431if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30432  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30433fi
30434
30435      if test $ac_cv_lib_nsl_gethostbyname = no; then
30436	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30437$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30438if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30439  $as_echo_n "(cached) " >&6
30440else
30441  ac_check_lib_save_LIBS=$LIBS
30442LIBS="-lbsd  $LIBS"
30443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30444/* end confdefs.h.  */
30445
30446/* Override any GCC internal prototype to avoid an error.
30447   Use char because int might match the return type of a GCC
30448   builtin and then its argument prototype would still apply.  */
30449#ifdef __cplusplus
30450extern "C"
30451#endif
30452char gethostbyname ();
30453int
30454main ()
30455{
30456return gethostbyname ();
30457  ;
30458  return 0;
30459}
30460_ACEOF
30461if ac_fn_cxx_try_link "$LINENO"; then :
30462  ac_cv_lib_bsd_gethostbyname=yes
30463else
30464  ac_cv_lib_bsd_gethostbyname=no
30465fi
30466rm -f core conftest.err conftest.$ac_objext \
30467    conftest$ac_exeext conftest.$ac_ext
30468LIBS=$ac_check_lib_save_LIBS
30469fi
30470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30471$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30472if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30473  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30474fi
30475
30476      fi
30477    fi
30478
30479    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30480    # socket/setsockopt and other routines are undefined under SCO ODT
30481    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30482    # on later versions), says Simon Leinen: it contains gethostby*
30483    # variants that don't use the name server (or something).  -lsocket
30484    # must be given before -lnsl if both are needed.  We assume that
30485    # if connect needs -lnsl, so does gethostbyname.
30486    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30487if test "x$ac_cv_func_connect" = x""yes; then :
30488
30489fi
30490
30491    if test $ac_cv_func_connect = no; then
30492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30493$as_echo_n "checking for connect in -lsocket... " >&6; }
30494if test "${ac_cv_lib_socket_connect+set}" = set; then :
30495  $as_echo_n "(cached) " >&6
30496else
30497  ac_check_lib_save_LIBS=$LIBS
30498LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30500/* end confdefs.h.  */
30501
30502/* Override any GCC internal prototype to avoid an error.
30503   Use char because int might match the return type of a GCC
30504   builtin and then its argument prototype would still apply.  */
30505#ifdef __cplusplus
30506extern "C"
30507#endif
30508char connect ();
30509int
30510main ()
30511{
30512return connect ();
30513  ;
30514  return 0;
30515}
30516_ACEOF
30517if ac_fn_cxx_try_link "$LINENO"; then :
30518  ac_cv_lib_socket_connect=yes
30519else
30520  ac_cv_lib_socket_connect=no
30521fi
30522rm -f core conftest.err conftest.$ac_objext \
30523    conftest$ac_exeext conftest.$ac_ext
30524LIBS=$ac_check_lib_save_LIBS
30525fi
30526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30527$as_echo "$ac_cv_lib_socket_connect" >&6; }
30528if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30529  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30530fi
30531
30532    fi
30533
30534    # Guillermo Gomez says -lposix is necessary on A/UX.
30535    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30536if test "x$ac_cv_func_remove" = x""yes; then :
30537
30538fi
30539
30540    if test $ac_cv_func_remove = no; then
30541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30542$as_echo_n "checking for remove in -lposix... " >&6; }
30543if test "${ac_cv_lib_posix_remove+set}" = set; then :
30544  $as_echo_n "(cached) " >&6
30545else
30546  ac_check_lib_save_LIBS=$LIBS
30547LIBS="-lposix  $LIBS"
30548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549/* end confdefs.h.  */
30550
30551/* Override any GCC internal prototype to avoid an error.
30552   Use char because int might match the return type of a GCC
30553   builtin and then its argument prototype would still apply.  */
30554#ifdef __cplusplus
30555extern "C"
30556#endif
30557char remove ();
30558int
30559main ()
30560{
30561return remove ();
30562  ;
30563  return 0;
30564}
30565_ACEOF
30566if ac_fn_cxx_try_link "$LINENO"; then :
30567  ac_cv_lib_posix_remove=yes
30568else
30569  ac_cv_lib_posix_remove=no
30570fi
30571rm -f core conftest.err conftest.$ac_objext \
30572    conftest$ac_exeext conftest.$ac_ext
30573LIBS=$ac_check_lib_save_LIBS
30574fi
30575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30576$as_echo "$ac_cv_lib_posix_remove" >&6; }
30577if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30578  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30579fi
30580
30581    fi
30582
30583    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30584    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30585if test "x$ac_cv_func_shmat" = x""yes; then :
30586
30587fi
30588
30589    if test $ac_cv_func_shmat = no; then
30590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30591$as_echo_n "checking for shmat in -lipc... " >&6; }
30592if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30593  $as_echo_n "(cached) " >&6
30594else
30595  ac_check_lib_save_LIBS=$LIBS
30596LIBS="-lipc  $LIBS"
30597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30598/* end confdefs.h.  */
30599
30600/* Override any GCC internal prototype to avoid an error.
30601   Use char because int might match the return type of a GCC
30602   builtin and then its argument prototype would still apply.  */
30603#ifdef __cplusplus
30604extern "C"
30605#endif
30606char shmat ();
30607int
30608main ()
30609{
30610return shmat ();
30611  ;
30612  return 0;
30613}
30614_ACEOF
30615if ac_fn_cxx_try_link "$LINENO"; then :
30616  ac_cv_lib_ipc_shmat=yes
30617else
30618  ac_cv_lib_ipc_shmat=no
30619fi
30620rm -f core conftest.err conftest.$ac_objext \
30621    conftest$ac_exeext conftest.$ac_ext
30622LIBS=$ac_check_lib_save_LIBS
30623fi
30624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30625$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30626if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30627  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30628fi
30629
30630    fi
30631  fi
30632
30633  # Check for libraries that X11R6 Xt/Xaw programs need.
30634  ac_save_LDFLAGS=$LDFLAGS
30635  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30636  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30637  # check for ICE first), but we must link in the order -lSM -lICE or
30638  # we get undefined symbols.  So assume we have SM if we have ICE.
30639  # These have to be linked with before -lX11, unlike the other
30640  # libraries we check for below, so use a different variable.
30641  # John Interrante, Karl Berry
30642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30643$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30644if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30645  $as_echo_n "(cached) " >&6
30646else
30647  ac_check_lib_save_LIBS=$LIBS
30648LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30650/* end confdefs.h.  */
30651
30652/* Override any GCC internal prototype to avoid an error.
30653   Use char because int might match the return type of a GCC
30654   builtin and then its argument prototype would still apply.  */
30655#ifdef __cplusplus
30656extern "C"
30657#endif
30658char IceConnectionNumber ();
30659int
30660main ()
30661{
30662return IceConnectionNumber ();
30663  ;
30664  return 0;
30665}
30666_ACEOF
30667if ac_fn_cxx_try_link "$LINENO"; then :
30668  ac_cv_lib_ICE_IceConnectionNumber=yes
30669else
30670  ac_cv_lib_ICE_IceConnectionNumber=no
30671fi
30672rm -f core conftest.err conftest.$ac_objext \
30673    conftest$ac_exeext conftest.$ac_ext
30674LIBS=$ac_check_lib_save_LIBS
30675fi
30676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30677$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30678if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30679  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30680fi
30681
30682  LDFLAGS=$ac_save_LDFLAGS
30683
30684fi
30685
30686
30687# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30688# this doesn't make sense so we remove it.
30689if test "x$COMPILE_TYPE" = xcross; then
30690  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30691fi
30692
30693if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30694
30695    # Print a helpful message on how to acquire the necessary build dependency.
30696    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30697    MISSING_DEPENDENCY=x11
30698    PKGHANDLER_COMMAND=
30699
30700    case $PKGHANDLER in
30701	apt-get)
30702                apt_help     $MISSING_DEPENDENCY ;;
30703    yum)
30704                yum_help     $MISSING_DEPENDENCY ;;
30705	port)
30706                port_help    $MISSING_DEPENDENCY ;;
30707	pkgutil)
30708                pkgutil_help $MISSING_DEPENDENCY ;;
30709	pkgadd)
30710                pkgadd_help  $MISSING_DEPENDENCY ;;
30711    * )
30712      break ;;
30713    esac
30714
30715    if test "x$PKGHANDLER_COMMAND" != x; then
30716        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30717    fi
30718
30719    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30720fi
30721
30722# Some of the old makefiles require a setting of OPENWIN_HOME
30723# Since the X11R6 directory has disappeared on later Linuxes,
30724# we need to probe for it.
30725if test "x$OPENJDK_TARGET_OS" = xlinux; then
30726    if test -d "$SYS_ROOT/usr/X11R6"; then
30727        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30728    elif test -d "$SYS_ROOT/usr/include/X11"; then
30729        OPENWIN_HOME="$SYS_ROOT/usr"
30730    fi
30731fi
30732if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30733    OPENWIN_HOME="/usr/openwin"
30734fi
30735
30736
30737
30738#
30739# Weird Sol10 something check...TODO change to try compile
30740#
30741if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30742  if test "`uname -r`" = "5.10"; then
30743     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30744     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30745     fi
30746  fi
30747fi
30748
30749ac_ext=c
30750ac_cpp='$CPP $CPPFLAGS'
30751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30753ac_compiler_gnu=$ac_cv_c_compiler_gnu
30754
30755OLD_CFLAGS="$CFLAGS"
30756CFLAGS="$CFLAGS $X_CFLAGS"
30757
30758# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30759for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30760do :
30761  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30762ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30763                   # include <X11/Xutil.h>
30764
30765"
30766if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30767  cat >>confdefs.h <<_ACEOF
30768#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30769_ACEOF
30770 X11_A_OK=yes
30771else
30772  X11_A_OK=no; break
30773fi
30774
30775done
30776
30777
30778CFLAGS="$OLD_CFLAGS"
30779ac_ext=cpp
30780ac_cpp='$CXXCPP $CPPFLAGS'
30781ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30782ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30783ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30784
30785
30786if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30787
30788    # Print a helpful message on how to acquire the necessary build dependency.
30789    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30790    MISSING_DEPENDENCY=x11
30791    PKGHANDLER_COMMAND=
30792
30793    case $PKGHANDLER in
30794	apt-get)
30795                apt_help     $MISSING_DEPENDENCY ;;
30796    yum)
30797                yum_help     $MISSING_DEPENDENCY ;;
30798	port)
30799                port_help    $MISSING_DEPENDENCY ;;
30800	pkgutil)
30801                pkgutil_help $MISSING_DEPENDENCY ;;
30802	pkgadd)
30803                pkgadd_help  $MISSING_DEPENDENCY ;;
30804    * )
30805      break ;;
30806    esac
30807
30808    if test "x$PKGHANDLER_COMMAND" != x; then
30809        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30810    fi
30811
30812    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30813fi
30814
30815
30816
30817
30818
30819
30820###############################################################################
30821#
30822# The common unix printing system cups is used to print from java.
30823#
30824
30825# Check whether --with-cups was given.
30826if test "${with_cups+set}" = set; then :
30827  withval=$with_cups;
30828fi
30829
30830
30831# Check whether --with-cups-include was given.
30832if test "${with_cups_include+set}" = set; then :
30833  withval=$with_cups_include;
30834fi
30835
30836
30837if test "x$CUPS_NOT_NEEDED" = xyes; then
30838	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30839		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30840$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30841	fi
30842	CUPS_CFLAGS=
30843else
30844	CUPS_FOUND=no
30845
30846	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30847	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30848	fi
30849
30850	if test "x${with_cups}" != x; then
30851	    CUPS_CFLAGS="-I${with_cups}/include"
30852	    CUPS_FOUND=yes
30853	fi
30854	if test "x${with_cups_include}" != x; then
30855	    CUPS_CFLAGS="-I${with_cups_include}"
30856	    CUPS_FOUND=yes
30857	fi
30858	if test "x$CUPS_FOUND" = xno; then
30859
30860
30861    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30862        # Source the builddeps file again, to make sure it uses the latest variables!
30863        . $builddepsfile
30864        # Look for a target and build machine specific resource!
30865        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30866        if test "x$resource" = x; then
30867            # Ok, lets instead look for a target specific resource
30868            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30869        fi
30870        if test "x$resource" = x; then
30871            # Ok, lets instead look for a build specific resource
30872            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30873        fi
30874        if test "x$resource" = x; then
30875            # Ok, lets instead look for a generic resource
30876            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30877            resource=${builddep_cups}
30878        fi
30879        if test "x$resource" != x; then
30880            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30881$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30882	    # If the resource in the builddeps.conf file is an existing directory,
30883	    # for example /java/linux/cups
30884	    if test -d ${resource}; then
30885	       depdir=${resource}
30886	    else
30887
30888# cups is for example mymodule
30889# $resource is for example libs/general/libmymod_1_2_3.zip
30890# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30891# $with_builddeps_dir is for example /localhome/builddeps
30892# depdir is the name of the variable into which we store the depdir, eg MYMOD
30893# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30894# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30895    filename=`basename $resource`
30896    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30897    filebase=${filename%%.*}
30898    extension=${filename#*.}
30899    installdir=$with_builddeps_dir/$filebase
30900    if test ! -f $installdir/$filename.unpacked; then
30901        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30902$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30903        if test ! -d $installdir; then
30904            mkdir -p $installdir
30905        fi
30906        if test ! -d $installdir; then
30907            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30908        fi
30909        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30910        touch $tmpfile
30911        if test ! -f $tmpfile; then
30912            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30913        fi
30914
30915    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30916    # $tmpfile is the local file name for the downloaded file.
30917    VALID_TOOL=no
30918    if test "x$BDEPS_FTP" = xwget; then
30919       VALID_TOOL=yes
30920       wget -O $tmpfile $with_builddeps_server/$resource
30921    fi
30922    if test "x$BDEPS_FTP" = xlftp; then
30923       VALID_TOOL=yes
30924       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30925    fi
30926    if test "x$BDEPS_FTP" = xftp; then
30927        VALID_TOOL=yes
30928        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30929        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30930        FTPUSERPWD=${FTPSERVER%%@*}
30931        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30932            FTPUSER=${userpwd%%:*}
30933            FTPPWD=${userpwd#*@}
30934            FTPSERVER=${FTPSERVER#*@}
30935        else
30936            FTPUSER=ftp
30937            FTPPWD=ftp
30938        fi
30939        # the "pass" command does not work on some
30940        # ftp clients (read ftp.exe) but if it works,
30941        # passive mode is better!
30942        (\
30943            echo "user $FTPUSER $FTPPWD"        ;\
30944            echo "pass"                         ;\
30945            echo "bin"                          ;\
30946            echo "get $FTPPATH $tmpfile"              ;\
30947        ) | ftp -in $FTPSERVER
30948    fi
30949    if test "x$VALID_TOOL" != xyes; then
30950       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30951    fi
30952
30953        mv $tmpfile $installdir/$filename
30954        if test ! -s $installdir/$filename; then
30955            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30956        fi
30957        case "$extension" in
30958            zip)  echo "Unzipping $installdir/$filename..."
30959               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30960            ;;
30961            tar.gz) echo "Untaring $installdir/$filename..."
30962               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30963            ;;
30964            tgz) echo "Untaring $installdir/$filename..."
30965               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30966            ;;
30967            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30968            ;;
30969        esac
30970    fi
30971    if test -f $installdir/$filename.unpacked; then
30972        depdir=$installdir
30973    fi
30974
30975	    fi
30976            # Source the builddeps file again, because in the previous command, the depdir
30977            # was updated to point at the current build dependency install directory.
30978            . $builddepsfile
30979            # Now extract variables from the builddeps.conf files.
30980            theroot=${builddep_cups_ROOT}
30981            thecflags=${builddep_cups_CFLAGS}
30982            thelibs=${builddep_cups_LIBS}
30983            if test "x$depdir" = x; then
30984                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30985            fi
30986            CUPS=$depdir
30987            if test "x$theroot" != x; then
30988               CUPS="$theroot"
30989            fi
30990            if test "x$thecflags" != x; then
30991               CUPS_CFLAGS="$thecflags"
30992            fi
30993            if test "x$thelibs" != x; then
30994               CUPS_LIBS="$thelibs"
30995            fi
30996            CUPS_FOUND=yes
30997
30998        fi
30999
31000    fi
31001
31002	fi
31003	if test "x$CUPS_FOUND" = xno; then
31004	    # Are the cups headers installed in the default /usr/include location?
31005	    for ac_header in cups/cups.h cups/ppd.h
31006do :
31007  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31008ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31009if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31010  cat >>confdefs.h <<_ACEOF
31011#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31012_ACEOF
31013 CUPS_FOUND=yes
31014	                      CUPS_CFLAGS=
31015	                      DEFAULT_CUPS=yes
31016fi
31017
31018done
31019
31020	fi
31021	if test "x$CUPS_FOUND" = xno; then
31022	    # Getting nervous now? Lets poke around for standard Solaris third-party
31023	    # package installation locations.
31024	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31025$as_echo_n "checking for cups headers... " >&6; }
31026	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31027	       # An SFW package seems to be installed!
31028	       CUPS_FOUND=yes
31029	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31030	    elif test -s /opt/csw/include/cups/cups.h; then
31031	       # A CSW package seems to be installed!
31032	       CUPS_FOUND=yes
31033	       CUPS_CFLAGS="-I/opt/csw/include"
31034	    fi
31035	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31036$as_echo "$CUPS_FOUND" >&6; }
31037	fi
31038	if test "x$CUPS_FOUND" = xno; then
31039
31040    # Print a helpful message on how to acquire the necessary build dependency.
31041    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31042    MISSING_DEPENDENCY=cups
31043    PKGHANDLER_COMMAND=
31044
31045    case $PKGHANDLER in
31046	apt-get)
31047                apt_help     $MISSING_DEPENDENCY ;;
31048    yum)
31049                yum_help     $MISSING_DEPENDENCY ;;
31050	port)
31051                port_help    $MISSING_DEPENDENCY ;;
31052	pkgutil)
31053                pkgutil_help $MISSING_DEPENDENCY ;;
31054	pkgadd)
31055                pkgadd_help  $MISSING_DEPENDENCY ;;
31056    * )
31057      break ;;
31058    esac
31059
31060    if test "x$PKGHANDLER_COMMAND" != x; then
31061        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31062    fi
31063
31064	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31065	fi
31066fi
31067
31068
31069
31070
31071
31072
31073###############################################################################
31074#
31075# The ubiquitous freetype2 library is used to render fonts.
31076#
31077
31078# Check whether --with-freetype was given.
31079if test "${with_freetype+set}" = set; then :
31080  withval=$with_freetype;
31081fi
31082
31083
31084# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31085USING_SYSTEM_FT_LIB=false
31086
31087if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31088	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31089		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31090$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31091	fi
31092	FREETYPE2_CFLAGS=
31093	FREETYPE2_LIBS=
31094        FREETYPE2_LIB_PATH=
31095else
31096	FREETYPE2_FOUND=no
31097
31098	if test "x$with_freetype" != x; then
31099
31100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31101
31102  # Input might be given as Windows format, start by converting to
31103  # unix format.
31104  path="$with_freetype"
31105  new_path=`$CYGPATH -u "$path"`
31106
31107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31110  # "foo.exe" is OK but "foo" is an error.
31111  #
31112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31113  # It is also a way to make sure we got the proper file name for the real test later on.
31114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31115  if test "x$test_shortpath" = x; then
31116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31117$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31118    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31119  fi
31120
31121  # Call helper function which possibly converts this using DOS-style short mode.
31122  # If so, the updated path is stored in $new_path.
31123
31124  input_path="$new_path"
31125  # Check if we need to convert this using DOS-style short mode. If the path
31126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31127  # take no chances and rewrite it.
31128  # Note: m4 eats our [], so we need to use [ and ] instead.
31129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31130  if test "x$has_forbidden_chars" != x; then
31131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31135      # Going to short mode and back again did indeed matter. Since short mode is
31136      # case insensitive, let's make it lowercase to improve readability.
31137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31138      # Now convert it back to Unix-stile (cygpath)
31139      input_path=`$CYGPATH -u "$shortmode_path"`
31140      new_path="$input_path"
31141    fi
31142  fi
31143
31144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31145  if test "x$test_cygdrive_prefix" = x; then
31146    # As a simple fix, exclude /usr/bin since it's not a real path.
31147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31149      # a path prefixed by /cygdrive for fixpath to work.
31150      new_path="$CYGWIN_ROOT_PATH$input_path"
31151    fi
31152  fi
31153
31154
31155  if test "x$path" != "x$new_path"; then
31156    with_freetype="$new_path"
31157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31158$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31159  fi
31160
31161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31162
31163  path="$with_freetype"
31164  has_colon=`$ECHO $path | $GREP ^.:`
31165  new_path="$path"
31166  if test "x$has_colon" = x; then
31167    # Not in mixed or Windows style, start by that.
31168    new_path=`cmd //c echo $path`
31169  fi
31170
31171
31172  input_path="$new_path"
31173  # Check if we need to convert this using DOS-style short mode. If the path
31174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31175  # take no chances and rewrite it.
31176  # Note: m4 eats our [], so we need to use [ and ] instead.
31177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31178  if test "x$has_forbidden_chars" != x; then
31179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31181  fi
31182
31183
31184  windows_path="$new_path"
31185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31186    unix_path=`$CYGPATH -u "$windows_path"`
31187    new_path="$unix_path"
31188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31190    new_path="$unix_path"
31191  fi
31192
31193  if test "x$path" != "x$new_path"; then
31194    with_freetype="$new_path"
31195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31196$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31197  fi
31198
31199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31201
31202  else
31203    # We're on a posix platform. Hooray! :)
31204    path="$with_freetype"
31205    has_space=`$ECHO "$path" | $GREP " "`
31206    if test "x$has_space" != x; then
31207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31208$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31209      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31210    fi
31211
31212    # Use eval to expand a potential ~
31213    eval path="$path"
31214    if test ! -f "$path" && test ! -d "$path"; then
31215      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31216    fi
31217
31218    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31219  fi
31220
31221	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31222            FREETYPE2_LIB_PATH="$with_freetype/lib"
31223            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31224                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31225                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31226            fi
31227            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31228                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31229            fi
31230	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31231            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31232                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31233            fi
31234 	    FREETYPE2_FOUND=yes
31235   	    if test "x$FREETYPE2_FOUND" = xyes; then
31236	        # Verify that the directories exist
31237                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31238		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31239		fi
31240	        # List the contents of the lib.
31241		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31242                if test "x$FREETYPELIB" = x; then
31243		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31244		fi
31245	        # Check one h-file
31246                if ! test -s "$with_freetype/include/ft2build.h"; then
31247		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31248		fi
31249            fi
31250        fi
31251	if test "x$FREETYPE2_FOUND" = xno; then
31252
31253
31254    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31255        # Source the builddeps file again, to make sure it uses the latest variables!
31256        . $builddepsfile
31257        # Look for a target and build machine specific resource!
31258        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31259        if test "x$resource" = x; then
31260            # Ok, lets instead look for a target specific resource
31261            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31262        fi
31263        if test "x$resource" = x; then
31264            # Ok, lets instead look for a build specific resource
31265            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31266        fi
31267        if test "x$resource" = x; then
31268            # Ok, lets instead look for a generic resource
31269            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31270            resource=${builddep_freetype2}
31271        fi
31272        if test "x$resource" != x; then
31273            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31274$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31275	    # If the resource in the builddeps.conf file is an existing directory,
31276	    # for example /java/linux/cups
31277	    if test -d ${resource}; then
31278	       depdir=${resource}
31279	    else
31280
31281# freetype2 is for example mymodule
31282# $resource is for example libs/general/libmymod_1_2_3.zip
31283# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31284# $with_builddeps_dir is for example /localhome/builddeps
31285# depdir is the name of the variable into which we store the depdir, eg MYMOD
31286# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31287# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31288    filename=`basename $resource`
31289    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31290    filebase=${filename%%.*}
31291    extension=${filename#*.}
31292    installdir=$with_builddeps_dir/$filebase
31293    if test ! -f $installdir/$filename.unpacked; then
31294        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31295$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31296        if test ! -d $installdir; then
31297            mkdir -p $installdir
31298        fi
31299        if test ! -d $installdir; then
31300            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31301        fi
31302        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31303        touch $tmpfile
31304        if test ! -f $tmpfile; then
31305            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31306        fi
31307
31308    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31309    # $tmpfile is the local file name for the downloaded file.
31310    VALID_TOOL=no
31311    if test "x$BDEPS_FTP" = xwget; then
31312       VALID_TOOL=yes
31313       wget -O $tmpfile $with_builddeps_server/$resource
31314    fi
31315    if test "x$BDEPS_FTP" = xlftp; then
31316       VALID_TOOL=yes
31317       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31318    fi
31319    if test "x$BDEPS_FTP" = xftp; then
31320        VALID_TOOL=yes
31321        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31322        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31323        FTPUSERPWD=${FTPSERVER%%@*}
31324        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31325            FTPUSER=${userpwd%%:*}
31326            FTPPWD=${userpwd#*@}
31327            FTPSERVER=${FTPSERVER#*@}
31328        else
31329            FTPUSER=ftp
31330            FTPPWD=ftp
31331        fi
31332        # the "pass" command does not work on some
31333        # ftp clients (read ftp.exe) but if it works,
31334        # passive mode is better!
31335        (\
31336            echo "user $FTPUSER $FTPPWD"        ;\
31337            echo "pass"                         ;\
31338            echo "bin"                          ;\
31339            echo "get $FTPPATH $tmpfile"              ;\
31340        ) | ftp -in $FTPSERVER
31341    fi
31342    if test "x$VALID_TOOL" != xyes; then
31343       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31344    fi
31345
31346        mv $tmpfile $installdir/$filename
31347        if test ! -s $installdir/$filename; then
31348            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31349        fi
31350        case "$extension" in
31351            zip)  echo "Unzipping $installdir/$filename..."
31352               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31353            ;;
31354            tar.gz) echo "Untaring $installdir/$filename..."
31355               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31356            ;;
31357            tgz) echo "Untaring $installdir/$filename..."
31358               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31359            ;;
31360            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31361            ;;
31362        esac
31363    fi
31364    if test -f $installdir/$filename.unpacked; then
31365        depdir=$installdir
31366    fi
31367
31368	    fi
31369            # Source the builddeps file again, because in the previous command, the depdir
31370            # was updated to point at the current build dependency install directory.
31371            . $builddepsfile
31372            # Now extract variables from the builddeps.conf files.
31373            theroot=${builddep_freetype2_ROOT}
31374            thecflags=${builddep_freetype2_CFLAGS}
31375            thelibs=${builddep_freetype2_LIBS}
31376            if test "x$depdir" = x; then
31377                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31378            fi
31379            FREETYPE2=$depdir
31380            if test "x$theroot" != x; then
31381               FREETYPE2="$theroot"
31382            fi
31383            if test "x$thecflags" != x; then
31384               FREETYPE2_CFLAGS="$thecflags"
31385            fi
31386            if test "x$thelibs" != x; then
31387               FREETYPE2_LIBS="$thelibs"
31388            fi
31389            FREETYPE2_FOUND=yes
31390            else FREETYPE2_FOUND=no
31391
31392        fi
31393        else FREETYPE2_FOUND=no
31394
31395    fi
31396
31397            USING_SYSTEM_FT_LIB=true
31398	fi
31399	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31400            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31401
31402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31403
31404  # Input might be given as Windows format, start by converting to
31405  # unix format.
31406  path="$FREETYPELOCATION"
31407  new_path=`$CYGPATH -u "$path"`
31408
31409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31412  # "foo.exe" is OK but "foo" is an error.
31413  #
31414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31415  # It is also a way to make sure we got the proper file name for the real test later on.
31416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31417  if test "x$test_shortpath" = x; then
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31419$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31420    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31421  fi
31422
31423  # Call helper function which possibly converts this using DOS-style short mode.
31424  # If so, the updated path is stored in $new_path.
31425
31426  input_path="$new_path"
31427  # Check if we need to convert this using DOS-style short mode. If the path
31428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31429  # take no chances and rewrite it.
31430  # Note: m4 eats our [], so we need to use [ and ] instead.
31431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31432  if test "x$has_forbidden_chars" != x; then
31433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31437      # Going to short mode and back again did indeed matter. Since short mode is
31438      # case insensitive, let's make it lowercase to improve readability.
31439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31440      # Now convert it back to Unix-stile (cygpath)
31441      input_path=`$CYGPATH -u "$shortmode_path"`
31442      new_path="$input_path"
31443    fi
31444  fi
31445
31446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31447  if test "x$test_cygdrive_prefix" = x; then
31448    # As a simple fix, exclude /usr/bin since it's not a real path.
31449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31451      # a path prefixed by /cygdrive for fixpath to work.
31452      new_path="$CYGWIN_ROOT_PATH$input_path"
31453    fi
31454  fi
31455
31456
31457  if test "x$path" != "x$new_path"; then
31458    FREETYPELOCATION="$new_path"
31459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31460$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31461  fi
31462
31463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31464
31465  path="$FREETYPELOCATION"
31466  has_colon=`$ECHO $path | $GREP ^.:`
31467  new_path="$path"
31468  if test "x$has_colon" = x; then
31469    # Not in mixed or Windows style, start by that.
31470    new_path=`cmd //c echo $path`
31471  fi
31472
31473
31474  input_path="$new_path"
31475  # Check if we need to convert this using DOS-style short mode. If the path
31476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31477  # take no chances and rewrite it.
31478  # Note: m4 eats our [], so we need to use [ and ] instead.
31479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31480  if test "x$has_forbidden_chars" != x; then
31481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31483  fi
31484
31485
31486  windows_path="$new_path"
31487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31488    unix_path=`$CYGPATH -u "$windows_path"`
31489    new_path="$unix_path"
31490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31492    new_path="$unix_path"
31493  fi
31494
31495  if test "x$path" != "x$new_path"; then
31496    FREETYPELOCATION="$new_path"
31497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31498$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31499  fi
31500
31501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31503
31504  else
31505    # We're on a posix platform. Hooray! :)
31506    path="$FREETYPELOCATION"
31507    has_space=`$ECHO "$path" | $GREP " "`
31508    if test "x$has_space" != x; then
31509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31510$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31512    fi
31513
31514    # Use eval to expand a potential ~
31515    eval path="$path"
31516    if test ! -f "$path" && test ! -d "$path"; then
31517      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31518    fi
31519
31520    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31521  fi
31522
31523	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31524$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31525	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31526	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31527	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31528 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31529                if ! test -s "$FREETYPE2_LIBS"; then
31530		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31531		fi
31532                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31533		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31534		fi
31535                USING_SYSTEM_FT_LIB=true
31536                FREETYPE2_FOUND=yes
31537	    fi
31538	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31539$as_echo "$FREETYPE2_FOUND" >&6; }
31540        fi
31541	if test "x$FREETYPE2_FOUND" = xno; then
31542
31543pkg_failed=no
31544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31545$as_echo_n "checking for FREETYPE2... " >&6; }
31546
31547if test -n "$FREETYPE2_CFLAGS"; then
31548    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31549 elif test -n "$PKG_CONFIG"; then
31550    if test -n "$PKG_CONFIG" && \
31551    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31552  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31553  ac_status=$?
31554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31555  test $ac_status = 0; }; then
31556  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31557else
31558  pkg_failed=yes
31559fi
31560 else
31561    pkg_failed=untried
31562fi
31563if test -n "$FREETYPE2_LIBS"; then
31564    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31565 elif test -n "$PKG_CONFIG"; then
31566    if test -n "$PKG_CONFIG" && \
31567    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31568  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31569  ac_status=$?
31570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31571  test $ac_status = 0; }; then
31572  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31573else
31574  pkg_failed=yes
31575fi
31576 else
31577    pkg_failed=untried
31578fi
31579
31580
31581
31582if test $pkg_failed = yes; then
31583
31584if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31585        _pkg_short_errors_supported=yes
31586else
31587        _pkg_short_errors_supported=no
31588fi
31589        if test $_pkg_short_errors_supported = yes; then
31590	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31591        else
31592	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31593        fi
31594	# Put the nasty error message in config.log where it belongs
31595	echo "$FREETYPE2_PKG_ERRORS" >&5
31596
31597	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31598$as_echo "no" >&6; }
31599                FREETYPE2_FOUND=no
31600elif test $pkg_failed = untried; then
31601	FREETYPE2_FOUND=no
31602else
31603	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31604	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31606$as_echo "yes" >&6; }
31607	FREETYPE2_FOUND=yes
31608fi
31609            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31610            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31611            USING_SYSTEM_FT_LIB=true
31612            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31613            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31614              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31615            fi
31616	fi
31617	if test "x$FREETYPE2_FOUND" = xno; then
31618	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31619$as_echo_n "checking for freetype in some standard locations... " >&6; }
31620
31621	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31622	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31623	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31624	    fi
31625	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31626	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31627	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31628	    fi
31629
31630	    PREV_CXXCFLAGS="$CXXFLAGS"
31631	    PREV_LDFLAGS="$LDFLAGS"
31632	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31633	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31634	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31635/* end confdefs.h.  */
31636#include<ft2build.h>
31637	                    #include FT_FREETYPE_H
31638	                   int main() { return 0; }
31639
31640_ACEOF
31641if ac_fn_cxx_try_link "$LINENO"; then :
31642
31643	                      # Yes, the default cflags and libs did the trick.
31644	                      FREETYPE2_FOUND=yes
31645	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31646	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31647
31648else
31649
31650	                      FREETYPE2_FOUND=no
31651
31652fi
31653rm -f core conftest.err conftest.$ac_objext \
31654    conftest$ac_exeext conftest.$ac_ext
31655            CXXCFLAGS="$PREV_CXXFLAGS"
31656	    LDFLAGS="$PREV_LDFLAGS"
31657	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31658$as_echo "$FREETYPE2_FOUND" >&6; }
31659            USING_SYSTEM_FT_LIB=true
31660	fi
31661	if test "x$FREETYPE2_FOUND" = xno; then
31662
31663    # Print a helpful message on how to acquire the necessary build dependency.
31664    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31665    MISSING_DEPENDENCY=freetype2
31666    PKGHANDLER_COMMAND=
31667
31668    case $PKGHANDLER in
31669	apt-get)
31670                apt_help     $MISSING_DEPENDENCY ;;
31671    yum)
31672                yum_help     $MISSING_DEPENDENCY ;;
31673	port)
31674                port_help    $MISSING_DEPENDENCY ;;
31675	pkgutil)
31676                pkgutil_help $MISSING_DEPENDENCY ;;
31677	pkgadd)
31678                pkgadd_help  $MISSING_DEPENDENCY ;;
31679    * )
31680      break ;;
31681    esac
31682
31683    if test "x$PKGHANDLER_COMMAND" != x; then
31684        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31685    fi
31686
31687		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31688	fi
31689
31690        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31691            # AC_CHECK_LIB does not support use of cl.exe
31692            PREV_LDFLAGS="$LDFLAGS"
31693            LDFLAGS="$FREETYPE2_LIBS"
31694            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31695$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31696if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31697  $as_echo_n "(cached) " >&6
31698else
31699  ac_check_lib_save_LIBS=$LIBS
31700LIBS="-lfreetype  $LIBS"
31701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31702/* end confdefs.h.  */
31703
31704/* Override any GCC internal prototype to avoid an error.
31705   Use char because int might match the return type of a GCC
31706   builtin and then its argument prototype would still apply.  */
31707#ifdef __cplusplus
31708extern "C"
31709#endif
31710char FT_Init_FreeType ();
31711int
31712main ()
31713{
31714return FT_Init_FreeType ();
31715  ;
31716  return 0;
31717}
31718_ACEOF
31719if ac_fn_cxx_try_link "$LINENO"; then :
31720  ac_cv_lib_freetype_FT_Init_FreeType=yes
31721else
31722  ac_cv_lib_freetype_FT_Init_FreeType=no
31723fi
31724rm -f core conftest.err conftest.$ac_objext \
31725    conftest$ac_exeext conftest.$ac_ext
31726LIBS=$ac_check_lib_save_LIBS
31727fi
31728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31729$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31730if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31731  FREETYPE2_FOUND=true
31732else
31733  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31734fi
31735
31736            LDFLAGS="$PREV_LDFLAGS"
31737        fi
31738fi
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748###############################################################################
31749#
31750# Check for alsa headers and libraries. Used on Linux/GNU systems.
31751#
31752
31753# Check whether --with-alsa was given.
31754if test "${with_alsa+set}" = set; then :
31755  withval=$with_alsa;
31756fi
31757
31758
31759# Check whether --with-alsa-include was given.
31760if test "${with_alsa_include+set}" = set; then :
31761  withval=$with_alsa_include;
31762fi
31763
31764
31765# Check whether --with-alsa-lib was given.
31766if test "${with_alsa_lib+set}" = set; then :
31767  withval=$with_alsa_lib;
31768fi
31769
31770
31771if test "x$ALSA_NOT_NEEDED" = xyes; then
31772	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31773		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31774$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31775	fi
31776	ALSA_CFLAGS=
31777	ALSA_LIBS=
31778else
31779	ALSA_FOUND=no
31780
31781	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31782	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31783	fi
31784
31785	if test "x${with_alsa}" != x; then
31786	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31787	    ALSA_CFLAGS="-I${with_alsa}/include"
31788	    ALSA_FOUND=yes
31789	fi
31790	if test "x${with_alsa_include}" != x; then
31791	    ALSA_CFLAGS="-I${with_alsa_include}"
31792	    ALSA_FOUND=yes
31793	fi
31794	if test "x${with_alsa_lib}" != x; then
31795	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31796	    ALSA_FOUND=yes
31797	fi
31798	if test "x$ALSA_FOUND" = xno; then
31799
31800
31801    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31802        # Source the builddeps file again, to make sure it uses the latest variables!
31803        . $builddepsfile
31804        # Look for a target and build machine specific resource!
31805        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31806        if test "x$resource" = x; then
31807            # Ok, lets instead look for a target specific resource
31808            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31809        fi
31810        if test "x$resource" = x; then
31811            # Ok, lets instead look for a build specific resource
31812            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31813        fi
31814        if test "x$resource" = x; then
31815            # Ok, lets instead look for a generic resource
31816            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31817            resource=${builddep_alsa}
31818        fi
31819        if test "x$resource" != x; then
31820            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31821$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31822	    # If the resource in the builddeps.conf file is an existing directory,
31823	    # for example /java/linux/cups
31824	    if test -d ${resource}; then
31825	       depdir=${resource}
31826	    else
31827
31828# alsa is for example mymodule
31829# $resource is for example libs/general/libmymod_1_2_3.zip
31830# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31831# $with_builddeps_dir is for example /localhome/builddeps
31832# depdir is the name of the variable into which we store the depdir, eg MYMOD
31833# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31834# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31835    filename=`basename $resource`
31836    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31837    filebase=${filename%%.*}
31838    extension=${filename#*.}
31839    installdir=$with_builddeps_dir/$filebase
31840    if test ! -f $installdir/$filename.unpacked; then
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31842$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31843        if test ! -d $installdir; then
31844            mkdir -p $installdir
31845        fi
31846        if test ! -d $installdir; then
31847            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31848        fi
31849        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31850        touch $tmpfile
31851        if test ! -f $tmpfile; then
31852            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31853        fi
31854
31855    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31856    # $tmpfile is the local file name for the downloaded file.
31857    VALID_TOOL=no
31858    if test "x$BDEPS_FTP" = xwget; then
31859       VALID_TOOL=yes
31860       wget -O $tmpfile $with_builddeps_server/$resource
31861    fi
31862    if test "x$BDEPS_FTP" = xlftp; then
31863       VALID_TOOL=yes
31864       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31865    fi
31866    if test "x$BDEPS_FTP" = xftp; then
31867        VALID_TOOL=yes
31868        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31869        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31870        FTPUSERPWD=${FTPSERVER%%@*}
31871        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31872            FTPUSER=${userpwd%%:*}
31873            FTPPWD=${userpwd#*@}
31874            FTPSERVER=${FTPSERVER#*@}
31875        else
31876            FTPUSER=ftp
31877            FTPPWD=ftp
31878        fi
31879        # the "pass" command does not work on some
31880        # ftp clients (read ftp.exe) but if it works,
31881        # passive mode is better!
31882        (\
31883            echo "user $FTPUSER $FTPPWD"        ;\
31884            echo "pass"                         ;\
31885            echo "bin"                          ;\
31886            echo "get $FTPPATH $tmpfile"              ;\
31887        ) | ftp -in $FTPSERVER
31888    fi
31889    if test "x$VALID_TOOL" != xyes; then
31890       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31891    fi
31892
31893        mv $tmpfile $installdir/$filename
31894        if test ! -s $installdir/$filename; then
31895            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31896        fi
31897        case "$extension" in
31898            zip)  echo "Unzipping $installdir/$filename..."
31899               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31900            ;;
31901            tar.gz) echo "Untaring $installdir/$filename..."
31902               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31903            ;;
31904            tgz) echo "Untaring $installdir/$filename..."
31905               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31906            ;;
31907            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31908            ;;
31909        esac
31910    fi
31911    if test -f $installdir/$filename.unpacked; then
31912        depdir=$installdir
31913    fi
31914
31915	    fi
31916            # Source the builddeps file again, because in the previous command, the depdir
31917            # was updated to point at the current build dependency install directory.
31918            . $builddepsfile
31919            # Now extract variables from the builddeps.conf files.
31920            theroot=${builddep_alsa_ROOT}
31921            thecflags=${builddep_alsa_CFLAGS}
31922            thelibs=${builddep_alsa_LIBS}
31923            if test "x$depdir" = x; then
31924                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31925            fi
31926            ALSA=$depdir
31927            if test "x$theroot" != x; then
31928               ALSA="$theroot"
31929            fi
31930            if test "x$thecflags" != x; then
31931               ALSA_CFLAGS="$thecflags"
31932            fi
31933            if test "x$thelibs" != x; then
31934               ALSA_LIBS="$thelibs"
31935            fi
31936            ALSA_FOUND=yes
31937            else ALSA_FOUND=no
31938
31939        fi
31940        else ALSA_FOUND=no
31941
31942    fi
31943
31944	fi
31945	if test "x$ALSA_FOUND" = xno; then
31946
31947pkg_failed=no
31948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31949$as_echo_n "checking for ALSA... " >&6; }
31950
31951if test -n "$ALSA_CFLAGS"; then
31952    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31953 elif test -n "$PKG_CONFIG"; then
31954    if test -n "$PKG_CONFIG" && \
31955    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31956  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31957  ac_status=$?
31958  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31959  test $ac_status = 0; }; then
31960  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31961else
31962  pkg_failed=yes
31963fi
31964 else
31965    pkg_failed=untried
31966fi
31967if test -n "$ALSA_LIBS"; then
31968    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31969 elif test -n "$PKG_CONFIG"; then
31970    if test -n "$PKG_CONFIG" && \
31971    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31972  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31973  ac_status=$?
31974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31975  test $ac_status = 0; }; then
31976  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31977else
31978  pkg_failed=yes
31979fi
31980 else
31981    pkg_failed=untried
31982fi
31983
31984
31985
31986if test $pkg_failed = yes; then
31987
31988if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31989        _pkg_short_errors_supported=yes
31990else
31991        _pkg_short_errors_supported=no
31992fi
31993        if test $_pkg_short_errors_supported = yes; then
31994	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31995        else
31996	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31997        fi
31998	# Put the nasty error message in config.log where it belongs
31999	echo "$ALSA_PKG_ERRORS" >&5
32000
32001	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32002$as_echo "no" >&6; }
32003                ALSA_FOUND=no
32004elif test $pkg_failed = untried; then
32005	ALSA_FOUND=no
32006else
32007	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32008	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32010$as_echo "yes" >&6; }
32011	ALSA_FOUND=yes
32012fi
32013	fi
32014	if test "x$ALSA_FOUND" = xno; then
32015	    for ac_header in alsa/asoundlib.h
32016do :
32017  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32018if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32019  cat >>confdefs.h <<_ACEOF
32020#define HAVE_ALSA_ASOUNDLIB_H 1
32021_ACEOF
32022 ALSA_FOUND=yes
32023	                      ALSA_CFLAGS=-Iignoreme
32024	                      ALSA_LIBS=-lasound
32025	                      DEFAULT_ALSA=yes
32026else
32027  ALSA_FOUND=no
32028fi
32029
32030done
32031
32032	fi
32033	if test "x$ALSA_FOUND" = xno; then
32034
32035    # Print a helpful message on how to acquire the necessary build dependency.
32036    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32037    MISSING_DEPENDENCY=alsa
32038    PKGHANDLER_COMMAND=
32039
32040    case $PKGHANDLER in
32041	apt-get)
32042                apt_help     $MISSING_DEPENDENCY ;;
32043    yum)
32044                yum_help     $MISSING_DEPENDENCY ;;
32045	port)
32046                port_help    $MISSING_DEPENDENCY ;;
32047	pkgutil)
32048                pkgutil_help $MISSING_DEPENDENCY ;;
32049	pkgadd)
32050                pkgadd_help  $MISSING_DEPENDENCY ;;
32051    * )
32052      break ;;
32053    esac
32054
32055    if test "x$PKGHANDLER_COMMAND" != x; then
32056        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32057    fi
32058
32059	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32060	fi
32061fi
32062
32063
32064
32065
32066
32067
32068
32069###############################################################################
32070#
32071# Check for the jpeg library
32072#
32073
32074USE_EXTERNAL_LIBJPEG=true
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32076$as_echo_n "checking for main in -ljpeg... " >&6; }
32077if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32078  $as_echo_n "(cached) " >&6
32079else
32080  ac_check_lib_save_LIBS=$LIBS
32081LIBS="-ljpeg  $LIBS"
32082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32083/* end confdefs.h.  */
32084
32085
32086int
32087main ()
32088{
32089return main ();
32090  ;
32091  return 0;
32092}
32093_ACEOF
32094if ac_fn_cxx_try_link "$LINENO"; then :
32095  ac_cv_lib_jpeg_main=yes
32096else
32097  ac_cv_lib_jpeg_main=no
32098fi
32099rm -f core conftest.err conftest.$ac_objext \
32100    conftest$ac_exeext conftest.$ac_ext
32101LIBS=$ac_check_lib_save_LIBS
32102fi
32103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32104$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32105if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32106  cat >>confdefs.h <<_ACEOF
32107#define HAVE_LIBJPEG 1
32108_ACEOF
32109
32110  LIBS="-ljpeg $LIBS"
32111
32112else
32113   USE_EXTERNAL_LIBJPEG=false
32114               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32115$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32116
32117fi
32118
32119
32120
32121###############################################################################
32122#
32123# Check for the gif library
32124#
32125
32126
32127# Check whether --with-giflib was given.
32128if test "${with_giflib+set}" = set; then :
32129  withval=$with_giflib;
32130fi
32131
32132
32133
32134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32135$as_echo_n "checking for which giflib to use... " >&6; }
32136
32137# default is bundled
32138DEFAULT_GIFLIB=bundled
32139
32140#
32141# if user didn't specify, use DEFAULT_GIFLIB
32142#
32143if test "x${with_giflib}" = "x"; then
32144    with_giflib=${DEFAULT_GIFLIB}
32145fi
32146
32147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32148$as_echo "${with_giflib}" >&6; }
32149
32150if test "x${with_giflib}" = "xbundled"; then
32151    USE_EXTERNAL_LIBGIF=false
32152elif test "x${with_giflib}" = "xsystem"; then
32153    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32154if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32155
32156else
32157   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32158fi
32159
32160
32161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32162$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32163if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32164  $as_echo_n "(cached) " >&6
32165else
32166  ac_check_lib_save_LIBS=$LIBS
32167LIBS="-lgif  $LIBS"
32168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32169/* end confdefs.h.  */
32170
32171/* Override any GCC internal prototype to avoid an error.
32172   Use char because int might match the return type of a GCC
32173   builtin and then its argument prototype would still apply.  */
32174#ifdef __cplusplus
32175extern "C"
32176#endif
32177char DGifGetCode ();
32178int
32179main ()
32180{
32181return DGifGetCode ();
32182  ;
32183  return 0;
32184}
32185_ACEOF
32186if ac_fn_cxx_try_link "$LINENO"; then :
32187  ac_cv_lib_gif_DGifGetCode=yes
32188else
32189  ac_cv_lib_gif_DGifGetCode=no
32190fi
32191rm -f core conftest.err conftest.$ac_objext \
32192    conftest$ac_exeext conftest.$ac_ext
32193LIBS=$ac_check_lib_save_LIBS
32194fi
32195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32196$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32197if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32198  cat >>confdefs.h <<_ACEOF
32199#define HAVE_LIBGIF 1
32200_ACEOF
32201
32202  LIBS="-lgif $LIBS"
32203
32204else
32205   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32206fi
32207
32208
32209    USE_EXTERNAL_LIBGIF=true
32210else
32211    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32212fi
32213
32214
32215###############################################################################
32216#
32217# Check for the zlib library
32218#
32219
32220
32221# Check whether --with-zlib was given.
32222if test "${with_zlib+set}" = set; then :
32223  withval=$with_zlib;
32224fi
32225
32226
32227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32228$as_echo_n "checking for compress in -lz... " >&6; }
32229if test "${ac_cv_lib_z_compress+set}" = set; then :
32230  $as_echo_n "(cached) " >&6
32231else
32232  ac_check_lib_save_LIBS=$LIBS
32233LIBS="-lz  $LIBS"
32234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32235/* end confdefs.h.  */
32236
32237/* Override any GCC internal prototype to avoid an error.
32238   Use char because int might match the return type of a GCC
32239   builtin and then its argument prototype would still apply.  */
32240#ifdef __cplusplus
32241extern "C"
32242#endif
32243char compress ();
32244int
32245main ()
32246{
32247return compress ();
32248  ;
32249  return 0;
32250}
32251_ACEOF
32252if ac_fn_cxx_try_link "$LINENO"; then :
32253  ac_cv_lib_z_compress=yes
32254else
32255  ac_cv_lib_z_compress=no
32256fi
32257rm -f core conftest.err conftest.$ac_objext \
32258    conftest$ac_exeext conftest.$ac_ext
32259LIBS=$ac_check_lib_save_LIBS
32260fi
32261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32262$as_echo "$ac_cv_lib_z_compress" >&6; }
32263if test "x$ac_cv_lib_z_compress" = x""yes; then :
32264   ZLIB_FOUND=yes
32265else
32266   ZLIB_FOUND=no
32267fi
32268
32269
32270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32271$as_echo_n "checking for which zlib to use... " >&6; }
32272
32273DEFAULT_ZLIB=bundled
32274if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32275#
32276# On macosx default is system...on others default is
32277#
32278    DEFAULT_ZLIB=system
32279fi
32280
32281if test "x${ZLIB_FOUND}" != "xyes"; then
32282#
32283# If we don't find any system...set default to bundled
32284#
32285    DEFAULT_ZLIB=bundled
32286fi
32287
32288#
32289# If user didn't specify, use DEFAULT_ZLIB
32290#
32291if test "x${with_zlib}" = "x"; then
32292    with_zlib=${DEFAULT_ZLIB}
32293fi
32294
32295if test "x${with_zlib}" = "xbundled"; then
32296    USE_EXTERNAL_LIBZ=false
32297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32298$as_echo "bundled" >&6; }
32299elif test "x${with_zlib}" = "xsystem"; then
32300    if test "x${ZLIB_FOUND}" = "xyes"; then
32301        USE_EXTERNAL_LIBZ=true
32302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32303$as_echo "system" >&6; }
32304    else
32305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32306$as_echo "system not found" >&6; }
32307        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32308    fi
32309else
32310    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32311fi
32312
32313
32314
32315###############################################################################
32316LIBZIP_CAN_USE_MMAP=true
32317
32318
32319
32320###############################################################################
32321#
32322# Check if altzone exists in time.h
32323#
32324
32325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32326/* end confdefs.h.  */
32327#include <time.h>
32328int
32329main ()
32330{
32331return (int)altzone;
32332  ;
32333  return 0;
32334}
32335_ACEOF
32336if ac_fn_cxx_try_link "$LINENO"; then :
32337  has_altzone=yes
32338else
32339  has_altzone=no
32340fi
32341rm -f core conftest.err conftest.$ac_objext \
32342    conftest$ac_exeext conftest.$ac_ext
32343if test "x$has_altzone" = xyes; then
32344
32345$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32346
32347fi
32348
32349###############################################################################
32350#
32351# Check the maths library
32352#
32353
32354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32355$as_echo_n "checking for cos in -lm... " >&6; }
32356if test "${ac_cv_lib_m_cos+set}" = set; then :
32357  $as_echo_n "(cached) " >&6
32358else
32359  ac_check_lib_save_LIBS=$LIBS
32360LIBS="-lm  $LIBS"
32361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32362/* end confdefs.h.  */
32363
32364/* Override any GCC internal prototype to avoid an error.
32365   Use char because int might match the return type of a GCC
32366   builtin and then its argument prototype would still apply.  */
32367#ifdef __cplusplus
32368extern "C"
32369#endif
32370char cos ();
32371int
32372main ()
32373{
32374return cos ();
32375  ;
32376  return 0;
32377}
32378_ACEOF
32379if ac_fn_cxx_try_link "$LINENO"; then :
32380  ac_cv_lib_m_cos=yes
32381else
32382  ac_cv_lib_m_cos=no
32383fi
32384rm -f core conftest.err conftest.$ac_objext \
32385    conftest$ac_exeext conftest.$ac_ext
32386LIBS=$ac_check_lib_save_LIBS
32387fi
32388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32389$as_echo "$ac_cv_lib_m_cos" >&6; }
32390if test "x$ac_cv_lib_m_cos" = x""yes; then :
32391  cat >>confdefs.h <<_ACEOF
32392#define HAVE_LIBM 1
32393_ACEOF
32394
32395  LIBS="-lm $LIBS"
32396
32397else
32398
32399                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32400$as_echo "$as_me: Maths library was not found" >&6;}
32401
32402fi
32403
32404
32405
32406###############################################################################
32407#
32408# Check for libdl.so
32409
32410save_LIBS="$LIBS"
32411LIBS=""
32412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32413$as_echo_n "checking for dlopen in -ldl... " >&6; }
32414if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32415  $as_echo_n "(cached) " >&6
32416else
32417  ac_check_lib_save_LIBS=$LIBS
32418LIBS="-ldl  $LIBS"
32419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32420/* end confdefs.h.  */
32421
32422/* Override any GCC internal prototype to avoid an error.
32423   Use char because int might match the return type of a GCC
32424   builtin and then its argument prototype would still apply.  */
32425#ifdef __cplusplus
32426extern "C"
32427#endif
32428char dlopen ();
32429int
32430main ()
32431{
32432return dlopen ();
32433  ;
32434  return 0;
32435}
32436_ACEOF
32437if ac_fn_cxx_try_link "$LINENO"; then :
32438  ac_cv_lib_dl_dlopen=yes
32439else
32440  ac_cv_lib_dl_dlopen=no
32441fi
32442rm -f core conftest.err conftest.$ac_objext \
32443    conftest$ac_exeext conftest.$ac_ext
32444LIBS=$ac_check_lib_save_LIBS
32445fi
32446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32447$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32448if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32449  cat >>confdefs.h <<_ACEOF
32450#define HAVE_LIBDL 1
32451_ACEOF
32452
32453  LIBS="-ldl $LIBS"
32454
32455fi
32456
32457LIBDL="$LIBS"
32458
32459LIBS="$save_LIBS"
32460
32461
32462
32463###############################################################################
32464#
32465# statically link libstdc++ before C++ ABI is stablized on Linux unless
32466# dynamic build is configured on command line.
32467#
32468
32469# Check whether --with-stdc++lib was given.
32470if test "${with_stdc__lib+set}" = set; then :
32471  withval=$with_stdc__lib;
32472    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32473        && test "x$with_stdc__lib" != xdefault; then
32474      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32475    fi
32476
32477else
32478  with_stdc__lib=default
32479
32480fi
32481
32482
32483if test "x$OPENJDK_TARGET_OS" = xlinux; then
32484    # Test if -lstdc++ works.
32485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32486$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32487    ac_ext=cpp
32488ac_cpp='$CXXCPP $CPPFLAGS'
32489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32492
32493    OLD_CXXFLAGS="$CXXFLAGS"
32494    CXXFLAGS="$CXXFLAGS -lstdc++"
32495    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32496/* end confdefs.h.  */
32497
32498int
32499main ()
32500{
32501return 0;
32502  ;
32503  return 0;
32504}
32505_ACEOF
32506if ac_fn_cxx_try_link "$LINENO"; then :
32507  has_dynamic_libstdcxx=yes
32508else
32509  has_dynamic_libstdcxx=no
32510fi
32511rm -f core conftest.err conftest.$ac_objext \
32512    conftest$ac_exeext conftest.$ac_ext
32513    CXXFLAGS="$OLD_CXXFLAGS"
32514    ac_ext=cpp
32515ac_cpp='$CXXCPP $CPPFLAGS'
32516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32519
32520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32521$as_echo "$has_dynamic_libstdcxx" >&6; }
32522
32523    # Test if stdc++ can be linked statically.
32524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32525$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32526    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32527    ac_ext=cpp
32528ac_cpp='$CXXCPP $CPPFLAGS'
32529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32532
32533    OLD_LIBS="$LIBS"
32534    OLD_CXX="$CXX"
32535    LIBS="$STATIC_STDCXX_FLAGS"
32536    CXX="$CC"
32537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32538/* end confdefs.h.  */
32539
32540int
32541main ()
32542{
32543return 0;
32544  ;
32545  return 0;
32546}
32547_ACEOF
32548if ac_fn_cxx_try_link "$LINENO"; then :
32549  has_static_libstdcxx=yes
32550else
32551  has_static_libstdcxx=no
32552fi
32553rm -f core conftest.err conftest.$ac_objext \
32554    conftest$ac_exeext conftest.$ac_ext
32555    LIBS="$OLD_LIBS"
32556    CXX="$OLD_CXX"
32557    ac_ext=cpp
32558ac_cpp='$CXXCPP $CPPFLAGS'
32559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32562
32563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32564$as_echo "$has_static_libstdcxx" >&6; }
32565
32566    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32567        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32568    fi
32569
32570    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32571        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32572    fi
32573
32574    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32575        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32576    fi
32577
32578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32579$as_echo_n "checking how to link with libstdc++... " >&6; }
32580    # If dynamic was requested, it's available since it would fail above otherwise.
32581    # If dynamic wasn't requested, go with static unless it isn't available.
32582    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32583        LIBCXX="$LIBCXX -lstdc++"
32584        LDCXX="$CXX"
32585        STATIC_CXX_SETTING="STATIC_CXX=false"
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32587$as_echo "dynamic" >&6; }
32588    else
32589        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32590        LDCXX="$CC"
32591        STATIC_CXX_SETTING="STATIC_CXX=true"
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32593$as_echo "static" >&6; }
32594    fi
32595fi
32596
32597
32598if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32599    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32600
32601pkg_failed=no
32602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32603$as_echo_n "checking for LIBFFI... " >&6; }
32604
32605if test -n "$LIBFFI_CFLAGS"; then
32606    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32607 elif test -n "$PKG_CONFIG"; then
32608    if test -n "$PKG_CONFIG" && \
32609    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32610  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32611  ac_status=$?
32612  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32613  test $ac_status = 0; }; then
32614  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32615else
32616  pkg_failed=yes
32617fi
32618 else
32619    pkg_failed=untried
32620fi
32621if test -n "$LIBFFI_LIBS"; then
32622    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32623 elif test -n "$PKG_CONFIG"; then
32624    if test -n "$PKG_CONFIG" && \
32625    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32626  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32627  ac_status=$?
32628  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32629  test $ac_status = 0; }; then
32630  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32631else
32632  pkg_failed=yes
32633fi
32634 else
32635    pkg_failed=untried
32636fi
32637
32638
32639
32640if test $pkg_failed = yes; then
32641
32642if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32643        _pkg_short_errors_supported=yes
32644else
32645        _pkg_short_errors_supported=no
32646fi
32647        if test $_pkg_short_errors_supported = yes; then
32648	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32649        else
32650	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32651        fi
32652	# Put the nasty error message in config.log where it belongs
32653	echo "$LIBFFI_PKG_ERRORS" >&5
32654
32655	as_fn_error $? "Package requirements (libffi) were not met:
32656
32657$LIBFFI_PKG_ERRORS
32658
32659Consider adjusting the PKG_CONFIG_PATH environment variable if you
32660installed software in a non-standard prefix.
32661
32662Alternatively, you may set the environment variables LIBFFI_CFLAGS
32663and LIBFFI_LIBS to avoid the need to call pkg-config.
32664See the pkg-config man page for more details.
32665" "$LINENO" 5
32666elif test $pkg_failed = untried; then
32667	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32669as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32670is in your PATH or set the PKG_CONFIG environment variable to the full
32671path to pkg-config.
32672
32673Alternatively, you may set the environment variables LIBFFI_CFLAGS
32674and LIBFFI_LIBS to avoid the need to call pkg-config.
32675See the pkg-config man page for more details.
32676
32677To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32678See \`config.log' for more details" "$LINENO" 5; }
32679else
32680	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32681	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32683$as_echo "yes" >&6; }
32684	:
32685fi
32686
32687fi
32688
32689if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32690    # Extract the first word of "llvm-config", so it can be a program name with args.
32691set dummy llvm-config; ac_word=$2
32692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32693$as_echo_n "checking for $ac_word... " >&6; }
32694if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32695  $as_echo_n "(cached) " >&6
32696else
32697  if test -n "$LLVM_CONFIG"; then
32698  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32699else
32700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32701for as_dir in $PATH
32702do
32703  IFS=$as_save_IFS
32704  test -z "$as_dir" && as_dir=.
32705    for ac_exec_ext in '' $ac_executable_extensions; do
32706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32707    ac_cv_prog_LLVM_CONFIG="llvm-config"
32708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32709    break 2
32710  fi
32711done
32712  done
32713IFS=$as_save_IFS
32714
32715fi
32716fi
32717LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32718if test -n "$LLVM_CONFIG"; then
32719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32720$as_echo "$LLVM_CONFIG" >&6; }
32721else
32722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32723$as_echo "no" >&6; }
32724fi
32725
32726
32727
32728    if test "x$LLVM_CONFIG" != xllvm-config; then
32729        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32730    fi
32731
32732    llvm_components="jit mcjit engine nativecodegen native"
32733    unset LLVM_CFLAGS
32734    for flag in $("$LLVM_CONFIG" --cxxflags); do
32735      if echo "${flag}" | grep -q '^-[ID]'; then
32736        if test "${flag}" != "-D_DEBUG" ; then
32737          if test "${LLVM_CFLAGS}" != "" ; then
32738            LLVM_CFLAGS="${LLVM_CFLAGS} "
32739          fi
32740          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32741        fi
32742      fi
32743    done
32744    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32745    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32746
32747    unset LLVM_LDFLAGS
32748    for flag in $("${LLVM_CONFIG}" --ldflags); do
32749      if echo "${flag}" | grep -q '^-L'; then
32750        if test "${LLVM_LDFLAGS}" != ""; then
32751          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32752        fi
32753        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32754      fi
32755    done
32756
32757    unset LLVM_LIBS
32758    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32759      if echo "${flag}" | grep -q '^-l'; then
32760        if test "${LLVM_LIBS}" != ""; then
32761          LLVM_LIBS="${LLVM_LIBS} "
32762        fi
32763        LLVM_LIBS="${LLVM_LIBS}${flag}"
32764      fi
32765    done
32766
32767
32768
32769
32770fi
32771
32772# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32773if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32774    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32775fi
32776
32777# TODO better (platform agnostic) test
32778if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32779    LIBCXX="-lstdc++"
32780fi
32781
32782
32783
32784
32785
32786# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32787
32788# When using cygwin or msys, we need a wrapper binary that renames
32789# /cygdrive/c/ arguments into c:/ arguments and peeks into
32790# @files and rewrites these too! This wrapper binary is
32791# called fixpath.
32792FIXPATH=
32793if test "x$OPENJDK_BUILD_OS" = xwindows; then
32794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32795$as_echo_n "checking if fixpath can be created... " >&6; }
32796    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32797    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32798    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32799      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32800      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32801      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32802      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32803    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32804      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32805      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32806
32807      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32808      # @ was chosen as separator to minimize risk of other tools messing around with it
32809      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32810      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32811
32812      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32813    fi
32814    rm -f $OUTPUT_ROOT/fixpath*
32815    cd $OUTPUT_ROOT
32816    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32817    cd $CURDIR
32818
32819    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32821$as_echo "no" >&6; }
32822        cat $OUTPUT_ROOT/fixpath1.log
32823        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32824    fi
32825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32826$as_echo "yes" >&6; }
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32828$as_echo_n "checking if fixpath.exe works... " >&6; }
32829    cd $OUTPUT_ROOT
32830    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32831    cd $CURDIR
32832    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32834$as_echo "no" >&6; }
32835        cat $OUTPUT_ROOT/fixpath2.log
32836        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32837    fi
32838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32839$as_echo "yes" >&6; }
32840    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32841fi
32842
32843
32844
32845
32846###############################################################################
32847#
32848# We need to do some final tweaking, when everything else is done.
32849#
32850###############################################################################
32851
32852
32853HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32854
32855
32856# The name of the Service Agent jar.
32857SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32858if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32859  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32860fi
32861
32862
32863
32864
32865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32866$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32867
32868if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32869    ENABLE_INTREE_EC=yes
32870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32871$as_echo "yes" >&6; }
32872else
32873    ENABLE_INTREE_EC=no
32874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32875$as_echo "no" >&6; }
32876fi
32877
32878
32879
32880
32881###############################################################################
32882#
32883# Configure parts of the build that only affect the build performance,
32884# not the result.
32885#
32886###############################################################################
32887
32888
32889  # How many cores do we have on this build system?
32890
32891# Check whether --with-num-cores was given.
32892if test "${with_num_cores+set}" = set; then :
32893  withval=$with_num_cores;
32894fi
32895
32896  if test "x$with_num_cores" = x; then
32897    # The number of cores were not specified, try to probe them.
32898
32899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32900$as_echo_n "checking for number of cores... " >&6; }
32901    NUM_CORES=1
32902    FOUND_CORES=no
32903
32904    if test -f /proc/cpuinfo; then
32905        # Looks like a Linux (or cygwin) system
32906        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32907        FOUND_CORES=yes
32908    elif test -x /usr/sbin/psrinfo; then
32909        # Looks like a Solaris system
32910        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32911        FOUND_CORES=yes
32912    elif test -x /usr/sbin/system_profiler; then
32913        # Looks like a MacOSX system
32914        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32915        FOUND_CORES=yes
32916    elif test -n "$NUMBER_OF_PROCESSORS"; then
32917        # On windows, look in the env
32918        NUM_CORES=$NUMBER_OF_PROCESSORS
32919        FOUND_CORES=yes
32920    fi
32921
32922    if test "x$FOUND_CORES" = xyes; then
32923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32924$as_echo "$NUM_CORES" >&6; }
32925    else
32926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32927$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32929$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32930    fi
32931
32932
32933  else
32934    NUM_CORES=$with_num_cores
32935  fi
32936
32937
32938
32939  # How much memory do we have on this build system?
32940
32941# Check whether --with-memory-size was given.
32942if test "${with_memory_size+set}" = set; then :
32943  withval=$with_memory_size;
32944fi
32945
32946  if test "x$with_memory_size" = x; then
32947    # The memory size was not specified, try to probe it.
32948
32949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32950$as_echo_n "checking for memory size... " >&6; }
32951    # Default to 1024 MB
32952    MEMORY_SIZE=1024
32953    FOUND_MEM=no
32954
32955    if test -f /proc/meminfo; then
32956        # Looks like a Linux (or cygwin) system
32957        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32958        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32959        FOUND_MEM=yes
32960    elif test -x /usr/sbin/prtconf; then
32961        # Looks like a Solaris system
32962        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32963        FOUND_MEM=yes
32964    elif test -x /usr/sbin/system_profiler; then
32965        # Looks like a MacOSX system
32966        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32967        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32968        FOUND_MEM=yes
32969    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32970        # Windows, but without cygwin
32971        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32972        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32973        FOUND_MEM=yes
32974    fi
32975
32976    if test "x$FOUND_MEM" = xyes; then
32977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32978$as_echo "$MEMORY_SIZE MB" >&6; }
32979    else
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32981$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32982        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32983$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32984    fi
32985
32986  else
32987    MEMORY_SIZE=$with_memory_size
32988  fi
32989
32990
32991
32992  # Provide a decent default number of parallel jobs for make depending on
32993  # number of cores, amount of memory and machine architecture.
32994
32995# Check whether --with-jobs was given.
32996if test "${with_jobs+set}" = set; then :
32997  withval=$with_jobs;
32998fi
32999
33000  if test "x$with_jobs" = x; then
33001    # Number of jobs was not specified, calculate.
33002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33003$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33004    # Approximate memory in GB, rounding up a bit.
33005    memory_gb=`expr $MEMORY_SIZE / 1100`
33006    # Pick the lowest of memory in gb and number of cores.
33007    if test "$memory_gb" -lt "$NUM_CORES"; then
33008      JOBS="$memory_gb"
33009    else
33010      JOBS="$NUM_CORES"
33011      # On bigger machines, leave some room for other processes to run
33012      if test "$JOBS" -gt "4"; then
33013        JOBS=`expr $JOBS '*' 90 / 100`
33014      fi
33015    fi
33016    # Cap number of jobs to 16
33017    if test "$JOBS" -gt "16"; then
33018      JOBS=16
33019    fi
33020    if test "$JOBS" -eq "0"; then
33021      JOBS=1
33022    fi
33023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33024$as_echo "$JOBS" >&6; }
33025  else
33026    JOBS=$with_jobs
33027  fi
33028
33029
33030
33031# Setup smart javac (after cores and memory have been setup)
33032
33033
33034# Check whether --with-sjavac-server-java was given.
33035if test "${with_sjavac_server_java+set}" = set; then :
33036  withval=$with_sjavac_server_java;
33037fi
33038
33039
33040if test "x$with_sjavac_server_java" != x; then
33041    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33042    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33043    if test "x$FOUND_VERSION" = x; then
33044        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33045    fi
33046else
33047    SJAVAC_SERVER_JAVA=""
33048    # Hotspot specific options.
33049
33050    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33051    $ECHO "Command: $JAVA -verbosegc -version" >&5
33052    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33053    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33054    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33055    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33056        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33057	JVM_ARG_OK=true
33058    else
33059	$ECHO "Arg failed:" >&5
33060	$ECHO "$OUTPUT" >&5
33061	JVM_ARG_OK=false
33062    fi
33063
33064    # JRockit specific options.
33065
33066    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33067    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33068    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33069    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33070    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33071    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33072        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33073	JVM_ARG_OK=true
33074    else
33075	$ECHO "Arg failed:" >&5
33076	$ECHO "$OUTPUT" >&5
33077	JVM_ARG_OK=false
33078    fi
33079
33080    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33081fi
33082
33083
33084if test "$MEMORY_SIZE" -gt "2500"; then
33085
33086    $ECHO "Check if jvm arg is ok: -d64" >&5
33087    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33088    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33089    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33090    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33091    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33092        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33093	JVM_ARG_OK=true
33094    else
33095	$ECHO "Arg failed:" >&5
33096	$ECHO "$OUTPUT" >&5
33097	JVM_ARG_OK=false
33098    fi
33099
33100    if test "$JVM_ARG_OK" = true; then
33101        JVM_64BIT=true
33102	JVM_ARG_OK=false
33103    fi
33104    fi
33105
33106if test "$JVM_64BIT" = true; then
33107    if test "$MEMORY_SIZE" -gt "17000"; then
33108
33109    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33110    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33111    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33112    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33113    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33114    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33115        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33116	JVM_ARG_OK=true
33117    else
33118	$ECHO "Arg failed:" >&5
33119	$ECHO "$OUTPUT" >&5
33120	JVM_ARG_OK=false
33121    fi
33122
33123    fi
33124    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33125
33126    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33127    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33128    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33129    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33130    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33131    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33132        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33133	JVM_ARG_OK=true
33134    else
33135	$ECHO "Arg failed:" >&5
33136	$ECHO "$OUTPUT" >&5
33137	JVM_ARG_OK=false
33138    fi
33139
33140    fi
33141    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33142
33143    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33144    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33145    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33146    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33147    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33148    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33149        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33150	JVM_ARG_OK=true
33151    else
33152	$ECHO "Arg failed:" >&5
33153	$ECHO "$OUTPUT" >&5
33154	JVM_ARG_OK=false
33155    fi
33156
33157    fi
33158    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33159
33160    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33161    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33162    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33163    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33164    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33165    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33166        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33167	JVM_ARG_OK=true
33168    else
33169	$ECHO "Arg failed:" >&5
33170	$ECHO "$OUTPUT" >&5
33171	JVM_ARG_OK=false
33172    fi
33173
33174    fi
33175fi
33176if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33177
33178    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33179    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33180    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33181    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33182    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33183    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33184        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33185	JVM_ARG_OK=true
33186    else
33187	$ECHO "Arg failed:" >&5
33188	$ECHO "$OUTPUT" >&5
33189	JVM_ARG_OK=false
33190    fi
33191
33192fi
33193if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33194
33195    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33196    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33197    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33198    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33199    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33200    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33201        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33202	JVM_ARG_OK=true
33203    else
33204	$ECHO "Arg failed:" >&5
33205	$ECHO "$OUTPUT" >&5
33206	JVM_ARG_OK=false
33207    fi
33208
33209fi
33210if test "$JVM_ARG_OK" = false; then
33211
33212    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33213    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33214    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33215    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33216    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33217    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33218        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33219	JVM_ARG_OK=true
33220    else
33221	$ECHO "Arg failed:" >&5
33222	$ECHO "$OUTPUT" >&5
33223	JVM_ARG_OK=false
33224    fi
33225
33226fi
33227
33228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33229$as_echo_n "checking whether to use sjavac... " >&6; }
33230# Check whether --enable-sjavac was given.
33231if test "${enable_sjavac+set}" = set; then :
33232  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33233else
33234  ENABLE_SJAVAC='no'
33235fi
33236
33237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33238$as_echo "$ENABLE_SJAVAC" >&6; }
33239
33240
33241if test "x$ENABLE_SJAVAC" = xyes; then
33242    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33243else
33244    SJAVAC_SERVER_DIR=
33245fi
33246
33247
33248
33249
33250# Can the C/C++ compiler use precompiled headers?
33251
33252
33253###############################################################################
33254#
33255# Can the C/C++ compiler use precompiled headers?
33256#
33257# Check whether --enable-precompiled-headers was given.
33258if test "${enable_precompiled_headers+set}" = set; then :
33259  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33260else
33261  ENABLE_PRECOMPH=yes
33262fi
33263
33264
33265USE_PRECOMPILED_HEADER=1
33266if test "x$ENABLE_PRECOMPH" = xno; then
33267    USE_PRECOMPILED_HEADER=0
33268fi
33269
33270if test "x$ENABLE_PRECOMPH" = xyes; then
33271    # Check that the compiler actually supports precomp headers.
33272    if test "x$GCC" = xyes; then
33273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33274$as_echo_n "checking that precompiled headers work... " >&6; }
33275         echo "int alfa();" > conftest.h
33276         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33277         if test ! -f conftest.hpp.gch; then
33278             USE_PRECOMPILED_HEADER=0
33279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33280$as_echo "no" >&6; }
33281         else
33282             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33283$as_echo "yes" >&6; }
33284         fi
33285         rm -f conftest.h conftest.hpp.gch
33286    fi
33287fi
33288
33289
33290
33291
33292# Setup use of ccache, if available
33293
33294    # Check whether --enable-ccache was given.
33295if test "${enable_ccache+set}" = set; then :
33296  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33297else
33298  ENABLE_CCACHE=yes
33299fi
33300
33301    if test "x$ENABLE_CCACHE" = xyes; then
33302        OLD_PATH="$PATH"
33303        if test "x$TOOLS_DIR" != x; then
33304          PATH=$TOOLS_DIR:$PATH
33305        fi
33306        # Extract the first word of "ccache", so it can be a program name with args.
33307set dummy ccache; ac_word=$2
33308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33309$as_echo_n "checking for $ac_word... " >&6; }
33310if test "${ac_cv_path_CCACHE+set}" = set; then :
33311  $as_echo_n "(cached) " >&6
33312else
33313  case $CCACHE in
33314  [\\/]* | ?:[\\/]*)
33315  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33316  ;;
33317  *)
33318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33319for as_dir in $PATH
33320do
33321  IFS=$as_save_IFS
33322  test -z "$as_dir" && as_dir=.
33323    for ac_exec_ext in '' $ac_executable_extensions; do
33324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33325    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33327    break 2
33328  fi
33329done
33330  done
33331IFS=$as_save_IFS
33332
33333  ;;
33334esac
33335fi
33336CCACHE=$ac_cv_path_CCACHE
33337if test -n "$CCACHE"; then
33338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33339$as_echo "$CCACHE" >&6; }
33340else
33341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33342$as_echo "no" >&6; }
33343fi
33344
33345
33346        PATH="$OLD_PATH"
33347    else
33348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33349$as_echo_n "checking for ccache... " >&6; }
33350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33351$as_echo "explicitly disabled" >&6; }
33352        CCACHE=
33353    fi
33354
33355
33356
33357# Check whether --with-ccache-dir was given.
33358if test "${with_ccache_dir+set}" = set; then :
33359  withval=$with_ccache_dir;
33360fi
33361
33362
33363    if test "x$with_ccache_dir" != x; then
33364        # When using a non home ccache directory, assume the use is to share ccache files
33365        # with other users. Thus change the umask.
33366        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33367    fi
33368    CCACHE_FOUND=""
33369    if test "x$CCACHE" != x; then
33370
33371    if test "x$CCACHE" != x; then
33372        CCACHE_FOUND="true"
33373        # Only use ccache if it is 3.1.4 or later, which supports
33374        # precompiled headers.
33375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33376$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33377        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33378        if test "x$HAS_GOOD_CCACHE" = x; then
33379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33380$as_echo "no, disabling ccache" >&6; }
33381            CCACHE=
33382        else
33383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33384$as_echo "yes" >&6; }
33385            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33386$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33387            PUSHED_FLAGS="$CXXFLAGS"
33388            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33389            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33390/* end confdefs.h.  */
33391
33392int
33393main ()
33394{
33395
33396  ;
33397  return 0;
33398}
33399_ACEOF
33400if ac_fn_cxx_try_compile "$LINENO"; then :
33401  CC_KNOWS_CCACHE_TRICK=yes
33402else
33403  CC_KNOWS_CCACHE_TRICK=no
33404fi
33405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33406            CXXFLAGS="$PUSHED_FLAGS"
33407            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33408                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33409$as_echo "yes" >&6; }
33410            else
33411                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33412$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33413                CCACHE=
33414            fi
33415        fi
33416    fi
33417
33418    if test "x$CCACHE" != x; then
33419        CCACHE_SLOPPINESS=time_macros
33420        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33421        CCACHE_FLAGS=-fpch-preprocess
33422
33423        if test "x$SET_CCACHE_DIR" != x; then
33424            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33425	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33426        fi
33427    fi
33428
33429    fi
33430
33431
33432###############################################################################
33433#
33434# And now the finish...
33435#
33436###############################################################################
33437
33438# Check for some common pitfalls
33439
33440  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33441    file_to_test="$SRC_ROOT/LICENSE"
33442    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33443      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
33444    fi
33445  fi
33446
33447
33448
33449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33450$as_echo_n "checking if build directory is on local disk... " >&6; }
33451
33452	# df -l lists only local disks; if the given directory is not found then
33453	# a non-zero exit code is given
33454  if test "x$DF" = x; then
33455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33456      # msys does not have df; use Windows "net use" instead.
33457      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33458      if test "x$IS_NETWORK_DISK" = x; then
33459        OUTPUT_DIR_IS_LOCAL="yes"
33460      else
33461        OUTPUT_DIR_IS_LOCAL="no"
33462      fi
33463    else
33464      # No df here, say it's local
33465      OUTPUT_DIR_IS_LOCAL="yes"
33466    fi
33467  else
33468    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33469      OUTPUT_DIR_IS_LOCAL="yes"
33470    else
33471      OUTPUT_DIR_IS_LOCAL="no"
33472    fi
33473  fi
33474
33475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33476$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33477
33478
33479
33480# Check if the user has any old-style ALT_ variables set.
33481FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33482
33483# Before generating output files, test if they exist. If they do, this is a reconfigure.
33484# Since we can't properly handle the dependencies for this, warn the user about the situation
33485if test -e $OUTPUT_ROOT/spec.gmk; then
33486  IS_RECONFIGURE=yes
33487else
33488  IS_RECONFIGURE=no
33489fi
33490
33491if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33492  HIDE_PERFORMANCE_HINTS=yes
33493else
33494  HIDE_PERFORMANCE_HINTS=no
33495  # Hide it the next time around...
33496  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33497fi
33498
33499
33500
33501# At the end, call the custom hook. (Dummy macro if no custom sources available)
33502
33503
33504# We're messing a bit with internal autoconf variables to put the config.status
33505# in the output directory instead of the current directory.
33506CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33507# Create the actual output files. Now the main work of configure is done.
33508cat >confcache <<\_ACEOF
33509# This file is a shell script that caches the results of configure
33510# tests run on this system so they can be shared between configure
33511# scripts and configure runs, see configure's option --config-cache.
33512# It is not useful on other systems.  If it contains results you don't
33513# want to keep, you may remove or edit it.
33514#
33515# config.status only pays attention to the cache file if you give it
33516# the --recheck option to rerun configure.
33517#
33518# `ac_cv_env_foo' variables (set or unset) will be overridden when
33519# loading this file, other *unset* `ac_cv_foo' will be assigned the
33520# following values.
33521
33522_ACEOF
33523
33524# The following way of writing the cache mishandles newlines in values,
33525# but we know of no workaround that is simple, portable, and efficient.
33526# So, we kill variables containing newlines.
33527# Ultrix sh set writes to stderr and can't be redirected directly,
33528# and sets the high bit in the cache file unless we assign to the vars.
33529(
33530  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33531    eval ac_val=\$$ac_var
33532    case $ac_val in #(
33533    *${as_nl}*)
33534      case $ac_var in #(
33535      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33536$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33537      esac
33538      case $ac_var in #(
33539      _ | IFS | as_nl) ;; #(
33540      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33541      *) { eval $ac_var=; unset $ac_var;} ;;
33542      esac ;;
33543    esac
33544  done
33545
33546  (set) 2>&1 |
33547    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33548    *${as_nl}ac_space=\ *)
33549      # `set' does not quote correctly, so add quotes: double-quote
33550      # substitution turns \\\\ into \\, and sed turns \\ into \.
33551      sed -n \
33552	"s/'/'\\\\''/g;
33553	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33554      ;; #(
33555    *)
33556      # `set' quotes correctly as required by POSIX, so do not add quotes.
33557      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33558      ;;
33559    esac |
33560    sort
33561) |
33562  sed '
33563     /^ac_cv_env_/b end
33564     t clear
33565     :clear
33566     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33567     t end
33568     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33569     :end' >>confcache
33570if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33571  if test -w "$cache_file"; then
33572    test "x$cache_file" != "x/dev/null" &&
33573      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33574$as_echo "$as_me: updating cache $cache_file" >&6;}
33575    cat confcache >$cache_file
33576  else
33577    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33578$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33579  fi
33580fi
33581rm -f confcache
33582
33583test "x$prefix" = xNONE && prefix=$ac_default_prefix
33584# Let make expand exec_prefix.
33585test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33586
33587DEFS=-DHAVE_CONFIG_H
33588
33589ac_libobjs=
33590ac_ltlibobjs=
33591U=
33592for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33593  # 1. Remove the extension, and $U if already installed.
33594  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33595  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33596  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33597  #    will be set to the directory where LIBOBJS objects are built.
33598  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33599  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33600done
33601LIBOBJS=$ac_libobjs
33602
33603LTLIBOBJS=$ac_ltlibobjs
33604
33605
33606
33607: ${CONFIG_STATUS=./config.status}
33608ac_write_fail=0
33609ac_clean_files_save=$ac_clean_files
33610ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33611{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33612$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33613as_write_fail=0
33614cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33615#! $SHELL
33616# Generated by $as_me.
33617# Run this file to recreate the current configuration.
33618# Compiler output produced by configure, useful for debugging
33619# configure, is in config.log if it exists.
33620
33621debug=false
33622ac_cs_recheck=false
33623ac_cs_silent=false
33624
33625SHELL=\${CONFIG_SHELL-$SHELL}
33626export SHELL
33627_ASEOF
33628cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33629## -------------------- ##
33630## M4sh Initialization. ##
33631## -------------------- ##
33632
33633# Be more Bourne compatible
33634DUALCASE=1; export DUALCASE # for MKS sh
33635if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33636  emulate sh
33637  NULLCMD=:
33638  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33639  # is contrary to our usage.  Disable this feature.
33640  alias -g '${1+"$@"}'='"$@"'
33641  setopt NO_GLOB_SUBST
33642else
33643  case `(set -o) 2>/dev/null` in #(
33644  *posix*) :
33645    set -o posix ;; #(
33646  *) :
33647     ;;
33648esac
33649fi
33650
33651
33652as_nl='
33653'
33654export as_nl
33655# Printing a long string crashes Solaris 7 /usr/bin/printf.
33656as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33657as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33658as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33659# Prefer a ksh shell builtin over an external printf program on Solaris,
33660# but without wasting forks for bash or zsh.
33661if test -z "$BASH_VERSION$ZSH_VERSION" \
33662    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33663  as_echo='print -r --'
33664  as_echo_n='print -rn --'
33665elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33666  as_echo='printf %s\n'
33667  as_echo_n='printf %s'
33668else
33669  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33670    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33671    as_echo_n='/usr/ucb/echo -n'
33672  else
33673    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33674    as_echo_n_body='eval
33675      arg=$1;
33676      case $arg in #(
33677      *"$as_nl"*)
33678	expr "X$arg" : "X\\(.*\\)$as_nl";
33679	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33680      esac;
33681      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33682    '
33683    export as_echo_n_body
33684    as_echo_n='sh -c $as_echo_n_body as_echo'
33685  fi
33686  export as_echo_body
33687  as_echo='sh -c $as_echo_body as_echo'
33688fi
33689
33690# The user is always right.
33691if test "${PATH_SEPARATOR+set}" != set; then
33692  PATH_SEPARATOR=:
33693  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33694    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33695      PATH_SEPARATOR=';'
33696  }
33697fi
33698
33699
33700# IFS
33701# We need space, tab and new line, in precisely that order.  Quoting is
33702# there to prevent editors from complaining about space-tab.
33703# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33704# splitting by setting IFS to empty value.)
33705IFS=" ""	$as_nl"
33706
33707# Find who we are.  Look in the path if we contain no directory separator.
33708case $0 in #((
33709  *[\\/]* ) as_myself=$0 ;;
33710  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33711for as_dir in $PATH
33712do
33713  IFS=$as_save_IFS
33714  test -z "$as_dir" && as_dir=.
33715    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33716  done
33717IFS=$as_save_IFS
33718
33719     ;;
33720esac
33721# We did not find ourselves, most probably we were run as `sh COMMAND'
33722# in which case we are not to be found in the path.
33723if test "x$as_myself" = x; then
33724  as_myself=$0
33725fi
33726if test ! -f "$as_myself"; then
33727  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33728  exit 1
33729fi
33730
33731# Unset variables that we do not need and which cause bugs (e.g. in
33732# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33733# suppresses any "Segmentation fault" message there.  '((' could
33734# trigger a bug in pdksh 5.2.14.
33735for as_var in BASH_ENV ENV MAIL MAILPATH
33736do eval test x\${$as_var+set} = xset \
33737  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33738done
33739PS1='$ '
33740PS2='> '
33741PS4='+ '
33742
33743# NLS nuisances.
33744LC_ALL=C
33745export LC_ALL
33746LANGUAGE=C
33747export LANGUAGE
33748
33749# CDPATH.
33750(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33751
33752
33753# as_fn_error STATUS ERROR [LINENO LOG_FD]
33754# ----------------------------------------
33755# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33756# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33757# script with STATUS, using 1 if that was 0.
33758as_fn_error ()
33759{
33760  as_status=$1; test $as_status -eq 0 && as_status=1
33761  if test "$4"; then
33762    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33763    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33764  fi
33765  $as_echo "$as_me: error: $2" >&2
33766  as_fn_exit $as_status
33767} # as_fn_error
33768
33769
33770# as_fn_set_status STATUS
33771# -----------------------
33772# Set $? to STATUS, without forking.
33773as_fn_set_status ()
33774{
33775  return $1
33776} # as_fn_set_status
33777
33778# as_fn_exit STATUS
33779# -----------------
33780# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33781as_fn_exit ()
33782{
33783  set +e
33784  as_fn_set_status $1
33785  exit $1
33786} # as_fn_exit
33787
33788# as_fn_unset VAR
33789# ---------------
33790# Portably unset VAR.
33791as_fn_unset ()
33792{
33793  { eval $1=; unset $1;}
33794}
33795as_unset=as_fn_unset
33796# as_fn_append VAR VALUE
33797# ----------------------
33798# Append the text in VALUE to the end of the definition contained in VAR. Take
33799# advantage of any shell optimizations that allow amortized linear growth over
33800# repeated appends, instead of the typical quadratic growth present in naive
33801# implementations.
33802if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33803  eval 'as_fn_append ()
33804  {
33805    eval $1+=\$2
33806  }'
33807else
33808  as_fn_append ()
33809  {
33810    eval $1=\$$1\$2
33811  }
33812fi # as_fn_append
33813
33814# as_fn_arith ARG...
33815# ------------------
33816# Perform arithmetic evaluation on the ARGs, and store the result in the
33817# global $as_val. Take advantage of shells that can avoid forks. The arguments
33818# must be portable across $(()) and expr.
33819if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33820  eval 'as_fn_arith ()
33821  {
33822    as_val=$(( $* ))
33823  }'
33824else
33825  as_fn_arith ()
33826  {
33827    as_val=`expr "$@" || test $? -eq 1`
33828  }
33829fi # as_fn_arith
33830
33831
33832if expr a : '\(a\)' >/dev/null 2>&1 &&
33833   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33834  as_expr=expr
33835else
33836  as_expr=false
33837fi
33838
33839if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33840  as_basename=basename
33841else
33842  as_basename=false
33843fi
33844
33845if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33846  as_dirname=dirname
33847else
33848  as_dirname=false
33849fi
33850
33851as_me=`$as_basename -- "$0" ||
33852$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33853	 X"$0" : 'X\(//\)$' \| \
33854	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33855$as_echo X/"$0" |
33856    sed '/^.*\/\([^/][^/]*\)\/*$/{
33857	    s//\1/
33858	    q
33859	  }
33860	  /^X\/\(\/\/\)$/{
33861	    s//\1/
33862	    q
33863	  }
33864	  /^X\/\(\/\).*/{
33865	    s//\1/
33866	    q
33867	  }
33868	  s/.*/./; q'`
33869
33870# Avoid depending upon Character Ranges.
33871as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33872as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33873as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33874as_cr_digits='0123456789'
33875as_cr_alnum=$as_cr_Letters$as_cr_digits
33876
33877ECHO_C= ECHO_N= ECHO_T=
33878case `echo -n x` in #(((((
33879-n*)
33880  case `echo 'xy\c'` in
33881  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33882  xy)  ECHO_C='\c';;
33883  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33884       ECHO_T='	';;
33885  esac;;
33886*)
33887  ECHO_N='-n';;
33888esac
33889
33890rm -f conf$$ conf$$.exe conf$$.file
33891if test -d conf$$.dir; then
33892  rm -f conf$$.dir/conf$$.file
33893else
33894  rm -f conf$$.dir
33895  mkdir conf$$.dir 2>/dev/null
33896fi
33897if (echo >conf$$.file) 2>/dev/null; then
33898  if ln -s conf$$.file conf$$ 2>/dev/null; then
33899    as_ln_s='ln -s'
33900    # ... but there are two gotchas:
33901    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33902    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33903    # In both cases, we have to default to `cp -p'.
33904    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33905      as_ln_s='cp -p'
33906  elif ln conf$$.file conf$$ 2>/dev/null; then
33907    as_ln_s=ln
33908  else
33909    as_ln_s='cp -p'
33910  fi
33911else
33912  as_ln_s='cp -p'
33913fi
33914rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33915rmdir conf$$.dir 2>/dev/null
33916
33917
33918# as_fn_mkdir_p
33919# -------------
33920# Create "$as_dir" as a directory, including parents if necessary.
33921as_fn_mkdir_p ()
33922{
33923
33924  case $as_dir in #(
33925  -*) as_dir=./$as_dir;;
33926  esac
33927  test -d "$as_dir" || eval $as_mkdir_p || {
33928    as_dirs=
33929    while :; do
33930      case $as_dir in #(
33931      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33932      *) as_qdir=$as_dir;;
33933      esac
33934      as_dirs="'$as_qdir' $as_dirs"
33935      as_dir=`$as_dirname -- "$as_dir" ||
33936$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33937	 X"$as_dir" : 'X\(//\)[^/]' \| \
33938	 X"$as_dir" : 'X\(//\)$' \| \
33939	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33940$as_echo X"$as_dir" |
33941    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33942	    s//\1/
33943	    q
33944	  }
33945	  /^X\(\/\/\)[^/].*/{
33946	    s//\1/
33947	    q
33948	  }
33949	  /^X\(\/\/\)$/{
33950	    s//\1/
33951	    q
33952	  }
33953	  /^X\(\/\).*/{
33954	    s//\1/
33955	    q
33956	  }
33957	  s/.*/./; q'`
33958      test -d "$as_dir" && break
33959    done
33960    test -z "$as_dirs" || eval "mkdir $as_dirs"
33961  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33962
33963
33964} # as_fn_mkdir_p
33965if mkdir -p . 2>/dev/null; then
33966  as_mkdir_p='mkdir -p "$as_dir"'
33967else
33968  test -d ./-p && rmdir ./-p
33969  as_mkdir_p=false
33970fi
33971
33972if test -x / >/dev/null 2>&1; then
33973  as_test_x='test -x'
33974else
33975  if ls -dL / >/dev/null 2>&1; then
33976    as_ls_L_option=L
33977  else
33978    as_ls_L_option=
33979  fi
33980  as_test_x='
33981    eval sh -c '\''
33982      if test -d "$1"; then
33983	test -d "$1/.";
33984      else
33985	case $1 in #(
33986	-*)set "./$1";;
33987	esac;
33988	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33989	???[sx]*):;;*)false;;esac;fi
33990    '\'' sh
33991  '
33992fi
33993as_executable_p=$as_test_x
33994
33995# Sed expression to map a string onto a valid CPP name.
33996as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33997
33998# Sed expression to map a string onto a valid variable name.
33999as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34000
34001
34002exec 6>&1
34003## ----------------------------------- ##
34004## Main body of $CONFIG_STATUS script. ##
34005## ----------------------------------- ##
34006_ASEOF
34007test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34008
34009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34010# Save the log message, to keep $0 and so on meaningful, and to
34011# report actual input values of CONFIG_FILES etc. instead of their
34012# values after options handling.
34013ac_log="
34014This file was extended by OpenJDK $as_me jdk8, which was
34015generated by GNU Autoconf 2.67.  Invocation command line was
34016
34017  CONFIG_FILES    = $CONFIG_FILES
34018  CONFIG_HEADERS  = $CONFIG_HEADERS
34019  CONFIG_LINKS    = $CONFIG_LINKS
34020  CONFIG_COMMANDS = $CONFIG_COMMANDS
34021  $ $0 $@
34022
34023on `(hostname || uname -n) 2>/dev/null | sed 1q`
34024"
34025
34026_ACEOF
34027
34028case $ac_config_files in *"
34029"*) set x $ac_config_files; shift; ac_config_files=$*;;
34030esac
34031
34032case $ac_config_headers in *"
34033"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34034esac
34035
34036
34037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34038# Files that config.status was made for.
34039config_files="$ac_config_files"
34040config_headers="$ac_config_headers"
34041
34042_ACEOF
34043
34044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34045ac_cs_usage="\
34046\`$as_me' instantiates files and other configuration actions
34047from templates according to the current configuration.  Unless the files
34048and actions are specified as TAGs, all are instantiated by default.
34049
34050Usage: $0 [OPTION]... [TAG]...
34051
34052  -h, --help       print this help, then exit
34053  -V, --version    print version number and configuration settings, then exit
34054      --config     print configuration, then exit
34055  -q, --quiet, --silent
34056                   do not print progress messages
34057  -d, --debug      don't remove temporary files
34058      --recheck    update $as_me by reconfiguring in the same conditions
34059      --file=FILE[:TEMPLATE]
34060                   instantiate the configuration file FILE
34061      --header=FILE[:TEMPLATE]
34062                   instantiate the configuration header FILE
34063
34064Configuration files:
34065$config_files
34066
34067Configuration headers:
34068$config_headers
34069
34070Report bugs to <build-dev@openjdk.java.net>.
34071OpenJDK home page: <http://openjdk.java.net>."
34072
34073_ACEOF
34074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34075ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34076ac_cs_version="\\
34077OpenJDK config.status jdk8
34078configured by $0, generated by GNU Autoconf 2.67,
34079  with options \\"\$ac_cs_config\\"
34080
34081Copyright (C) 2010 Free Software Foundation, Inc.
34082This config.status script is free software; the Free Software Foundation
34083gives unlimited permission to copy, distribute and modify it."
34084
34085ac_pwd='$ac_pwd'
34086srcdir='$srcdir'
34087AWK='$AWK'
34088test -n "\$AWK" || AWK=awk
34089_ACEOF
34090
34091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34092# The default lists apply if the user does not specify any file.
34093ac_need_defaults=:
34094while test $# != 0
34095do
34096  case $1 in
34097  --*=?*)
34098    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34099    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34100    ac_shift=:
34101    ;;
34102  --*=)
34103    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34104    ac_optarg=
34105    ac_shift=:
34106    ;;
34107  *)
34108    ac_option=$1
34109    ac_optarg=$2
34110    ac_shift=shift
34111    ;;
34112  esac
34113
34114  case $ac_option in
34115  # Handling of the options.
34116  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34117    ac_cs_recheck=: ;;
34118  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34119    $as_echo "$ac_cs_version"; exit ;;
34120  --config | --confi | --conf | --con | --co | --c )
34121    $as_echo "$ac_cs_config"; exit ;;
34122  --debug | --debu | --deb | --de | --d | -d )
34123    debug=: ;;
34124  --file | --fil | --fi | --f )
34125    $ac_shift
34126    case $ac_optarg in
34127    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34128    '') as_fn_error $? "missing file argument" ;;
34129    esac
34130    as_fn_append CONFIG_FILES " '$ac_optarg'"
34131    ac_need_defaults=false;;
34132  --header | --heade | --head | --hea )
34133    $ac_shift
34134    case $ac_optarg in
34135    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34136    esac
34137    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34138    ac_need_defaults=false;;
34139  --he | --h)
34140    # Conflict between --help and --header
34141    as_fn_error $? "ambiguous option: \`$1'
34142Try \`$0 --help' for more information.";;
34143  --help | --hel | -h )
34144    $as_echo "$ac_cs_usage"; exit ;;
34145  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34146  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34147    ac_cs_silent=: ;;
34148
34149  # This is an error.
34150  -*) as_fn_error $? "unrecognized option: \`$1'
34151Try \`$0 --help' for more information." ;;
34152
34153  *) as_fn_append ac_config_targets " $1"
34154     ac_need_defaults=false ;;
34155
34156  esac
34157  shift
34158done
34159
34160ac_configure_extra_args=
34161
34162if $ac_cs_silent; then
34163  exec 6>/dev/null
34164  ac_configure_extra_args="$ac_configure_extra_args --silent"
34165fi
34166
34167_ACEOF
34168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34169if \$ac_cs_recheck; then
34170  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34171  shift
34172  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34173  CONFIG_SHELL='$SHELL'
34174  export CONFIG_SHELL
34175  exec "\$@"
34176fi
34177
34178_ACEOF
34179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34180exec 5>>config.log
34181{
34182  echo
34183  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34184## Running $as_me. ##
34185_ASBOX
34186  $as_echo "$ac_log"
34187} >&5
34188
34189_ACEOF
34190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34191_ACEOF
34192
34193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34194
34195# Handling of arguments.
34196for ac_config_target in $ac_config_targets
34197do
34198  case $ac_config_target in
34199    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34200    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34201    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34202    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34203    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34204    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34205    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34206
34207  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34208  esac
34209done
34210
34211
34212# If the user did not use the arguments to specify the items to instantiate,
34213# then the envvar interface is used.  Set only those that are not.
34214# We use the long form for the default assignment because of an extremely
34215# bizarre bug on SunOS 4.1.3.
34216if $ac_need_defaults; then
34217  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34218  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34219fi
34220
34221# Have a temporary directory for convenience.  Make it in the build tree
34222# simply because there is no reason against having it here, and in addition,
34223# creating and moving files from /tmp can sometimes cause problems.
34224# Hook for its removal unless debugging.
34225# Note that there is a small window in which the directory will not be cleaned:
34226# after its creation but before its name has been assigned to `$tmp'.
34227$debug ||
34228{
34229  tmp=
34230  trap 'exit_status=$?
34231  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34232' 0
34233  trap 'as_fn_exit 1' 1 2 13 15
34234}
34235# Create a (secure) tmp directory for tmp files.
34236
34237{
34238  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34239  test -n "$tmp" && test -d "$tmp"
34240}  ||
34241{
34242  tmp=./conf$$-$RANDOM
34243  (umask 077 && mkdir "$tmp")
34244} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34245
34246# Set up the scripts for CONFIG_FILES section.
34247# No need to generate them if there are no CONFIG_FILES.
34248# This happens for instance with `./config.status config.h'.
34249if test -n "$CONFIG_FILES"; then
34250
34251
34252ac_cr=`echo X | tr X '\015'`
34253# On cygwin, bash can eat \r inside `` if the user requested igncr.
34254# But we know of no other shell where ac_cr would be empty at this
34255# point, so we can use a bashism as a fallback.
34256if test "x$ac_cr" = x; then
34257  eval ac_cr=\$\'\\r\'
34258fi
34259ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34260if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34261  ac_cs_awk_cr='\\r'
34262else
34263  ac_cs_awk_cr=$ac_cr
34264fi
34265
34266echo 'BEGIN {' >"$tmp/subs1.awk" &&
34267_ACEOF
34268
34269
34270{
34271  echo "cat >conf$$subs.awk <<_ACEOF" &&
34272  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34273  echo "_ACEOF"
34274} >conf$$subs.sh ||
34275  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34276ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34277ac_delim='%!_!# '
34278for ac_last_try in false false false false false :; do
34279  . ./conf$$subs.sh ||
34280    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34281
34282  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34283  if test $ac_delim_n = $ac_delim_num; then
34284    break
34285  elif $ac_last_try; then
34286    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34287  else
34288    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34289  fi
34290done
34291rm -f conf$$subs.sh
34292
34293cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34294cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34295_ACEOF
34296sed -n '
34297h
34298s/^/S["/; s/!.*/"]=/
34299p
34300g
34301s/^[^!]*!//
34302:repl
34303t repl
34304s/'"$ac_delim"'$//
34305t delim
34306:nl
34307h
34308s/\(.\{148\}\)..*/\1/
34309t more1
34310s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34311p
34312n
34313b repl
34314:more1
34315s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34316p
34317g
34318s/.\{148\}//
34319t nl
34320:delim
34321h
34322s/\(.\{148\}\)..*/\1/
34323t more2
34324s/["\\]/\\&/g; s/^/"/; s/$/"/
34325p
34326b
34327:more2
34328s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34329p
34330g
34331s/.\{148\}//
34332t delim
34333' <conf$$subs.awk | sed '
34334/^[^""]/{
34335  N
34336  s/\n//
34337}
34338' >>$CONFIG_STATUS || ac_write_fail=1
34339rm -f conf$$subs.awk
34340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34341_ACAWK
34342cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34343  for (key in S) S_is_set[key] = 1
34344  FS = ""
34345
34346}
34347{
34348  line = $ 0
34349  nfields = split(line, field, "@")
34350  substed = 0
34351  len = length(field[1])
34352  for (i = 2; i < nfields; i++) {
34353    key = field[i]
34354    keylen = length(key)
34355    if (S_is_set[key]) {
34356      value = S[key]
34357      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34358      len += length(value) + length(field[++i])
34359      substed = 1
34360    } else
34361      len += 1 + keylen
34362  }
34363
34364  print line
34365}
34366
34367_ACAWK
34368_ACEOF
34369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34370if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34371  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34372else
34373  cat
34374fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34375  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34376_ACEOF
34377
34378# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34379# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34380# trailing colons and then remove the whole line if VPATH becomes empty
34381# (actually we leave an empty line to preserve line numbers).
34382if test "x$srcdir" = x.; then
34383  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34384h
34385s///
34386s/^/:/
34387s/[	 ]*$/:/
34388s/:\$(srcdir):/:/g
34389s/:\${srcdir}:/:/g
34390s/:@srcdir@:/:/g
34391s/^:*//
34392s/:*$//
34393x
34394s/\(=[	 ]*\).*/\1/
34395G
34396s/\n//
34397s/^[^=]*=[	 ]*$//
34398}'
34399fi
34400
34401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34402fi # test -n "$CONFIG_FILES"
34403
34404# Set up the scripts for CONFIG_HEADERS section.
34405# No need to generate them if there are no CONFIG_HEADERS.
34406# This happens for instance with `./config.status Makefile'.
34407if test -n "$CONFIG_HEADERS"; then
34408cat >"$tmp/defines.awk" <<\_ACAWK ||
34409BEGIN {
34410_ACEOF
34411
34412# Transform confdefs.h into an awk script `defines.awk', embedded as
34413# here-document in config.status, that substitutes the proper values into
34414# config.h.in to produce config.h.
34415
34416# Create a delimiter string that does not exist in confdefs.h, to ease
34417# handling of long lines.
34418ac_delim='%!_!# '
34419for ac_last_try in false false :; do
34420  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34421  if test -z "$ac_t"; then
34422    break
34423  elif $ac_last_try; then
34424    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34425  else
34426    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34427  fi
34428done
34429
34430# For the awk script, D is an array of macro values keyed by name,
34431# likewise P contains macro parameters if any.  Preserve backslash
34432# newline sequences.
34433
34434ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34435sed -n '
34436s/.\{148\}/&'"$ac_delim"'/g
34437t rset
34438:rset
34439s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34440t def
34441d
34442:def
34443s/\\$//
34444t bsnl
34445s/["\\]/\\&/g
34446s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34447D["\1"]=" \3"/p
34448s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34449d
34450:bsnl
34451s/["\\]/\\&/g
34452s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34453D["\1"]=" \3\\\\\\n"\\/p
34454t cont
34455s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34456t cont
34457d
34458:cont
34459n
34460s/.\{148\}/&'"$ac_delim"'/g
34461t clear
34462:clear
34463s/\\$//
34464t bsnlc
34465s/["\\]/\\&/g; s/^/"/; s/$/"/p
34466d
34467:bsnlc
34468s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34469b cont
34470' <confdefs.h | sed '
34471s/'"$ac_delim"'/"\\\
34472"/g' >>$CONFIG_STATUS || ac_write_fail=1
34473
34474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34475  for (key in D) D_is_set[key] = 1
34476  FS = ""
34477}
34478/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34479  line = \$ 0
34480  split(line, arg, " ")
34481  if (arg[1] == "#") {
34482    defundef = arg[2]
34483    mac1 = arg[3]
34484  } else {
34485    defundef = substr(arg[1], 2)
34486    mac1 = arg[2]
34487  }
34488  split(mac1, mac2, "(") #)
34489  macro = mac2[1]
34490  prefix = substr(line, 1, index(line, defundef) - 1)
34491  if (D_is_set[macro]) {
34492    # Preserve the white space surrounding the "#".
34493    print prefix "define", macro P[macro] D[macro]
34494    next
34495  } else {
34496    # Replace #undef with comments.  This is necessary, for example,
34497    # in the case of _POSIX_SOURCE, which is predefined and required
34498    # on some systems where configure will not decide to define it.
34499    if (defundef == "undef") {
34500      print "/*", prefix defundef, macro, "*/"
34501      next
34502    }
34503  }
34504}
34505{ print }
34506_ACAWK
34507_ACEOF
34508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34509  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34510fi # test -n "$CONFIG_HEADERS"
34511
34512
34513eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34514shift
34515for ac_tag
34516do
34517  case $ac_tag in
34518  :[FHLC]) ac_mode=$ac_tag; continue;;
34519  esac
34520  case $ac_mode$ac_tag in
34521  :[FHL]*:*);;
34522  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34523  :[FH]-) ac_tag=-:-;;
34524  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34525  esac
34526  ac_save_IFS=$IFS
34527  IFS=:
34528  set x $ac_tag
34529  IFS=$ac_save_IFS
34530  shift
34531  ac_file=$1
34532  shift
34533
34534  case $ac_mode in
34535  :L) ac_source=$1;;
34536  :[FH])
34537    ac_file_inputs=
34538    for ac_f
34539    do
34540      case $ac_f in
34541      -) ac_f="$tmp/stdin";;
34542      *) # Look for the file first in the build tree, then in the source tree
34543	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34544	 # because $ac_f cannot contain `:'.
34545	 test -f "$ac_f" ||
34546	   case $ac_f in
34547	   [\\/$]*) false;;
34548	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34549	   esac ||
34550	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34551      esac
34552      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34553      as_fn_append ac_file_inputs " '$ac_f'"
34554    done
34555
34556    # Let's still pretend it is `configure' which instantiates (i.e., don't
34557    # use $as_me), people would be surprised to read:
34558    #    /* config.h.  Generated by config.status.  */
34559    configure_input='Generated from '`
34560	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34561	`' by configure.'
34562    if test x"$ac_file" != x-; then
34563      configure_input="$ac_file.  $configure_input"
34564      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34565$as_echo "$as_me: creating $ac_file" >&6;}
34566    fi
34567    # Neutralize special characters interpreted by sed in replacement strings.
34568    case $configure_input in #(
34569    *\&* | *\|* | *\\* )
34570       ac_sed_conf_input=`$as_echo "$configure_input" |
34571       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34572    *) ac_sed_conf_input=$configure_input;;
34573    esac
34574
34575    case $ac_tag in
34576    *:-:* | *:-) cat >"$tmp/stdin" \
34577      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34578    esac
34579    ;;
34580  esac
34581
34582  ac_dir=`$as_dirname -- "$ac_file" ||
34583$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34584	 X"$ac_file" : 'X\(//\)[^/]' \| \
34585	 X"$ac_file" : 'X\(//\)$' \| \
34586	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34587$as_echo X"$ac_file" |
34588    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34589	    s//\1/
34590	    q
34591	  }
34592	  /^X\(\/\/\)[^/].*/{
34593	    s//\1/
34594	    q
34595	  }
34596	  /^X\(\/\/\)$/{
34597	    s//\1/
34598	    q
34599	  }
34600	  /^X\(\/\).*/{
34601	    s//\1/
34602	    q
34603	  }
34604	  s/.*/./; q'`
34605  as_dir="$ac_dir"; as_fn_mkdir_p
34606  ac_builddir=.
34607
34608case "$ac_dir" in
34609.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34610*)
34611  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34612  # A ".." for each directory in $ac_dir_suffix.
34613  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34614  case $ac_top_builddir_sub in
34615  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34616  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34617  esac ;;
34618esac
34619ac_abs_top_builddir=$ac_pwd
34620ac_abs_builddir=$ac_pwd$ac_dir_suffix
34621# for backward compatibility:
34622ac_top_builddir=$ac_top_build_prefix
34623
34624case $srcdir in
34625  .)  # We are building in place.
34626    ac_srcdir=.
34627    ac_top_srcdir=$ac_top_builddir_sub
34628    ac_abs_top_srcdir=$ac_pwd ;;
34629  [\\/]* | ?:[\\/]* )  # Absolute name.
34630    ac_srcdir=$srcdir$ac_dir_suffix;
34631    ac_top_srcdir=$srcdir
34632    ac_abs_top_srcdir=$srcdir ;;
34633  *) # Relative name.
34634    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34635    ac_top_srcdir=$ac_top_build_prefix$srcdir
34636    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34637esac
34638ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34639
34640
34641  case $ac_mode in
34642  :F)
34643  #
34644  # CONFIG_FILE
34645  #
34646
34647_ACEOF
34648
34649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34650# If the template does not know about datarootdir, expand it.
34651# FIXME: This hack should be removed a few years after 2.60.
34652ac_datarootdir_hack=; ac_datarootdir_seen=
34653ac_sed_dataroot='
34654/datarootdir/ {
34655  p
34656  q
34657}
34658/@datadir@/p
34659/@docdir@/p
34660/@infodir@/p
34661/@localedir@/p
34662/@mandir@/p'
34663case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34664*datarootdir*) ac_datarootdir_seen=yes;;
34665*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34666  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34667$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34668_ACEOF
34669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34670  ac_datarootdir_hack='
34671  s&@datadir@&$datadir&g
34672  s&@docdir@&$docdir&g
34673  s&@infodir@&$infodir&g
34674  s&@localedir@&$localedir&g
34675  s&@mandir@&$mandir&g
34676  s&\\\${datarootdir}&$datarootdir&g' ;;
34677esac
34678_ACEOF
34679
34680# Neutralize VPATH when `$srcdir' = `.'.
34681# Shell code in configure.ac might set extrasub.
34682# FIXME: do we really want to maintain this feature?
34683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34684ac_sed_extra="$ac_vpsub
34685$extrasub
34686_ACEOF
34687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34688:t
34689/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34690s|@configure_input@|$ac_sed_conf_input|;t t
34691s&@top_builddir@&$ac_top_builddir_sub&;t t
34692s&@top_build_prefix@&$ac_top_build_prefix&;t t
34693s&@srcdir@&$ac_srcdir&;t t
34694s&@abs_srcdir@&$ac_abs_srcdir&;t t
34695s&@top_srcdir@&$ac_top_srcdir&;t t
34696s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34697s&@builddir@&$ac_builddir&;t t
34698s&@abs_builddir@&$ac_abs_builddir&;t t
34699s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34700$ac_datarootdir_hack
34701"
34702eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34703  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34704
34705test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34706  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34707  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34708  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34709which seems to be undefined.  Please make sure it is defined" >&5
34710$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34711which seems to be undefined.  Please make sure it is defined" >&2;}
34712
34713  rm -f "$tmp/stdin"
34714  case $ac_file in
34715  -) cat "$tmp/out" && rm -f "$tmp/out";;
34716  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34717  esac \
34718  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34719 ;;
34720  :H)
34721  #
34722  # CONFIG_HEADER
34723  #
34724  if test x"$ac_file" != x-; then
34725    {
34726      $as_echo "/* $configure_input  */" \
34727      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34728    } >"$tmp/config.h" \
34729      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34730    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34731      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34732$as_echo "$as_me: $ac_file is unchanged" >&6;}
34733    else
34734      rm -f "$ac_file"
34735      mv "$tmp/config.h" "$ac_file" \
34736	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34737    fi
34738  else
34739    $as_echo "/* $configure_input  */" \
34740      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34741      || as_fn_error $? "could not create -" "$LINENO" 5
34742  fi
34743 ;;
34744
34745
34746  esac
34747
34748done # for ac_tag
34749
34750
34751as_fn_exit 0
34752_ACEOF
34753ac_clean_files=$ac_clean_files_save
34754
34755test $ac_write_fail = 0 ||
34756  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34757
34758
34759# configure is writing to config.log, and then calls config.status.
34760# config.status does its own redirection, appending to config.log.
34761# Unfortunately, on DOS this fails, as config.log is still kept open
34762# by configure, so config.status won't be able to write to it; its
34763# output is simply discarded.  So we exec the FD to /dev/null,
34764# effectively closing config.log, so it can be properly (re)opened and
34765# appended to by config.status.  When coming back to configure, we
34766# need to make the FD available again.
34767if test "$no_create" != yes; then
34768  ac_cs_success=:
34769  ac_config_status_args=
34770  test "$silent" = yes &&
34771    ac_config_status_args="$ac_config_status_args --quiet"
34772  exec 5>/dev/null
34773  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34774  exec 5>>config.log
34775  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34776  # would make configure fail if this is the last instruction.
34777  $ac_cs_success || as_fn_exit 1
34778fi
34779if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34780  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34781$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34782fi
34783
34784
34785# Make the compare script executable
34786$CHMOD +x $OUTPUT_ROOT/compare.sh
34787
34788# Finally output some useful information to the user
34789
34790# Finally output some useful information to the user
34791
34792if test "x$CCACHE_FOUND" != x; then
34793	if  test "x$HAS_GOOD_CCACHE" = x; then
34794		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34795		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34796	else
34797		CCACHE_STATUS="installed and in use"
34798	fi
34799else
34800	if test "x$GCC" = xyes; then
34801		CCACHE_STATUS="not installed (consider installing)"
34802		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34803	else
34804		CCACHE_STATUS="not available for your system"
34805	fi
34806fi
34807
34808printf "\n"
34809printf "====================================================\n"
34810printf "A new configuration has been successfully created in\n"
34811printf "$OUTPUT_ROOT\n"
34812if test "x$CONFIGURE_COMMAND_LINE" != x; then
34813	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34814else
34815	printf "using default settings.\n"
34816fi
34817
34818printf "\n"
34819printf "Configuration summary:\n"
34820printf "* Debug level:    $DEBUG_LEVEL\n"
34821printf "* JDK variant:    $JDK_VARIANT\n"
34822printf "* JVM variants:   $with_jvm_variants\n"
34823printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34824
34825printf "\n"
34826printf "Tools summary:\n"
34827if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34828  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34829fi
34830printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34831printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34832printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34833
34834printf "\n"
34835printf "Build performance summary:\n"
34836printf "* Cores to use:   $JOBS\n"
34837printf "* Memory limit:   $MEMORY_SIZE MB\n"
34838printf "* ccache status:  $CCACHE_STATUS\n"
34839printf "\n"
34840
34841if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34842	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34843	printf "$CCACHE_HELP_MSG\n"
34844
34845    # Print a helpful message on how to acquire the necessary build dependency.
34846    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34847    MISSING_DEPENDENCY=ccache
34848    PKGHANDLER_COMMAND=
34849
34850    case $PKGHANDLER in
34851	apt-get)
34852                apt_help     $MISSING_DEPENDENCY ;;
34853    yum)
34854                yum_help     $MISSING_DEPENDENCY ;;
34855	port)
34856                port_help    $MISSING_DEPENDENCY ;;
34857	pkgutil)
34858                pkgutil_help $MISSING_DEPENDENCY ;;
34859	pkgadd)
34860                pkgadd_help  $MISSING_DEPENDENCY ;;
34861    * )
34862      break ;;
34863    esac
34864
34865    if test "x$PKGHANDLER_COMMAND" != x; then
34866        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34867    fi
34868
34869	printf "$HELP_MSG\n"
34870	printf "\n"
34871fi
34872
34873if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34874	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34875	printf "will result in longer build times.\n"
34876	printf "\n"
34877fi
34878
34879if test "x$FOUND_ALT_VARIABLES" != "x"; then
34880	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34881	printf "These are not respected, and will be ignored. It is recommended\n"
34882	printf "that you clean your environment. The following variables are set:\n"
34883	printf "$FOUND_ALT_VARIABLES\n"
34884	printf "\n"
34885fi
34886
34887if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34888	printf "WARNING: Your build output directory is not on a local disk.\n"
34889	printf "This will severely degrade build performance!\n"
34890	printf "It is recommended that you create an output directory on a local disk,\n"
34891	printf "and run the configure script again from that directory.\n"
34892	printf "\n"
34893fi
34894
34895if test "x$IS_RECONFIGURE" = "xyes"; then
34896	printf "WARNING: The result of this configuration has overridden an older\n"
34897	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34898	printf "proper build. Failure to do so might result in strange build problems.\n"
34899	printf "\n"
34900fi
34901
34902